oocgcm.griddeddata.grids.variables_holder_for_2d_grid_from_latlon_arrays

class oocgcm.griddeddata.grids.variables_holder_for_2d_grid_from_latlon_arrays(latitudes=None, longitudes=None, mask=None, chunks=None)

This class create the dictionnary of variables to be used for creating a oocgcm.core.grids.generic_2d_grid from arrays of latitude and longitude.

__init__(latitudes=None, longitudes=None, mask=None, chunks=None)

This holder will create grid metrics and masks corresponding to a Arakawa C-grid assuming that latitudes, longitudes and mask refer to the centers of the cells (t-points).

Parameters:

latitudes : array-like (numpy array or xarray)

array of latitudes from which to build the grid metrics. This can be either a one-dimensionnal or a two-dimensional array. For 2d arrays, assume that the order of the dimensions is (‘y’,’x’).

longitudes : array-like (numpy array or xarray)

array of longitudes from which to build the grid metrics. This can be either a one-dimensionnal or a two-dimensional array. For 2d arrays, assume that the order of the dimensions is (‘y’,’x’).

mask : boolean array-like (numpy array or xarray)

two-dimensional array describing the inner domain of the grid. mask==1 within the ocean, mask==0 on land.

chunks : dict-like

dictionnary of sizes of chunk for creating xarray.DataArray.

Methods

__init__([latitudes, longitudes, mask, chunks]) This holder will create grid metrics and masks corresponding to a Arakawa C-grid assuming that latitudes, longitudes and mask refer to the centers of the cells (t-points).