grid_deltas_from_dataarray¶
-
metpy.xarray.
grid_deltas_from_dataarray
(f, kind='default')[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, using actual (real distance) or nominal (in projection space) deltas.
- Parameters
f (
xarray.DataArray
) – Parsed DataArray (metpy_crs
coordinate must be available for kind=”actual”)kind (str) – Type of grid delta to calculate. “actual” returns true distances as calculated from longitude and latitude via lat_lon_grid_deltas. “nominal” returns horizontal differences in the data’s coordinate space, either in degrees (for lat/lon CRS) or meters (for y/x CRS). “default” behaves like “actual” for datasets with a lat/lon CRS and like “nominal” for all others. Defaults to “default”.
- Returns
dx, dy – arrays of signed deltas between grid points in the x and y directions with dimensions matching those of f.
See also
lat_lon_grid_deltas