xoa.accessors.MetaDatasetAccessor

xoa.accessors.MetaDatasetAccessor#

class xoa.accessors.MetaDatasetAccessor(obj, meta_specs=None)[source]#

Meta accessor registered on xarray.Dataset

__init__(obj, meta_specs=None)#

Methods

auto_format(**kwargs)

Rename variables and coordinates and fill their attributes

decode(**kwargs)

Rename variables and coordinates to generic names

encode(**kwargs)

Rename variables and coordinates to specialized names

fill_attrs(**kwargs)

Fill missing attributes

get(meta_name[, loc, single, errors])

Search for a data array or coordinate knowing its generic CF name

get_cf_specs()

Deprecated: use get_meta_specs instead

get_coord(meta_name[, loc, single, errors])

Search for a coordinate knowing its generic CF name

get_depth([errors])

Get the depth, positive down, as computed or recognized by the MetaSpecs()

get_meta_specs()

Get the internal MetaSpecs instance used by this accessor

get_z([errors])

Get the z, positive up, as computed or recognized by the MetaSpecs()

infer_coords(**kwargs)

Infer coordinates and set them as coordinates

reloc(**locs)

Convert given staggered grid locations to other locations

set_cf_specs(cfspecs)

Deprecated: use set_meta_specs instead

set_meta_specs(meta_specs)

Set the internal MetaSpecs used by this accessor

to_loc(**locs)

Set the staggered grid location for specified names

Attributes

cfspecs

use meta_specs instead

coords

Sub-accessor for coords only

data_vars

Sub-accessor for data_vars only

ds

meta_specs

The MetaSpecs instance