diff --git a/docs/modules/edge_attributes.rst b/docs/modules/edge_attributes.rst index da75bb3..9abb5e7 100644 --- a/docs/modules/edge_attributes.rst +++ b/docs/modules/edge_attributes.rst @@ -6,6 +6,6 @@ .. automodule:: anemoi.graphs.edges.attributes :members: - :exclude-members: BaseWeights + :exclude-members: BaseEdgeAttribute :no-undoc-members: :show-inheritance: diff --git a/docs/modules/node_builder.rst b/docs/modules/node_builder.rst index 40c8b65..9a83de5 100644 --- a/docs/modules/node_builder.rst +++ b/docs/modules/node_builder.rst @@ -6,6 +6,6 @@ .. automodule:: anemoi.graphs.nodes.builder :members: - :exclude-members: BaseNodeBuilder + :exclude-members: BaseNodeBuilder,IcosahedralNodes :no-undoc-members: :show-inheritance: diff --git a/src/anemoi/graphs/nodes/builder.py b/src/anemoi/graphs/nodes/builder.py index 2b585bc..54753c4 100644 --- a/src/anemoi/graphs/nodes/builder.py +++ b/src/anemoi/graphs/nodes/builder.py @@ -229,14 +229,52 @@ def register_attributes(self, graph: HeteroData, config: DotDict) -> HeteroData: class TriNodes(IcosahedralNodes): - """It depends on the trimesh Python library.""" + """Nodes based on iterative refinements of an icosahedron. + + It depends on the trimesh Python library. + + Attributes + ---------- + resolutions : list[int] + Refinement level of the mesh. + name : str + The name of the nodes. + + Methods + ------- + register_nodes(graph) + Register the nodes in the graph. + register_attributes(graph, config) + Register the attributes in the nodes of the graph specified. + update_graph(graph, attr_config) + Update the graph with new nodes and attributes. + """ def create_nodes(self) -> np.ndarray: return create_icosahedral_nodes(resolutions=self.resolutions) class HexNodes(IcosahedralNodes): - """It depends on the h3 Python library.""" + """Nodes based on iterative refinements of an icosahedron. + + It depends on the h3 Python library. + + Attributes + ---------- + resolutions : list[int] + Refinement level of the mesh. + name : str + The name of the nodes. + + Methods + ------- + register_nodes(graph) + Register the nodes in the graph. + register_attributes(graph, config) + Register the attributes in the nodes of the graph specified. + update_graph(graph, attr_config) + Update the graph with new nodes and attributes. + """ def create_nodes(self) -> np.ndarray: return create_hexagonal_nodes(self.resolutions) @@ -256,8 +294,6 @@ class HEALPixNodes(BaseNodeBuilder): Methods ------- - get_coordinates() - Get the lat-lon coordinates of the nodes. register_nodes(graph, name) Register the nodes in the graph. register_attributes(graph, name, config)