xoa.cf.SGLocator
- class xoa.cf.SGLocator(name_format=None, valid_locations=None, encoding=None)[source]
Staggered grid location parsing and formatting utility
- Parameters:
Methods
add_loc
(da, loc[, to_name, to_attrs])A shortcut to
format_dataarray()
to update da with loc without copyformat_attr
(attr, value, loc[, standardize])Format a single attribute at a specified location
format_attrs
(attrs[, loc, standardize])Copy and format a dict of attributes
format_dataarray
(da[, loc, standardize, ...])Format name and attributes of a copy of DataArray
get_loc
([name, attrs, errors])Parse name and attributes to find a unique location
get_loc_from_da
(da[, errors])Parse a data array name and attributes to find a unique location
match_attr
(attr, value, root[, loc])Check if an attribute is matching a location
merge_attr
(attr, value0, value1[, loc, ...])Merge two attribute values taking care of location
parse_attr
(attr, value)Parse an attribute string to get its root and location
parse_loc_arg
(loc)Parse the location argument
patch_attrs
(attrs, patch[, loc, ...])Patch a dict of attribute with another dict taking care of loc
Attributes