xoa.cf.CFCoordSpecs¶
- class xoa.cf.CFCoordSpecs(parent)[source]¶
CF specification for coords
- __init__(parent)¶
Methods
format_dataarray(da[, cf_name, rename, …])Format a DataArray’s name and attributes
get(obj, cf_name)Call to
search()with an explicit name and ignoring errorsget_allowed_names(cf_name)Get the list of allowed names for a given cf_name
get_attrs(cf_name[, select, exclude, …])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[, obj, lower])Get the type of a dimension
get_dim_types(obj[, unknown, asdict])Get a tuple of the dimension types of an array
get_dims(obj, cf_args[, allow_positional, …])Get the data array dimensions names from their type
get_loc_arg(da[, cf_name, locations])Get the loc argument from a name or data array with name
get_loc_mapping(da[, cf_names])get_name(name[, specialize, loc])Get the name of the matching CF specs
get_rename_dims_args(obj[, locations, …])Get args for renaming dimensions that are not coordinates
get_specs(name[, errors])Get the specs of a cf item
items()keys()match(da[, cf_name, loc])Check if da attributes match given or any specs
match_from_name(name[, cf_name, loc])Get the generic CF name of an object knowing only its name
parse_dims(dims, obj)Convert from generic dim names to specialized names
rename_dataarray(da[, name, specialize, …])Rename a DataArray
search(obj[, cf_name, loc, get, single, errors])Search for a data_var or coord that maches given or any specs
search_dim(obj[, cf_arg, loc, errors])Search a dataarray/dataset for a dimension name according to its generic name or type
search_from_dim(obj, dim[, errors])Search a dataarray/dataset 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
Dict of dim names per type
SGLocatorinstance