wradlib.georef.rect.xyz_to_spherical(xyz, alt=0, proj=None, ke=1.3333333333333333)

Returns spherical representation (r, theta, phi) of given cartesian coordinates (x, y, z) with respect to the reference altitude (asl) considering earth’s geometry (proj).

Parameters: xyz (numpy.ndarray) – Array of shape (…, 3). Contains cartesian coordinates. alt (float) – Altitude (in meters) defaults to 0. proj (osr object) – projection of the source coordinates (aeqd) with spheroid model defaults to None. ke (float) – Adjustment factor to account for the refractivity gradient that affects radar beam propagation. In principle this is wavelength- dependent. The default of 4/3 is a good approximation for most weather radar wavelengths r (numpy.ndarray) – Array of xyz.shape. Contains the radial distances. theta (numpy.ndarray) – Array of xyz.shape. Contains the elevation angles. phi (numpy.ndarray) – Array of xyz.shape. Contains the azimuthal angles.