dctools.data.coordinates.detect_variables_in_dataset
- dctools.data.coordinates.detect_variables_in_dataset(ds)
Detect all known oceanographic variables in an xarray Dataset.
Uses three complementary strategies, applied in order of priority:
Match the variable’s
standard_nameattribute against CF standard names listed inVARIABLES_ALIASES.Match the variable name against known aliases in
VARIABLES_ALIASES.Match the variable name against the generic key names themselves.
Only the first variable found per generic key is kept.
- Parameters:
ds (xr.Dataset) – Input dataset.
- Returns:
Mapping generic variable key -> actual variable name in the dataset.
- Return type:
dict