polaris.cf.add_cf_conventions
- polaris.cf.add_cf_conventions(ds: Dataset) Dataset[source]
Add
CF-<version>to theConventionsglobal attribute of a dataset that has no CF entry. Any other conventions already listed (MPASfrom the MPAS-Tools mesh converter and cell culler) are kept, since the attribute lists every convention a file follows.- Parameters:
ds (xarray.Dataset) – A dataset about to be written
- Returns:
ds (xarray.Dataset) – A shallow copy of the dataset with the
Conventionsattribute set, or the dataset itself if it already names a CF version