oocgcm.griddeddata.grids.variables_holder_for_2d_grid_from_plane_coordinate_arrays¶
- class oocgcm.griddeddata.grids.variables_holder_for_2d_grid_from_plane_coordinate_arrays(xcoord=None, ycoord=None, mask=None, chunks=None, lat=45, lon=0)¶
This class create the dictionnary of variables to be used for creating a oocgcm.core.grids.generic_2d_grid from arrays of plane coordinates.
- __init__(xcoord=None, ycoord=None, mask=None, chunks=None, lat=45, lon=0)¶
This holder will create grid metrics and masks corresponding to a Arakawa C-grid assuming that xcoord, ycoord and mask refer to the centers of the cells (t-points). This class is meant to be used for idealized domains (eg.g on the f-plane of beta-plane)
Parameters: xcoord : array-like (numpy array or xarray)
array of x-coordinate 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’).
ycoord : array-like (numpy array or xarray)
array of y-coordinate 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.
lat : float or array-like
latitude of t-points. This can be a float, a 1d or a 2d numpy array.
lon : float or array-like
longitude of t-points. This can be a float, a 1d or a 2d numpy array.
Methods
__init__([xcoord, ycoord, mask, chunks, ...]) This holder will create grid metrics and masks corresponding to a Arakawa C-grid assuming that xcoord, ycoord and mask refer to the centers of the cells (t-points).