xoa.cf.CFCoordSpecs

class xoa.cf.CFCoordSpecs(parent)[source]

CF specification for coords

__init__(parent)

Initialize self. See help(type(self)) for accurate signature.

Methods

format_dataarray(da[, name, loc, rename, …])

Format a DataArray’s name and attributes

get(dsa, name)

Call to search() with an explicit name and ignoring errors

get_attrs(name[, select, exclude, errors, …])

Get the default attributes from cf specs

get_axis(coord[, lower])

Get the dimension type, either from axis attr or from match Cf coord

get_dim_type(dim[, da, lower])

Get the type of a dimension

get_dim_types(da[, unknown, asdict])

Get a tuple of the dimension types of an array

get_dims(da, dim_types[, allow_positional, …])

Get the data array dimensions names from their type

get_name(name[, specialize, loc])

Get the name of the matching CF specs

get_rename_dims_args(dsa[, loc, specialize])

Get args for renaming dimensions that are not coordinates

get_specs(name[, errors])

Get the specs of a cf item

items()

keys()

match(da[, name, loc])

Check if da attributes match given or any specs

parse_dims(dims, dsa)

Convert from generic dim names to specialized names

rename_dataarray(da[, name, specialize, …])

Rename a DataArray

search(dsa[, name, loc, get, single, errors])

Search for a data_var or coord that maches given or any specs

search_dim(da[, dim_type, loc, errors])

Search a dataarray for a dimension name according to its type

search_from_dim(da, dim[, errors])

Search a dataarray for a coordinate from a dimension name

set_specs(item, **specs)

Update or create specs for an item

set_specs_from_cfg(cfg)

Update or create specs for several item with a config specs

Attributes

attrs_exclude

attrs_first

category

dims

Dims per dimension types

names

sglocator

SGLocator instance