xarray.Dataset.argo.datamode.filter#
- Dataset.argo.datamode.filter(dm: str | List[str] = ['R', 'A', 'D'], params: str | List[str] = 'all', logical: str = 'and', mask: bool = False, errors: str = 'raise')#
Filter measurements according to parameters data mode
Filter the dataset to keep points where all or some of the parameters are in any of the data mode specified.
This method can return the filtered dataset or the filter mask.
- Parameters:
dm (str, List[str], optional, default=[
R
,A
,D
]) β List of data mode values (string) to keepparams (str, List[str], optional, default='all') β List of parameters to apply the filter to. By default, we use all parameters for which a data mode can be found
logical (str, optional, default='and') β Reduce parameter filters with a logical
and
oror
. Withand
the filter shall be True if all parameters match the data mode requested, while withor
it will be True for at least one parameter.mask (bool, optional, default=False) β Determine if we should return the filter mask or the filtered dataset
errors (str, optional, default='raise') β If
raise
, raises aargopy.errors.InvalidDatasetStructure
error if any of the expected variables is not found. Ifignore
, fails silently and return unmodified dataset.
- Return type:
Notes
Method compatible with core, deep and BGC datasets
Can be applied after
merge()
See also