Skip to content

Commit

Permalink
docs: update usage
Browse files Browse the repository at this point in the history
  • Loading branch information
JPXKQX committed Aug 21, 2024
1 parent 0410996 commit 73b8395
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 13 deletions.
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ of the *Anemoi* packages.
- :doc:`graphs/node_attributes`
- :doc:`graphs/edges`
- :doc:`graphs/edge_attributes`
- :doc:`graphs/masks`

.. toctree::
:maxdepth: 1
Expand All @@ -51,7 +50,6 @@ of the *Anemoi* packages.
graphs/node_attributes
graphs/edges
graphs/edge_attributes
graphs/masks

*********
Modules
Expand All @@ -63,6 +61,7 @@ of the *Anemoi* packages.
- :doc:`modules/edge_attributes`
- :doc:`modules/graph_creator`
- :doc:`modules/graph_inspector`
- :doc:`modules/masks`

.. toctree::
:maxdepth: 1
Expand All @@ -75,14 +74,15 @@ of the *Anemoi* packages.
modules/edge_attributes
modules/graph_creator
modules/graph_inspector
modules/masks

*******************
Command line tool
*******************

- :doc:`cli/introduction`
- :doc:`cli/create`
- :doc:`cli/inspect`
- :doc:`cli/describe`
- :doc:`cli/inspect`

.. toctree::
Expand Down
32 changes: 22 additions & 10 deletions docs/usage/limited_area.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,33 @@
Anemoi Graphs brings another level of flexibility to the user by
allowing the definition of limited area graphs.

*****************************************
Define hidden nodes in area of interest
*****************************************

The user can use a regional dataset to define the `data` nodes over the
region of interest. Then, it can define the hidden nodes only over the
region of interest using any of the ``LimitedArea_____Nodes`` classes.

.. literalinclude:: yaml/lam_nodes_wo_boundary.yaml
:language: yaml

************************************************
Cut out regional dataset into a global dataset
************************************************

In this case, the user can use 2 datasets to build the data nodes
combining nodes from the LAM dataset and the global dataset (as boundary
forcings). The class `CutOutZarrDatasetNodes` allows this functionality:
In this case, the user may want to include boundary forcings to the
region of interest. Anemoi Graphs allows the user to use 2 datasets to
build the `data` nodes, combining nodes from the LAM dataset and the
global dataset (as boundary forcings). The class
``CutOutZarrDatasetNodes`` allows this functionality:

.. literalinclude:: yaml/cutout_zarr.yaml
:language: yaml

The `CutOutZarrDatasetNodes` supports an optional `thinning` argument
which can be used to sampling points from the regional dataset to reduce
computation during development stage.
The ``CutOutZarrDatasetNodes`` supports an optional ``thinning``
argument which can be used to sampling points from the regional dataset
to reduce computation during development stage.

In addition, this node builder class will create an additional node
attribute with a mask showing which node correspond to each of the 2
Expand All @@ -42,10 +55,9 @@ datasets.
Define hidden nodes over region of interest
*********************************************

Once the ``data`` nodes are defined, the user can define the hidden
nodes only over the region of interest. In this case, the area of
interest is defined by the ``data`` nodes masked by the ``cutout``
attribute.
Once the `data` nodes are defined, the user can define the hidden nodes
only over the region of interest. In this case, the area of interest is
defined by the `data` nodes masked by the ``cutout`` attribute.

.. literalinclude:: yaml/limited_area_nodes.yaml
:language: yaml
Expand Down
14 changes: 14 additions & 0 deletions docs/usage/yaml/lam_nodes_wo_boundary.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
nodes:
data:
node_builder:
_target_: anemoi.graphs.nodes.CutOutZarrDatasetNodes
dataset: /path/to/regional-dataset.zarr
attributes: ...
hidden:
node_builder:
_target_: anemoi.graphs.nodes.LimitedAreaTriNodes
resolution: 5
reference_node_name: data
attributes: ...

edges: ...

0 comments on commit 73b8395

Please sign in to comment.