uxarray.grid.Grid.__init_grid_var_attrs__#

Grid.__init_grid_var_attrs__()#

Initialize attributes for directly accessing UGRID dimensions and variables.

Examples

Assuming the mesh node coordinates for longitude are stored with an input name of ‘mesh_node_x’, we store this variable name in the ds_var_names dictionary with the key ‘Mesh2_node_x’. In order to access it, we do:

>>> x = grid.ds[grid.ds_var_names["Mesh2_node_x"]]

With the help of this function, we can directly access it through the use of a standardized name based on the UGRID conventions

>>> x = grid.Mesh2_node_x