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 Fieldset by subtracting each field from the next one.

Parameters
  • fs (Fieldset) – input fieldset

  • key – if it is None or empty the de-accumulation is performed by subtracting each field from the next field in the input data. Otherwise key specifies 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 each key value 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 fs will not be added to the output. Otherwise the first field of fs will 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 Fieldset plotting. See the grib_scaling_of_derived_fields option in mcont().

Return type

Fieldset

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 use sort().