wradlib.georef.polar.spherical_to_xyz(r, phi, theta, site, *, re=None, ke=1.3333333333333333, **kwargs)[source]#
wradlib.georef.polar.spherical_to_xyz(obj: DataArray, **kwargs)
wradlib.georef.polar.spherical_to_xyz(obj: Dataset, **kwargs)

Transforms spherical coordinates (r, phi, theta) to cartesian coordinates (x, y, z) centered at site (aeqd).

It takes the shortening of the great circle distance with increasing elevation angle as well as the resulting increase in height into account.

  • r (numpy.ndarray) – Contains the radial distances in meters.

  • phi (numpy.ndarray) – Contains the azimuthal angles in degree.

  • theta (numpy.ndarray) – Contains the elevation angles in degree.

  • site (sequence) – the lon / lat / alt coordinates of the radar location and its altitude a.m.s.l. (in meters)

  • re (float, optional) – earth’s radius [m], defaults to None (calculating from given latitude).

  • ke (float, optional) – adjustment factor to account for the refractivity gradient that affects radar beam propagation. In principle this is wavelength- dependend. The default of 4/3 is a good approximation for most weather radar wavelengths.

Keyword Arguments:
  • squeeze (bool, optional) – If True, returns squeezed array. Defaults to False.

  • strict_dims (bool, optional) – If True, generates output of (theta, phi, r, 3) in any case. If False, dimensions with same length are “merged”. Defaults to False.