hydro.accessors¶
Attributes¶
Classes¶
Functions¶
|
|
|
|
Module Contents¶
- hydro.accessors.write_or_return(data, path_or_fobj=None)[source]¶
- Parameters:
data (bytes)
path_or_fobj (PathType | io.BufferedWriter | None)
- Return type:
bytes | None
- class hydro.accessors.WHPIndxer(obj)[source]¶
- Parameters:
obj (xarray.Dataset)
- __getitem__(key)[source]¶
- Parameters:
key (FQProfileKey | FQPointKey)
- class hydro.accessors.CCHDOAccessor(xarray_obj)[source]¶
- Parameters:
xarray_obj (xarray.Dataset)
- to_mat(fname)[source]¶
Experimental Matlab .mat data file generator.
The support for netCDF files in Matlab is really bad. Matlab also has no built in support for the standards we are trying to follow (CF, ACDD), the most egregious lack of support is how to deal with times in netCDF files. This was an attempt to make a mat file which takes care of some of the things matlab won’t do for you. It requires scipy to function.
The file it produces is in no way stable.
- to_sum(path=None)[source]¶
NetCDF to WOCE sumfile maker.
This is missing some information that is not included anymore (wire out, height above bottom). It is especially lacking in including woce parameter IDs
- property track[source]¶
A dict which can be dumped to json which conforms to the expected structure for the CCHDO website.
- gen_fname(ftype='cf')[source]¶
Generate a human friendly netCDF (or other output type) filename for this object.
- Parameters:
ftype (FTypeOptions)
- Return type:
- compact_profile()[source]¶
Drop the trailing empty data from a profile.
Because we use the incomplete multidimensional array representation of profiles there is often “wasted space” at the end of any profile that is not the longest one. This accessor drops that wasted space for xr.Dataset objects containing a single profile
- _make_params_units_line(params)[source]¶
- Parameters:
params (dict[cchdo.params.WHPName, xarray.DataArray])
- _make_data_block(params)[source]¶
- Parameters:
params (dict[cchdo.params.WHPName, xarray.DataArray])
- Return type:
- to_whp_columns(compact=False)[source]¶
- Return type:
dict[cchdo.params.WHPName, xarray.DataArray]