The Accumulate post-processor (accumulate_from_start_of_forecast) correctly accumulates fields from zero, but never emits a step 0 field. The accumulator is initialised to zeros implicitly on the first forecast step, so the initial condition (accumulation = 0 at t=0) is never included in the output state.
As a consequence, downstream consumers that need to de-accumulate the output (i.e. convert cumulative-from-start to per-step accumulations via differencing) require step 0 as a reference point. Without it they must either:
- synthesise a zero-valued step 0 themselves (requiring knowledge of this implementation detail), or
- silently drop the first accumulation window.
The expected behaviour should be thta when accumulate_from_start_of_forecast is active, a step 0 field with value 0 everywhere should be present in the output, consistent with the physical meaning that no accumulation has occurred at the initial condition.
One possible solution could be to emit a zero-valued field at step=0 for each variable in self.accumulations before the first process() call.
The
Accumulatepost-processor (accumulate_from_start_of_forecast) correctly accumulates fields from zero, but never emits a step 0 field. The accumulator is initialised to zeros implicitly on the first forecast step, so the initial condition (accumulation = 0 at t=0) is never included in the output state.As a consequence, downstream consumers that need to de-accumulate the output (i.e. convert cumulative-from-start to per-step accumulations via differencing) require step 0 as a reference point. Without it they must either:
The expected behaviour should be thta when
accumulate_from_start_of_forecastis active, a step 0 field with value 0 everywhere should be present in the output, consistent with the physical meaning that no accumulation has occurred at the initial condition.One possible solution could be to emit a zero-valued field at
step=0for each variable inself.accumulationsbefore the firstprocess()call.