oceanspy.OceanDataset
- class oceanspy.OceanDataset(dataset)[source]
OceanDataset combines a
xarray.Datasetwith other objects used by OceanSpy (e.g., xgcm.Grid).Additional objects are attached to the
xarray.Datasetas global attributes.- __init__(dataset)[source]
- Parameters:
- dataset: xarray.Dataset
The multi-dimensional, in memory, array database.
References
http://xarray.pydata.org/en/stable/generated/xarray.Dataset.html
Methods
__init__(dataset)- Parameters:
create_tree([grid_pos])Create a scipy.spatial.cKDTree for quick nearest-neighbor lookup.
manipulate_coords([fillna, coords1Dfrom2D, ...])Manipulate coordinates to make them compatible with OceanSpy.
merge_into_oceandataset(obj[, overwrite])Merge a Dataset or DataArray into the OceanDataset.
set_aliases(aliases[, overwrite])Set aliases to connect custom variables names to OceanSpy reference names.
set_description(description[, overwrite])Set description of the OceanDataset.
set_face_connections(face_connections)Set face conections that define the grid topology that gets read by
xgcm.GridParameters ---------- face_connections: dict Dictionary the connections of each face along each direction.set_grid_coords(grid_coords[, add_midp, ...])Set grid coordinates used by
xgcm.Grid.set_grid_periodic(grid_periodic)Set grid axes that will be treated as periodic by
xgcm.Grid.set_name(name[, overwrite])Set name of the OceanDataset.
set_parameters(parameters)Set model parameters used by OceanSpy.
set_projection(projection, **kwargs)Set Cartopy projection of the OceanDataset.
shift_averages([averageList])Shift average variables to time_midp.
to_netcdf(path, **kwargs)Write contents to a netCDF file.
to_zarr(path, **kwargs)Write contents to a zarr group.
Attributes
A dictionary to connect custom variable names to OceanSpy reference names.
Access
oceanspy.animatefunctions.Access
oceanspy.computefunctions, and merge the computed Dataset into the OceanDataset.xarray.Dataset: A multi-dimensional, in memory, array database.
Description of the OceanDataset.
face_connectionsDefines the topology of the grid used by
xgcm.Grid.xgcm.Grid: A collection of axes, which is a group of coordinates that all lie along the same physical dimension but describe different positions relative to a grid cell.Grid coordinates used by
xgcm.Grid.List of
xgcm.Gridaxes that are periodic.Name of the OceanDataset.
A dictionary defining model parameters that are used by OceanSpy.
Access
oceanspy.plotfunctions.Cartopy projection of the OceanDataset.
Access
oceanspy.subsamplefunctions.