-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: topology-based encoder/processor/decoder graphs derived from an ICON grid file. * docs: attempt to set a correct license header. * doc: changed the docstring style to the Numpy-style instead of Google-style. * refactor: changed variable name `verts` into `vertices`. * fix: changed float division to double slash operator. * refactor: removed unnecessary `else` branch. * refactor: more descriptive variable name in for loop. * refactor: renamed variable (ignoring the minus sign of `phi`). * refactor: changed name of temporary variable. * refactor: remove unnecessary `else´branch. * refactor: added type annotation for completeness. * refactor: remove default in function argument. * refactor: change argument name to a more understandable name. * refactor: remove redundant code. * refactor: more Pythonic if-else statement. * refactor: more Pythonic if-else statement. * refactor: use more appropriate `LOGGER.debug` instead of verbosity flag. * refactor: more appropriate variable name. * refactor: more appropriate variable name. * refactor: unified the three ICON Edgebuilders and the two Nodebuilders. * refactor: more verbose but also clearer names for variables in mesh construction algorithm. * remove: removed obsolete function `set_constant_edge_id`. * refactor: replaced the sequential ID counter by a UUID. * revert change of copyright notice * [fix] add encoder & processor edges to the __all__ variable * [refactor] move auxiliary functions to utils.py in graphs/generate/ * [doc] added empty torso for class documentation. * [fix] fixed interfaces (masks). * [refactor] remove edge attribute calculation from this PR. * [chore] adjust copyright notice. * [doc] elaborate on icon mesh classes in rst file. * Add Icon tests * update Change log * Add __future__ annotations * fix change log --------- Co-authored-by: Marek Jacob <[email protected]> Co-authored-by: Florian Prill <[email protected]>
- Loading branch information
1 parent
30f039f
commit 6cfcade
Showing
10 changed files
with
968 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
#################################### | ||
Triangular Mesh with ICON Topology | ||
#################################### | ||
|
||
The classes `ICONMultimeshNodes` and `ICONCellGridNodes` define node | ||
sets based on an ICON icosahedral mesh: | ||
|
||
- class `ICONCellGridNodes`: data grid, representing cell circumcenters | ||
- class `ICONMultimeshNodes`: hidden mesh, representing the vertices of | ||
a grid hierarchy | ||
|
||
Both classes, together with the corresponding edge builders | ||
|
||
- class `ICONTopologicalProcessorEdges` | ||
- class `ICONTopologicalEncoderEdges` | ||
- class `ICONTopologicalDecoderEdges` | ||
|
||
are based on the mesh hierarchy that is reconstructed from an ICON mesh | ||
file in NetCDF format, making use of the `refinement_level_v` and | ||
`refinement_level_c` property contained therein. | ||
|
||
- `refinement_level_v[vertex] = 0,1,2, ...`, | ||
where 0 denotes the vertices of the base grid, ie. the icosahedron | ||
including the step of root subdivision RXXB00. | ||
|
||
- `refinement_level_c[cell]`: cell refinement level index such that | ||
value 0 denotes the cells of the base grid, ie. the icosahedron | ||
including the step of root subdivision RXXB00. | ||
|
||
To avoid multiple runs of the reconstruction algorithm, a separate | ||
`ICONNodes` instance is created and used by the builders, see the | ||
following YAML example: | ||
|
||
.. code:: yaml | ||
nodes: | ||
# ICON mesh | ||
icon_mesh: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.ICONNodes | ||
name: "icon_grid_0026_R03B07_G" | ||
grid_filename: "icon_grid_0026_R03B07_G.nc" | ||
max_level_multimesh: 3 | ||
max_level_dataset: 3 | ||
# Data nodes | ||
data: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.ICONCellGridNodes | ||
icon_mesh: "icon_mesh" | ||
attributes: ${graph.attributes.nodes} | ||
# Hidden nodes | ||
hidden: | ||
node_builder: | ||
_target_: anemoi.graphs.nodes.ICONMultimeshNodes | ||
icon_mesh: "icon_mesh" | ||
edges: | ||
# Processor configuration | ||
- source_name: ${graph.hidden} | ||
target_name: ${graph.hidden} | ||
edge_builder: | ||
_target_: anemoi.graphs.edges.ICONTopologicalProcessorEdges | ||
icon_mesh: "icon_mesh" | ||
attributes: ${graph.attributes.edges} |
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.