Skip to content

accumulate_from_start_of_forecast does not emit step 0 in its output #545

Description

@dnerini

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.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status
Now In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions