feat: General purpose clipping filter#96
Merged
Conversation
for more information, see https://pre-commit.ci
floriankrb
reviewed
May 26, 2025
Member
|
As we have "rescale" (verb) in the config, I changed the name from "clipper" (noun) to "clip" (verb) |
floriankrb
approved these changes
May 30, 2025
Member
Author
|
From @anaprietonem: The tests look good, but it would be great if either @lzampier or @floriankrb could update the input/output interface to match the ones here https://github.com/ecmwf/anemoi-transform/pull/93/files#diff-a990ae3dbc875f09016f33e9258352e6e8b5cc3fd3f7a50d2a2eef97e198e856, so trying to use the one |
anaprietonem
pushed a commit
that referenced
this pull request
Jul 14, 2025
🤖 Automated Release PR This PR was created by `release-please` to prepare the next release. Once merged: 1. A new version tag will be created 2. A GitHub release will be published 3. The changelog will be updated Changes to be included in the next release: --- ## [0.1.12](0.1.11...0.1.12) (2025-07-14) ### Features * Add orography to surface geopotential filter ([#115](#115)) ([9b7fd8d](9b7fd8d)) * Add SingleFieldFilter ([#104](#104)) ([914d1df](914d1df)) * Filter migration from anemoi-datasets + testing ([#93](#93)) ([abfb33d](abfb33d)) * General purpose clipping filter ([#96](#96)) ([f70b1ab](f70b1ab)) * Migrate sum filter ([#121](#121)) ([3b5596e](3b5596e)) * Set resolution metadata in filter operation. ([#98](#98)) ([7844fea](7844fea)) ### Bug Fixes * Docs sphinx dependency python>=3.11 ([#116](#116)) ([29f6290](29f6290)) * Fixed typo in error message ([#120](#120)) ([242c836](242c836)) --- > [!IMPORTANT] > Please do not change the PR title, manifest file, or any other automatically generated content in this PR unless you understand the implications. Changes here can break the release process. >⚠️ Merging this PR will: > - Create a new release > - Trigger deployment pipelines > - Update package versions **Before merging:** - Ensure all tests pass - Review the changelog carefully - Get required approvals [Release-please documentation](https://github.com/googleapis/release-please)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This code defines a custom data filter plugin called Clipper for the Anemoi framework. The purpose of the Clipper filter is to clip (limit) the values of a specified field to a given range.
Type of Change
Issue Number
#84
Code Compatibility
Code Performance and Testing
Dependencies
Documentation
Additional Notes
This is just a first draft that works both for 2d and 3d variables. It would be nice to apply the same clipper to multiple variables at once, if the required bounding values are the same. As it is, a new clipping instance must be added for each variable to the dataset creation recipe.