xoa.meta.MetaSpecs.get_loc_mapping#
- MetaSpecs.get_loc_mapping(obj, meta_names=None, loc=None, categories=['coords', 'data_vars'])[source]#
Associate a location to each identified variables, coordinates and dimensions of obj
- Parameters:
obj (xarray.DataArray, xarray.Dataset)
meta_names (dict, None) – Dict with names as keys and generic meta names as values. If not provided,
match()is used to guess meta names.
- Returns:
dict – Keys are item names and values are location. This dict is also stored in the meta_locs key of the encoding attribute of obj.