earthkit.data.field.handler.proc¶
Attributes¶
Classes¶
A specification of a vertical level or layer. |
Module Contents¶
- earthkit.data.field.handler.proc.EMPTY_PROC_HANDLER¶
- class earthkit.data.field.handler.proc.ProcFieldComponentHandler(component)¶
Bases:
earthkit.data.field.handler.core.SimpleFieldComponentHandlerA specification of a vertical level or layer.
- COMPONENT_CLS¶
- COMPONENT_MAKER = None¶
- KEYS = ()¶
- NAME = 'proc'¶
- check(owner)¶
Default check implementation.
- classmethod create_empty()¶
- dump(owner, name, result, prefix_keys=False)¶
Populate the namespace dictionary for this SpecFieldComponent.
- classmethod from_any(data, dict_kwargs=None)¶
Create a SimpleFieldComponent object from any input.
- Parameters:
data (
Any) – The input data from which to create the SimpleFieldComponent instance.dict_kwargs (
dict, optional) – Additional keyword arguments to be passed when creating the instance from a dictionary.
- Returns:
An instance of SimpleFieldComponentHandler. If the input is already an instance of SimpleFieldComponentHandler, it is returned as is. Otherwise, it is assumed to be a component object and a new SimpleFieldComponentHandler instance is created from it.
- Return type:
SimpleFieldComponentHandler
- classmethod from_component(component)¶
Create a SimpleFieldComponent object from a component object.
- classmethod from_dict(d, **kwargs)¶
Create a SimpleFieldComponent object from a dictionary.
- get(key, default=None, *, astype=None, raise_on_missing=False)¶
Return the value for
key.- Parameters:
key (
str) – Keydefault (
value) – Specify the default value forkey. Returned whenkeyis not found or its value is a missing value and raise_on_missing isFalse.astype (
type as str,intorfloat) – Return/access type forkey. When it is supportedastypeis passed to the underlying accessor as an option. Otherwise the value is cast toastypeafter it is taken from the accessor.raise_on_missing (
bool) – When it is True raises an exception ifkeyis not found or it has a missing value.
- Returns:
Returns the
keyvalue. Returnsdefaultifkeyis not found or it has a missing value andraise_on_missingis False.- Return type:
value- Raises:
KeyError – If
raise_on_missingis True andkeyis not found or it has a missing value.
- get_grib_context(context)¶
Populate the GRIB context dictionary for this FieldComponent.
- set(*args, **kwargs)¶
Create a new SimpleFieldComponentHandler instance with updated component data.