hydro.dt

Attributes

Functions

_combine_dt_ndarray(date_arr[, time_arr, time_pad])

combine_dt(dataset[, is_coord, date_name, time_name, ...])

Combine the exchange style string variables of date and optinally time into a single

Module Contents

hydro.dt.DATE[source]
hydro.dt.TIME[source]
hydro.dt._combine_dt_ndarray(date_arr, time_arr=None, time_pad=False)[source]
Parameters:
  • date_arr (numpy.typing.NDArray[numpy.str_])

  • time_arr (numpy.typing.NDArray[numpy.str_] | None)

Return type:

numpy.ndarray

hydro.dt.combine_dt(dataset, is_coord=True, date_name=DATE, time_name=TIME, time_pad=False)[source]

Combine the exchange style string variables of date and optinally time into a single variable containing real datetime objects

This will remove the time variable if present, and replace then rename the date variable. Date is replaced/renamed to maintain variable order in the xr.DataSet

Parameters:
  • dataset (xarray.Dataset)

  • is_coord (bool)

  • date_name (cchdo.params.WHPName)

  • time_name (cchdo.params.WHPName)

Return type:

xarray.Dataset