Limited Area Modeling (LAM)
Anemoi Graphs brings another level of flexibility to the user by allowing the definition of limited area graphs.
Cut out regional dataset into a global dataset
In this case, the user may want to include boundary forcings to the
region of interest. AnemoI Graphs allows the user to use two datasets to
build the data nodes, combining nodes from the LAM dataset and the
global dataset (as boundary forcings). The class AnemoiDatasetNodes
allows this functionality:
The AnemoiDatasetNodes supports an optional thinning argument
which can be used to sampling points from the regional dataset to reduce
computation during development stage. In addition, the max_distance_km
arguments can be used to avoid loading (global) grid points that are far
from the area of interest, which helps reduce memory usage. To this aim,
you want to specify a value for max_distance_km that is large enough
to include all the boundary nodes connected. You should consider at least
the margin_radius_km (from the LimitedAreaTriNodes) and the
connectivity of your encoding edges.
In addition, this node builder class will create an additional node attribute with a mask showing which node correspond to each of the two datasets.
>>> graph
HeteroData(
data={
x=[40320, 2],
node_type='AnemoiDatasetNodes',
area_weight=[40320, 1],
cutout_mask=[40320, 1],
}
)
Adding edges
The user may define the edges using the same configuration as for the global graphs.
nodes:
data: ...
hidden: ...
edges:
# A) Encoder connections
- source_name: data
target_name: hidden
edge_builders:
- _target_: anemoi.graphs.edges.CutOffEdges
cutoff_factor: 0.7
# B) Decoder connections
- source_name: hidden
target_name: data
target_mask_attr_name: cutout
edge_builders:
- _target_: anemoi.graphs.edges.KNNEdges
num_nearest_neighbours: 3
# C) Processor connections
- source_name: hidden
target_name: hidden
edge_builders:
- _target_: anemoi.graphs.edges.MultiScaleEdges
x_hops: 1