NEDAS.grid.grid_1d module

class NEDAS.grid.grid_1d.Grid1D(x: ndarray, bounds=None, regular=True, cyclic=False, distance_type='cartesian', dst_grid=None)[source]

Bases: object

Grid class to handle fields defined on a 1D grid

Methods convert, interp and distance has the same input args as their counterparts in the Grid class. This introduces y coordinates in Grid1D class, although y is not defined for 1D grid, this makes the code that calles Grid/Grid1D methods to be easier to maintain.

mask: ndarray
x: ndarray
regular: bool
cyclic: bool
nx: int
dx: float
Lx: float
classmethod regular_grid(xstart, xend, dx, centered=False, **kwargs)[source]
classmethod random_grid(xstart, xend, npoints, **kwargs)[source]
change_resolution_level(nlevel)[source]
property dst_grid
set_destination_grid(grid)[source]
wrap_cyclic(x_)[source]
find_index(x_)[source]
interp(fld, x=None, y=None, method='linear')[source]
coarsen(fld)[source]
convert(fld, is_vector=False, method='linear', coarse_grain=False, **kwargs)[source]
distance(ref_x, x, ref_y=None, y=None, p=1)[source]
plot_field(ax, fld, vmin, vmax)[source]
plot_vectors(ax, vec_fld)[source]