xoa.core.grid.median_resolution_deg

xoa.core.grid.median_resolution_deg#

xoa.core.grid.median_resolution_deg(lon, lat)[source]#

Compute the median grid resolution in degrees

It uses the coordinate differences, so it handles rotated and curvilinear grids: the result is the extent in degrees spanned by a grid cell along the longitude and latitude axes.

Parameters:
  • lon (array_like(ny, nx)) – Longitudes and latitudes in degrees

  • lat (array_like(ny, nx)) – Longitudes and latitudes in degrees

Returns:

float – Maximum of the median extents along longitude and latitude, considering both grid directions.