arlmet.Grid.calculate_coords#

Grid.calculate_coords()[source]#

Grid coordinates in both projected and geographic systems.

Returns:

Coordinate variables as name -> (dims, values), ready for xr.Dataset(coords=...). Arrays are newly allocated on each call.

  • lat-lon grids: 1-D "lon" (("lon",), ...) and "lat" (("lat",), ...).

  • projected grids: 1-D "x"/"y" in meters and 2-D "lon"/"lat" with dims ("y", "x").

Return type:

dict[str, tuple[tuple[str, ...], NDArray[Any]]]