polaris.mesh.attrs.add_mesh_var_attrs
- polaris.mesh.attrs.add_mesh_var_attrs(ds: Dataset) Dataset[source]
Fill in the
units,long_nameandstandard_nameattributes of the MPAS mesh variables in a dataset, for those that do not already have them, from the table inmpas_tools.mesh.attrs.The MPAS-Tools mesh tools write these attributes themselves, but mesh variables that Polaris adds to other datasets may not have them. Latitude and longitude variables get a
standard_nameonly if the dataset’son_a_sphereattribute isYES. Unlikempas_tools.mesh.attrs.add_mesh_attrs(), no attribute is removed, so a dataset that does not carryon_a_spherekeeps the standard names its mesh variables came with.- Parameters:
ds (xarray.Dataset) – A dataset containing MPAS mesh variables (with MPAS-Ocean names)
- Returns:
ds (xarray.Dataset) – A shallow copy of the dataset with the attributes added