Ensemble component and metadata keys¶
Every Field may carry an ensemble component that
identifies which ensemble member the field belongs to. The ensemble component is accessible
via the ensemble attribute of a field and is represented by a subclass of
EnsembleBase.
Fields from deterministic (non-ensemble) data have an
EmptyEnsemble component where
member() returns None.
>>> import earthkit.data as ekd
>>> field = ekd.from_source("sample", "ens_cf_pf.grib").to_fieldlist()[2]
>>> field.ensemble.member()
'1'
>>> field.get("ensemble.member")
'1'
The ensemble component is immutable. Use the
set() method (or
set() on the field) to derive a modified copy:
>>> new_field = field.set({"ensemble.member": "5"})
>>> new_field.ensemble.member()
'5'
Member representation¶
The member value is stored internally as a string. Integer values passed during construction
or via set() are converted automatically. None represents the absence of an
ensemble member (deterministic data).
List of ensemble metadata keys¶
Key |
Description |
|---|---|
|
Ensemble member identifier as a string, or |
|
Alias of |
|
Alias of |