uxarray.grid.coordinates._xyz_to_lonlat_rad

uxarray.grid.coordinates._xyz_to_lonlat_rad#

uxarray.grid.coordinates._xyz_to_lonlat_rad(x, y, z, normalize=True)#

Converts Cartesian x, y, z coordinates in Spherical latitude and longitude coordinates in degrees.

Parameters:
  • x (Union[np.ndarray, float]) – Cartesian x coordinates

  • y (Union[np.ndarray, float]) – Cartesiain y coordinates

  • z (Union[np.ndarray, float]) – Cartesian z coordinates

  • normalize (bool) – Flag to select whether to normalize the coordinates

Returns:

  • lon (Union[np.ndarray, float]) – Longitude in radians

  • lat (Union[np.ndarray, float]) – Latitude in radians