radarx.grid.grid.make_3d_grid#

radarx.grid.grid.make_3d_grid(ds, 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:
  • ds (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. - The transformation ensures compatibility between Cartesian and geographic coordinates. - This function assumes the dataset is compatible with xradar and has a valid CRS.