Skip to content

feat: Add mask per param filter#249

Closed
HCookie wants to merge 1 commit intomainfrom
feat/add-per-variable-masking
Closed

feat: Add mask per param filter#249
HCookie wants to merge 1 commit intomainfrom
feat/add-per-variable-masking

Conversation

@HCookie
Copy link
Member

@HCookie HCookie commented Mar 12, 2026

Description

Add per param mask filter

apply_mask_to_param:
      param: sd
      path: lsm.grib
      mask_value: 0

What problem does this change solve?

Allows for masking without needing to pipe specific params, useful in inference

Additional notes

Needed for v2.0

As a contributor to the Anemoi framework, please ensure that your changes include unit tests, updates to any affected dependencies and documentation, and have been tested in a parallel setting (i.e., with multiple GPUs). As a reviewer, you are also responsible for verifying these aspects and requesting changes if they are not adequately addressed. For guidelines about those please refer to https://anemoi.readthedocs.io/en/latest/

By opening this pull request, I affirm that all authors agree to the Contributor License Agreement.

@HCookie HCookie force-pushed the feat/add-per-variable-masking branch from adcd276 to 77c164d Compare March 12, 2026 17:51
@HCookie HCookie moved this from To be triaged to Reviewers needed in Anemoi-dev Mar 12, 2026
@HCookie HCookie closed this Mar 13, 2026
@github-project-automation github-project-automation bot moved this from Reviewers needed to Done in Anemoi-dev Mar 13, 2026
aaron-hopkinson added a commit that referenced this pull request Mar 13, 2026
## Description
Converts the `apply-mask` filter to be a `SingleFieldFilter` since it
works only on a single field at a time.

##  Additional notes ##
(Makes the implementation of #249 much more straightforward)

***As a contributor to the Anemoi framework, please ensure that your
changes include unit tests, updates to any affected dependencies and
documentation, and have been tested in a parallel setting (i.e., with
multiple GPUs). As a reviewer, you are also responsible for verifying
these aspects and requesting changes if they are not adequately
addressed. For guidelines about those please refer to
https://anemoi.readthedocs.io/en/latest/***

By opening this pull request, I affirm that all authors agree to the
[Contributor License
Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)
aaron-hopkinson added a commit that referenced this pull request Mar 13, 2026
## Description
Alternative implementation of #249. Add the ability for the `apply_mask`
filter to work only on a single param.

***As a contributor to the Anemoi framework, please ensure that your
changes include unit tests, updates to any affected dependencies and
documentation, and have been tested in a parallel setting (i.e., with
multiple GPUs). As a reviewer, you are also responsible for verifying
these aspects and requesting changes if they are not adequately
addressed. For guidelines about those please refer to
https://anemoi.readthedocs.io/en/latest/***

By opening this pull request, I affirm that all authors agree to the
[Contributor License
Agreement.](https://github.com/ecmwf/codex/blob/main/Legal/contributor_license_agreement.md)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant