uxarray.grid.coordinates._populate_lonlat_coord#

uxarray.grid.coordinates._populate_lonlat_coord(grid)#

Helper function that populates the longitude and latitude and store it into the Mesh2_node_x and Mesh2_node_y. This is called when the input data has “Mesh2_node_x”, “Mesh2_node_y”, “Mesh2_node_z” in meters. Since we want “Mesh2_node_x” and “Mesh2_node_y” always have the “degree” units. For more details, please read the following.

Raises:

RuntimeError – Mesh2_node_x/y/z are not represented in the cartesian format with the unit ‘m’/’meters’ when calling this function”

Note

In the UXarray, we abide the UGRID convention and make sure the following attributes will always have its corresponding units as stated below:

Mesh2_node_x

unit: “degree_east” for longitude

Mesh2_node_y

unit: “degrees_north” for latitude

Mesh2_node_z

unit: “m”

Mesh2_node_cart_x

unit: “m”

Mesh2_node_cart_y

unit: “m”

Mesh2_node_cart_z

unit: “m”