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: