pocean.dsg package¶
- class pocean.dsg.ContiguousRaggedTimeseries¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- to_dataframe()¶
- class pocean.dsg.ContiguousRaggedTrajectory¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.ContiguousRaggedTrajectoryProfile¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.IncompleteMultidimensionalProfile¶
Bases:
CFDataset
If there are the same number of levels in each profile, but they do not have the same set of vertical coordinates, one can use the incomplete multidimensional array representation, which the vertical coordinate variable is two-dimensional e.g. replacing z(z) in Example H.8, “Atmospheric sounding profiles for a common set of vertical coordinates stored in the orthogonal multidimensional array representation.” with alt(profile,z). This representation also allows one to have a variable number of elements in different profiles, at the cost of some wasted space. In that case, any unused elements of the data and auxiliary coordinate variables must contain missing data values (section 9.6).
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.IncompleteMultidimensionalTimeseries¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- to_dataframe()¶
- class pocean.dsg.IncompleteMultidimensionalTimeseriesProfile¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- to_dataframe()¶
- class pocean.dsg.IncompleteMultidimensionalTrajectory¶
Bases:
CFDataset
When storing multiple trajectories in the same file, and the number of elements in each trajectory is the same, one can use the multidimensional array representation. This representation also allows one to have a variable number of elements in different trajectories, at the cost of some wasted space. In that case, any unused elements of the data and auxiliary coordinate variables must contain missing data values (section 9.6).
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.IndexedRaggedTimeseries¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- to_dataframe()¶
- class pocean.dsg.IndexedRaggedTrajectory¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- from_dataframe(df, output, **kwargs)¶
- to_dataframe()¶
- class pocean.dsg.OrthogonalMultidimensionalProfile¶
Bases:
CFDataset
If the profile instances have the same number of elements and the vertical coordinate values are identical for all instances, you may use the orthogonal multidimensional array representation. This has either a one-dimensional coordinate variable, z(z), provided the vertical coordinate values are ordered monotonically, or a one-dimensional auxiliary coordinate variable, alt(o), where o is the element dimension. In the former case, listing the vertical coordinate variable in the coordinates attributes of the data variables is optional.
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.OrthogonalMultidimensionalTimeseries¶
Bases:
CFDataset
H.2.1. Orthogonal multidimensional array representation of time series
If the time series instances have the same number of elements and the time values are identical for all instances, you may use the orthogonal multidimensional array representation. This has either a one-dimensional coordinate variable, time(time), provided the time values are ordered monotonically, or a one-dimensional auxiliary coordinate variable, time(o), where o is the element dimension. In the former case, listing the time variable in the coordinates attributes of the data variables is optional.
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=False, clean_rows=False, **kwargs)¶
- class pocean.dsg.OrthogonalMultidimensionalTimeseriesProfile¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True, **kwargs)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- class pocean.dsg.RaggedTimeseriesProfile¶
Bases:
CFDataset
- calculated_metadata(df=None, geometries=True, clean_cols=True, clean_rows=True)¶
- classmethod from_dataframe(df, output, **kwargs)¶
- classmethod is_mine(dsg, strict=False)¶
- nc_attributes(axes, daxes)¶
- to_dataframe(clean_cols=True, clean_rows=True, **kwargs)¶
- pocean.dsg.get_calculated_attributes(df, axes=None, history=None)¶
Functions to automate netCDF attribute generation from the data itself This is a wrapper for the other four functions, which could be called separately.
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary)
history – history: text initializing audit trail for modifications to the original data (optional, string)
- Returns:
dictionary of global attributes
- pocean.dsg.get_creation_attributes(history=None)¶
Query system for netCDF file creation times
- Parameters:
history – text initializing audit trail for modifications to the original data (optional, string)
- Returns:
dictionary of global attributes
- pocean.dsg.get_geographic_attributes(df, axes=None)¶
Use values in a dataframe to set geographic attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html The coordinate reference system (CRS) is assumed to be EPSG:4326, which is WGS84 and is used with GPS satellite navigation (http://spatialreference.org/ref/epsg/wgs-84/). This is NCEI’s default. Coordinate values are latitude (decimal degrees_north) and longitude (decimal degrees_east). Longitude values are limited to [-180, 180).
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary)
- Returns:
nested dictionary of variable and global attributes
- pocean.dsg.get_temporal_attributes(df, axes=None)¶
Use values in a dataframe to set temporal attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary). z in meters.
- Returns:
nested dictionary of variable and global attributes
- pocean.dsg.get_vertical_attributes(df, axes=None)¶
Use values in a dataframe to set vertical attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html The CRS, geospatial_bounds_vertical_crs, cannot be assumed because NCEI suggests any of * ‘EPSG:5829’ (instantaneous height above sea level), * ‘EPSG:5831’ (instantaneous depth below sea level), or * ‘EPSG:5703’ (NAVD88 height). Likewise, geospatial_vertical_positive cannot be assumed to be either ‘up’ or ‘down’. Set these attributes separately according to the dataset. Note: values are cast from numpy.int to float
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary). z in meters.
- Returns:
nested dictionary of variable and global attributes
Subpackages¶
- pocean.dsg.profile package
- pocean.dsg.timeseries package
- pocean.dsg.timeseriesProfile package
- pocean.dsg.trajectory package
- pocean.dsg.trajectoryProfile package
Submodules¶
pocean.dsg.utils module¶
- pocean.dsg.utils.get_calculated_attributes(df, axes=None, history=None)¶
Functions to automate netCDF attribute generation from the data itself This is a wrapper for the other four functions, which could be called separately.
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary)
history – history: text initializing audit trail for modifications to the original data (optional, string)
- Returns:
dictionary of global attributes
- pocean.dsg.utils.get_creation_attributes(history=None)¶
Query system for netCDF file creation times
- Parameters:
history – text initializing audit trail for modifications to the original data (optional, string)
- Returns:
dictionary of global attributes
- pocean.dsg.utils.get_geographic_attributes(df, axes=None)¶
Use values in a dataframe to set geographic attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html The coordinate reference system (CRS) is assumed to be EPSG:4326, which is WGS84 and is used with GPS satellite navigation (http://spatialreference.org/ref/epsg/wgs-84/). This is NCEI’s default. Coordinate values are latitude (decimal degrees_north) and longitude (decimal degrees_east). Longitude values are limited to [-180, 180).
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary)
- Returns:
nested dictionary of variable and global attributes
- pocean.dsg.utils.get_temporal_attributes(df, axes=None)¶
Use values in a dataframe to set temporal attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary). z in meters.
- Returns:
nested dictionary of variable and global attributes
- pocean.dsg.utils.get_vertical_attributes(df, axes=None)¶
Use values in a dataframe to set vertical attributes for the eventual netCDF file Attribute names come from https://www.ncei.noaa.gov/data/oceans/ncei/formats/netcdf/v2.0/index.html The CRS, geospatial_bounds_vertical_crs, cannot be assumed because NCEI suggests any of * ‘EPSG:5829’ (instantaneous height above sea level), * ‘EPSG:5831’ (instantaneous depth below sea level), or * ‘EPSG:5703’ (NAVD88 height). Likewise, geospatial_vertical_positive cannot be assumed to be either ‘up’ or ‘down’. Set these attributes separately according to the dataset. Note: values are cast from numpy.int to float
- Parameters:
df – data (Pandas DataFrame)
axes – keys (x,y,z,t) are associated with actual column names (dictionary). z in meters.
- Returns:
nested dictionary of variable and global attributes