Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support ReducedGaussianGridNodes #54

Merged
merged 21 commits into from
Feb 4, 2025

Conversation

JPXKQX
Copy link
Member

@JPXKQX JPXKQX commented Dec 30, 2024

This PR implements a new class, ReducedGaussianGridNodes. In addition, theNPZFileNodes class has been refactored to support any type of NPZ file.

nodes:
  hidden:
    node_builder:
      _target_: anemoi.graphs.nodes.ReducedGaussianGridNodes
      grid: o96

These reduced Gaussian grids are read from NPZ files. Only a subset of these are available: n320, o16, o32, o48, o96, o160, o256, o320, o1280. Please contact the administrators if you would like new reduced Gaussian grids to be added.

This PR is ready to be merged when a new version of anemoi-utils is released:


📚 Documentation preview 📚: https://anemoi-training--54.org.readthedocs.build/en/54/


📚 Documentation preview 📚: https://anemoi-graphs--54.org.readthedocs.build/en/54/


📚 Documentation preview 📚: https://anemoi-models--54.org.readthedocs.build/en/54/

@JPXKQX JPXKQX added enhancement New feature or request graphs labels Dec 30, 2024
@JPXKQX JPXKQX self-assigned this Dec 30, 2024
@JPXKQX JPXKQX marked this pull request as ready for review December 31, 2024 11:20
@JPXKQX JPXKQX requested a review from floriankrb January 21, 2025 15:18
@Rilwan-Adewoyin
Copy link
Member

Hi @JPXKQX looks really great, maybe I've missed something but, I think you need to add
from .builders.from_reduced_gaussian import ReducedGaussianGridNodes
to the graphs/src/anemoi/graphs/nodes/init.py file and ReducedGaussianGridNodes to the __all__ list

@floriankrb
Copy link
Member

I couldn't figure out for a quick look at the code. Are you using anemoi-utils's grids ? https://github.com/ecmwf/anemoi-utils/blob/75d3bd9be151fcff7903b263828ee681696e7a70/src/anemoi/utils/grids.py#L91

@JPXKQX
Copy link
Member Author

JPXKQX commented Feb 3, 2025

I couldn't figure out for a quick look at the code. Are you using anemoi-utils's grids ? https://github.com/ecmwf/anemoi-utils/blob/75d3bd9be151fcff7903b263828ee681696e7a70/src/anemoi/utils/grids.py#L91

Yes, the main class that implements the functionality is here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request graphs
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants