Processing (proc) component¶
Every Field may carry a processing component (proc)
that describes post-processing operations applied to produce the field. The processing component
is accessible via the proc attribute of a field and is represented by a subclass of
ProcBase.
Fields that carry no processing information have an
EmptyProc component where all keys
return None.
Note
The proc component interface is still under active development. Its final form
is not yet fully defined, and breaking changes may occur in future releases.
>>> import earthkit.data as ekd
>>> field = ekd.from_source("file", "lsp_step_range.grib2").to_fieldlist()[0]
>>> field.proc.time_method()
accum
>>> field.proc.time_value()
datetime.timedelta(seconds=259200)
>>> field.get("proc.time_method")
accum
Processing items¶
The processing component stores a list of
ProcItem instances. Currently the only
supported item type is
TimeProcItem, which pairs a time-span value
with a processing method.
Time processing methods¶
Enum member |
Name string |
Description |
|---|---|---|
|
|
Field values represent an accumulation over the time span (e.g. precipitation totals). |
|
|
Field values represent a time average over the time span. |
|
|
Field values are instantaneous (no time averaging or accumulation). |
|
|
Field values represent the maximum over the time span. |
Accessing processing information¶
All proc keys are accessible through get() with the
"proc." prefix, and can therefore be used in
sel(),
order_by(), and
metadata().
Key |
Description |
|---|---|
|
The first |
|
The time-span value from the first time processing item as a |
|
The processing method from the first time processing item as a
|