radarx.grid.grid.make_3d_grid#

radarx.grid.grid.make_3d_grid(obj, x_lim=(-200000.0, 200000.0), y_lim=(-200000.0, 200000.0), x_step=1000, y_step=1000, z_lim=(0, 10000.0), z_step=250)[source]#

Generate a 3D Cartesian grid and transform its coordinates to geographic latitude, longitude, and altitude using the dataset’s CRS.

Parameters:
  • obj (xarray.Dataset) – Radar dataset with Cartesian coordinates.

  • x_lim (tuple of float, optional) – The range of x-coords (m) in Cartesian space. Default is (-200e3, 200e3).

  • y_lim (tuple of float, optional) – The range of y-coords (m) in Cartesian space. Default is (-200e3, 200e3).

  • x_step (int, optional) – Step size (m) for x-coordinates. Default is 1000.

  • y_step (int, optional) – Step size (meters) for y-coordinates. Default is 1000.

  • z_lim (tuple of float, optional) – The range of z-coords (m) in Cartesian space. Default is (0, 10e3).

  • z_step (int, optional) – Step size (meters) for z-coordinates. Default is 250.

Returns:

tuple –

latnumpy.ndarray

Latitude values of the transformed grid.

lonnumpy.ndarray

Longitude values of the transformed grid.

xnumpy.ndarray

Cartesian x-coordinates (meters).

ynumpy.ndarray

Cartesian y-coordinates (meters).

znumpy.ndarray

Cartesian z-coordinates (meters, altitude).

trg_crspyproj.CRS

Target geographic coordinate reference system (CRS).

Notes

  • The function uses the Azimuthal Equidistant projection (AEQD) defined in the radar dataset.

  • lon is the longitude along y = 0 and lat the latitude along x = 0, so the two axes may have different lengths. Because meridians converge, these axes are not the lon/lat of every cell; the cell-wise values are 2-D (grid_radar(method="barnes") returns them).

  • The transformation ensures compatibility between Cartesian and geographic coordinates.

  • This function assumes the dataset is compatible with xradar and has a valid CRS.

  • The defaults (+-200 km, 1 km, 0 to 10 km at 250 m) are radarx choices, not taken from a publication.

  • The azimuthal equidistant projection and its WGS84 inverse are provided by PROJ (through pyproj); no published method is implemented here.