hydro.core

Core operations on a CCHDO CF/netCDF file.

Module Contents

Functions

_dataarray_factory(param[, ctype, N_PROF, N_LEVELS])

add_param(ds, param[, with_flag])

add_profile_level(ds, idx, levels)

add_level(ds[, n_levels])

add_profile(ds, expocode, station, cast, time, ...)

create_new()

Create an empty CF Dataset with the minimum required contents.

Attributes

hydro.core.DIMS = ('N_PROF', 'N_LEVELS')[source]
hydro.core.FILLS_MAP[source]
hydro.core.dtype_map[source]
hydro.core.EXPOCODE[source]
hydro.core.STNNBR[source]
hydro.core.CASTNO[source]
hydro.core.SAMPNO[source]
hydro.core.DATE[source]
hydro.core.TIME[source]
hydro.core.LATITUDE[source]
hydro.core.LONGITUDE[source]
hydro.core.CTDPRS[source]
hydro.core.BTLNBR[source]
hydro.core.COORDS[source]
hydro.core.FLAG_SCHEME: dict[str, type[hydro.exchange.flags.ExchangeFlag]][source]
hydro.core._dataarray_factory(param, ctype='data', N_PROF=0, N_LEVELS=0)[source]
Parameters:

param (cchdo.params.WHPName)

Return type:

xarray.DataArray

hydro.core.add_param(ds, param, with_flag=False)[source]
Parameters:
Return type:

xarray.Dataset

hydro.core.add_profile_level(ds, idx, levels)[source]
Parameters:

ds (xarray.Dataset)

Return type:

xarray.Dataset

hydro.core.add_level(ds, n_levels=1)[source]
Parameters:

ds (xarray.Dataset)

Return type:

xarray.Dataset

hydro.core.add_profile(ds, expocode, station, cast, time, latitude, longitude, profile_type)[source]
Parameters:
  • ds (xarray.Dataset)

  • expocode (numpy.typing.ArrayLike)

  • station (numpy.typing.ArrayLike)

  • cast (numpy.typing.ArrayLike)

  • time (numpy.typing.ArrayLike)

  • latitude (numpy.typing.ArrayLike)

  • longitude (numpy.typing.ArrayLike)

  • profile_type (numpy.typing.ArrayLike)

Return type:

xarray.Dataset

hydro.core.create_new()[source]

Create an empty CF Dataset with the minimum required contents.

Return type:

xarray.Dataset