xoa.cf.get_cf_specs

xoa.cf.get_cf_specs(name=None, cache='rw')[source]

Get the current or a registered CF specifications instance

Parameters:
  • name (str, "current", "default", None, xarray.Dataset, xarray.DataArray) – “default” means the default xoa specs. “current” is equivalent to None and means the currents specs, which defaults to the xoa defaults! Else registration name for these specs or a data array or dataset that can be used to get the registration name if it set in the cf_specs attribute or encoding. When set, cache is ignored. Raises a XoaCFError is case of invalid name.

  • cache (str, bool, None) – Cache default specs on disk with pickling for fast loading. If None, it defaults to boolean option cf.cache. Possible string values: "ignore", "rw", "read", "write". If True, it is set to "rw". If False, it is set to "ignore".

Returns:

CFSpecs – None is return if no specs are found

Raises:

XoaCFError – When name is provided as a string and is invalid.