metpy.calc.
lat_lon_grid_deltas
Calculate the actual delta between grid points that are in latitude/longitude format.
longitude (array_like) – Array of longitudes defining the grid. If not a pint.Quantity, assumed to be in degrees.
pint.Quantity
latitude (array_like) – Array of latitudes defining the grid. If not a pint.Quantity, assumed to be in degrees.
x_dim (int) – axis number for the x dimension, defaults to -1.
y_dim (int) – axis number for the y dimesion, defaults to -2.
geod (pyproj.Geod or None) – PyProj Geod to use for forward azimuth and distance calculations. If None, use a default spherical ellipsoid.
pyproj.Geod
None
dx, dy – At least two dimensional arrays of signed deltas between grid points in the x and y direction
Notes
Accepts 1D, 2D, or higher arrays for latitude and longitude Assumes […, Y, X] dimension order for input and output, unless keyword arguments y_dim and x_dim are otherwise specified.
This function will only return pint.Quantity arrays (not xarray.DataArray or another array-like type). It will also “densify” your data if using Dask or lazy-loading.
xarray.DataArray
Changed in version 1.0: Changed signature from (longitude, latitude, **kwargs)
(longitude, latitude, **kwargs)