nominal_grid_spacing#

rojak.core.derivatives.nominal_grid_spacing(latitude, longitude, units, geod=None)[source]#

Estimate the grid spacing of a regular latitude/longitude grid from a single row and column

Unlike grid_spacing(), this does not compute the distance at every grid point: dx is the geodesic distance between adjacent longitude values along the equator, and dy is the geodesic distance between adjacent latitude values along the prime meridian. This is cheaper than grid_spacing() but only an approximation away from the equator/meridian.

Parameters:
  • latitude (NDArray | DataArray) – 1D array of latitude coordinates

  • longitude (NDArray | DataArray) – 1D array of longitude coordinates

  • units (LatLonUnits) – Units latitude/longitude are expressed in

  • geod (Geod | None) – Geodesic to compute distances with. Defaults to a WGS84 ellipsoid.

Returns:

Nominal grid spacing (in meters) along each Cartesian direction

Raises:

ValueError – If latitude or longitude is not 1D

Return type:

GridSpacing