uxarray.grid.Grid.__init_grid_var_attrs__#

Grid.__init_grid_var_attrs__()#

Initialize attributes for directly accessing Coordinate and Data variables through ugrid conventions.

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:

>>> 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 (ugrid convention)

>>> x = grid.Mesh2_node_x