# Support multiple datasets

## Status

<!--What is the status? -->

Proposed - 07/03/2025

## Context

<!--What is the issue that we are seeing that is motivating this decision or change?-->

The objective of this change is to support multiple datasets to enable use cases like:

- Spatial downscaling
- Temporal interpolation
- Adding observations
- Model coupling
- Complex configurations (combining a LAM with model levels & global dataset with pressure levels)
- Autoencoder


## Decision

<!--Describe the change that you are proposing.-->

- A data handler defines a dataset, an imputer and a normaliser.
  - Variables within a dataset share the same time and spatial resolution (and stream).
  - Datasets can have variables of an arbitrary type (something other than diag, prog, forcings).
- The model has a list of inputs and outputs:
  - They are lists of variables (name or type).
  - Variables come from datasets.
  - The list is as explicit as possible. Inferring one from another missing is bad.
- Output is treated independently from the input (e.g.: output grid can be different from input grid).
- The checkpoint metadata contains everything needed to describe a variable (without having to reopen the dataset).
- The model inputs and outputs and the metadata is load bearing, not the dataset.

## Scope of Change

<!--Specify which Anemoi packages/modules will be affected by this decision.-->
- anemoi-training
- anemoi-models
- anemoi-inference

## Consequences

<!--Discuss the impact of this decision, including benefits, trade-offs, and potential technical debt.-->

What becomes easier or more difficult to do because of this change?

## Alternatives Considered [Optional]

<!--List alternative solutions and why they were not chosen.-->

## References [Optional]

<!--Links to relevant discussions, documentation, or external resources.-->
