hydro.rename

Module Contents

Functions

is_not_none(obj)

rename_with_bookkeeping(xarray_obj[, name_dict, attrs])

Find and update all instances of a given variable to a new name.

to_argo_variable_names(xarray_obj)

hydro.rename.is_not_none(obj)[source]
hydro.rename.rename_with_bookkeeping(xarray_obj, name_dict=None, attrs=None)[source]

Find and update all instances of a given variable to a new name.

Parameters can be referenced in the attributes of separate parameter (e.g. ancillary_variables) and need to be updated appropriately when renaming variables.

Parameters:
  • xarray_obj (xarray.Dataset) – A Dataset containing variables, flags, etc.

  • name_dict (Mapping) – Mapping of old variable names to new.

  • attrs (List[str]) – Names of variable attributes to search through.

Return type:

xarray.Dataset

hydro.rename.to_argo_variable_names(xarray_obj)[source]
Parameters:

xarray_obj (xarray.Dataset)

Return type:

xarray.Dataset