diff --git a/CHANGELOG.md b/CHANGELOG.md index e1bbd55c..d6e664c2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,8 @@ Keep it human-readable, your future self will thank you! - Introduction of remapper to anemoi-models leads to changes in the data indices. Some preprocessors cannot be applied in-place anymore. +- Variable Bounding as configurable model layers [#13](https://github.com/ecmwf/anemoi-models/issues/13) + #### Functionality - Enable the callback for plotting a histogram for variables containing NaNs diff --git a/src/anemoi/training/config/data/zarr.yaml b/src/anemoi/training/config/data/zarr.yaml index 1657861f..efede712 100644 --- a/src/anemoi/training/config/data/zarr.yaml +++ b/src/anemoi/training/config/data/zarr.yaml @@ -30,6 +30,11 @@ remapped: normalizer: default: "mean-std" + remap: + cp: tp + std: + - "tp" + - "cp" min-max: max: - "sdor" diff --git a/src/anemoi/training/config/model/gnn.yaml b/src/anemoi/training/config/model/gnn.yaml index a01bf860..b3b5993e 100644 --- a/src/anemoi/training/config/model/gnn.yaml +++ b/src/anemoi/training/config/model/gnn.yaml @@ -46,3 +46,15 @@ attributes: nodes: [] node_loss_weight: area_weight + +# Bounding configuration +bounding: #These are applied in order + - _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity) + variables: + - tp + - _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp + variables: + - cp + min_val: 0 + max_val: 1 + total_var: tp diff --git a/src/anemoi/training/config/model/graphtransformer.yaml b/src/anemoi/training/config/model/graphtransformer.yaml index 610de803..6ed7686c 100644 --- a/src/anemoi/training/config/model/graphtransformer.yaml +++ b/src/anemoi/training/config/model/graphtransformer.yaml @@ -51,3 +51,15 @@ attributes: nodes: [] node_loss_weight: area_weight + +# Bounding configuration +bounding: #These are applied in order + - _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity) + variables: + - tp + - _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp + variables: + - cp + min_val: 0 + max_val: 1 + total_var: tp diff --git a/src/anemoi/training/config/model/transformer.yaml b/src/anemoi/training/config/model/transformer.yaml index 7c490990..02ca37ca 100644 --- a/src/anemoi/training/config/model/transformer.yaml +++ b/src/anemoi/training/config/model/transformer.yaml @@ -50,3 +50,15 @@ attributes: nodes: [] node_loss_weight: area_weight + +# Bounding configuration +bounding: #These are applied in order + - _target_: anemoi.models.layers.bounding.ReluBounding #[0, infinity) + variables: + - tp + - _target_: anemoi.models.layers.bounding.FractionBounding # fraction of tp + variables: + - cp + min_val: 0 + max_val: 1 + total_var: tp