mpas_analysis.ocean.utility.add_standard_regions_and_subset

mpas_analysis.ocean.utility.add_standard_regions_and_subset(ds, config, regionShortNames=None)[source]

Add standard region names (regionNames coordinate) to a dataset and rename nOceanRegionsTmp dimension to nOceanRegions (if present). Shorter standard region names are in regionNamesShort.

Parameters:
  • ds (xarray.Dataset) – the dataset to which region names should be added

  • config (tranche.Tranche) – Configuration options

  • regionShortNames (list of str, optional) – A list of a subset of the short region names to use to subset the dataset

Returns:

ds (xarray.Dataset) – the dataset with region names added and possibly subsetted