earthkit.data.xr_engine.attrs

Attributes

Classes

Attr

Generic attribute class.

AttrList

Built-in mutable sequence.

Attrs

AttrsBuilder

CFAttrs

CallableAttr

Callable attribute.

FixedAttr

Fixed attribute.

FixedAttrBuilder

KeyAttr

Metadata key attribute class.

NamespaceAttr

Namespace attribute.

UniqueAttrBuilder

Module Contents

class earthkit.data.xr_engine.attrs.Attr(name, remove_prefix=False)

Generic attribute class.

Parameters:

name (str) – The name of the attribute.

fixed()
name
value()
class earthkit.data.xr_engine.attrs.AttrList(attrs)

Bases: list

Built-in mutable sequence.

If no argument is given, the constructor creates a new empty list. The argument must be an iterable if specified.

fixed()
non_fixed()
class earthkit.data.xr_engine.attrs.Attrs(profile, attrs_mode, attrs, variable_attrs, global_attrs, coord_attrs, rename_attrs)
attrs
builder
coord_attrs
global_attrs
profile
rename_attrs_map
variable_attrs
class earthkit.data.xr_engine.attrs.AttrsBuilder(profile, attrs)
attrs
build(*args, rename=True, **kwargs)
profile
class earthkit.data.xr_engine.attrs.CFAttrs
attrs()
can_be_global(name)
earthkit.data.xr_engine.attrs.CF_ATTRS
class earthkit.data.xr_engine.attrs.CallableAttr(name, func)

Bases: Attr

Callable attribute.

Parameters:
  • name (str, None) – The name of the attribute. Can be None.

  • func (callable) – The function that returns the value of the attribute.

fixed()
func
name
value()
class earthkit.data.xr_engine.attrs.FixedAttr(name, value)

Bases: Attr

Fixed attribute.

Parameters:
  • name (str) – The name of the attribute.

  • value (str, bool, int, float) – The value of the attribute.

fixed()
get(metadata)
name
value()
class earthkit.data.xr_engine.attrs.FixedAttrBuilder(profile, attrs)

Bases: AttrsBuilder

attrs
build(*args, rename=True, **kwargs)
profile
class earthkit.data.xr_engine.attrs.KeyAttr(name, key=None)

Bases: Attr

Metadata key attribute class.

Parameters:
  • name (str) – The name of the attribute.

  • key (str, None) – The metadata key to retrieve the attribute value. If None, the name is used as the key.

fixed()
get(field)
key
name
value()
class earthkit.data.xr_engine.attrs.NamespaceAttr(name, ns=None)

Bases: Attr

Namespace attribute.

Parameters:

name (str) – The name of the metadata namespace

fixed()
get(field)
name
value()
class earthkit.data.xr_engine.attrs.UniqueAttrBuilder(profile, attrs)

Bases: AttrsBuilder

attrs
build(*args, rename=True, **kwargs)
profile