xarray.Dataset.argo.datamode.merge

xarray.Dataset.argo.datamode.merge#

Dataset.argo.datamode.merge(params: str | List[str] = 'all', errors: str = 'raise') Dataset#

Merge <PARAM> and <PARAM>_ADJUSTED variables according to DATA_MODE or <PARAM>_DATA_MODE

Merging is done as follows:

  • For measurements with data mode R: keep <PARAM> (eg: ‘DOXY’)

  • For measurements with data mode D or A: keep <PARAM>_ADJUSTED (eg: ‘DOXY_ADJUSTED’)

Since adjusted variables are not required anymore after the transformation, all <PARAM>_ADJUSTED variables are dropped from the dataset in order to avoid confusion with regard to variable content. Variable DATA_MODE or <PARAM>_DATA_MODE are preserved for the record.

Parameters:
  • params (str, List[str], optional, default='all') – Parameter or list of parameters to merge. Use the default keyword all to merge all possible parameters in the xarray.Dataset.

  • errors (str, optional, default='raise') – If raise, raises a argopy.errors.InvalidDatasetStructure error if any of the expected variables is not found. If ignore, fails silently and return unmodified dataset.

Return type:

xarray.Dataset

Notes

This method is compatible with core, deep and BGC datasets

See also

filter()