mpas_tools.mesh.attrs.add_mesh_attrs

mpas_tools.mesh.attrs.add_mesh_attrs(ds)[source]

Add CF metadata to the mesh variables in a dataset and add CF to its Conventions. Attributes that a variable already has are kept, except that a latitude or longitude standard_name is removed from the latitude and longitude variables of a planar mesh.

Latitude and longitude variables only get a standard_name if the on_a_sphere attribute of the dataset is YES.

Parameters:

ds (xarray.Dataset) – An MPAS mesh dataset, modified in place

Returns:

ds (xarray.Dataset) – The same dataset, for convenience