Skip to content

Add reduce source for arbitrary temporal reductions #567

@frazane

Description

@frazane

Problem:
The current accumulate source in anemoi-datasets covers the specific case of temporally accumulated fields very well, with a sophisticated logic to determine covering intervals required to compute a target accumulation. However, there is no equivalent source for other temporal reductions, such as mean, max/min, std, etc. Users might need a way to apply other common temporal reductions declaratively in dataset recipes. Concretely, we would currently need this to compute hourly maxima of wind (i.e. wind gust) starting from 10min maxima.

Proposal
Add a new reduce source (or generalise accumulate) to support arbitrary reductions. The interface should mirror accumulate:

input:
  reduce:
    source: {mars: ...}
    period: 6h
    operation: mean  # or max, min, sum, std, etc.
    availability: ...

Importantly, this new source would reuse much of the interval-handling machinery already implemented for the accumulate source.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    To be triaged

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions