Skip to content
This repository was archived by the owner on Dec 20, 2024. It is now read-only.

Graph customization#93

Merged
JPXKQX merged 11 commits intoecmwf:developfrom
MeteoSwiss:feature/txtnodes
Dec 11, 2024
Merged

Graph customization#93
JPXKQX merged 11 commits intoecmwf:developfrom
MeteoSwiss:feature/txtnodes

Conversation

@OpheliaMiralles
Copy link
Copy Markdown
Contributor

This PR adds:

  • the flexibility to provide lon/lat coordinates from a text file (loaded with numpy loadtxt method) to build the graph;
  • the flexibility to build 2D "flat" graphs with Voronoi in case SphericalVoronoi does not work well/is an overkill (e.g. in Switzerland, the effect of the spherical aspect of the Earth is minimal and SphericalVoronoi does not work so well for high resolution graphs, see previous PR/Issue). If flat is provided in the nodes attributes, the area weight is computed using Voronoi with specific qhull options "QJ Pp" preventing the empty region creation.
  nodes:
    area_weight:
      _target_: anemoi.graphs.nodes.attributes.AreaWeights # options: Area, Uniform
      norm: unit-max # options: l1, l2, unit-max, unit-sum, unit-std
      flat: true

Copy link
Copy Markdown
Member

@JPXKQX JPXKQX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution Ophélia! I think this new flat=True should be the new default for the area_weight in LAM. I just left some minor comments to address and I would be very happy to approve this.

Copy link
Copy Markdown
Member

@JPXKQX JPXKQX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! This looks good to me. Would you mind updating the tests and the changelog to pass all the CI checks?

@OpheliaMiralles OpheliaMiralles self-assigned this Dec 6, 2024
Copy link
Copy Markdown
Member

@JPXKQX JPXKQX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Great work!

@JPXKQX JPXKQX merged commit 3898f6f into ecmwf:develop Dec 11, 2024
@JPXKQX JPXKQX mentioned this pull request Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants