earthkit.data.field.xarray.ensemble¶
Classes¶
Ensemble component handler of a field. |
Functions¶
|
|
|
Module Contents¶
- class earthkit.data.field.xarray.ensemble.XArrayEnsemble(owner, selection)¶
Bases:
earthkit.data.field.handler.ensemble.EnsembleFieldComponentHandlerEnsemble component handler of a field.
- COMPONENT_CLS¶
- COMPONENT_MAKER¶
- KEYS = ()¶
- NAME = 'ensemble'¶
- 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.
- owner¶
- selection¶
- set(*args, **kwargs)¶
Create a new SimpleFieldComponentHandler instance with updated component data.
- earthkit.data.field.xarray.ensemble.from_xarray(owner, selection)¶
- earthkit.data.field.xarray.ensemble.get_member(coord, selection)¶