xarray.Dataset.argo.filter_data_mode

xarray.Dataset.argo.filter_data_mode#

Dataset.argo.filter_data_mode(keep_error: bool = True, errors: str = 'raise')#

Filter variables according to their data mode

This filter applies to <PARAM> and <PARAM_QC>

For data mode ā€˜R’ and ā€˜A’: keep <PARAM> (eg: ā€˜PRES’, ā€˜TEMP’ and ā€˜PSAL’)

For data mode ā€˜D’: keep <PARAM_ADJUSTED> (eg: ā€˜PRES_ADJUSTED’, ā€˜TEMP_ADJUSTED’ and ā€˜PSAL_ADJUSTED’)

Since ADJUSTED variables are not required anymore after the filter, all ADJUSTED variables are dropped in order to avoid confusion wrt variable content. DATA_MODE is preserved for the record.

Parameters:
  • keep_error (bool, optional) – If true (default) keep the measurements error fields or not.

  • errors ({'raise','ignore'}, optional) – If ā€˜raise’ (default), raises a InvalidDatasetStructure error if any of the expected dataset variables is not found. If ā€˜ignore’, fails silently and return unmodified dataset.

Return type:

xarray.Dataset

Deprecated since version 0.1.7: This method action and signature are deprecated and will break your code for versions >= 0.1.18.