Immediate grib
immediate_grib
Strict normalization of deterministic immediate-forecast surface responses.
ImmediateField
dataclass
One validated field with ascending axes and explicit accumulation bounds.
Source code in packages/barograph-met/src/baro/met/immediate_grib.py
decode_surface_response(buf, *, field, run, valid_time, interval_seconds)
Decode a single field; cumulative precipitation still needs differencing.
Precipitation is water-equivalent millimetres (1 kg/m² = 1 mm). Statistical probabilities, percentiles and multi-range products are rejected, including probabilistic PIAF products. Gusts must be a scalar speed interval maximum.
Source code in packages/barograph-met/src/baro/met/immediate_grib.py
normalize_precipitation(current, *, interval_seconds, previous=None)
Return a native interval amount, subtracting a compatible cumulative field.
Negative counter differences below numerical tolerance are missing locally. A previous field is required only when the current interval is cumulative.