deacc
- deacc(fs, key=None, skip_first=False, mark_derived=True)
- Fieldset.deacc(key=None, skip_first=False, mark_derived=True)
New in metview-python version 1.10.0.
De-accumulates the values in a
Fieldsetby subtracting each field from the next one.- Parameters
fs (
Fieldset) – input fieldsetkey – if it is None or empty the de-accumulation is performed by subtracting each field from the next field in the input data. Otherwise
keyspecifies the ecCodes key to group the fields by for de-accumulation. In this case the input data must contain the same number of fields for eachkeyvalue and the subtraction is performed by subtracting each field in a given group from the corresponding field in the next group.skip_first (bool) – when it is True the first field in
fswill not be added to the output. Otherwise the first field offswill be the first field of the output with all its values set to zero.mark_derived (bool) – mark the resulting fields as “derived”. This piece of information is used for value scaling in
Fieldsetplotting. See thegrib_scaling_of_derived_fieldsoption inmcont().
- Return type
deacc()performs no sorting at all and assumes that all the input fields are already in the required order. To sort the input data you can usesort().