grid_deltas_from_dataarray

metpy.calc.grid_deltas_from_dataarray(f)[source]

Calculate the horizontal deltas between grid points of a DataArray.

Calculate the signed delta distance between grid points of a DataArray in the horizontal directions, whether the grid is lat/lon or x/y.

Parameters:f (xarray.DataArray) – Parsed DataArray on a latitude/longitude grid, in (…, lat, lon) or (…, y, x) dimension order
Returns:dx, dy – arrays of signed deltas between grid points in the x and y directions with dimensions matching those of f.

Examples using metpy.calc.grid_deltas_from_dataarray