chaosmagpy.coordinate_utils.gg_to_geo

chaosmagpy.coordinate_utils.gg_to_geo(height, beta, X=None, Z=None)[source]

Compute spherical geographic coordinates and components from geodetic coordinates and components as defined by the World Geodetic System 1984 (WGS84).

The equatorial and polar radius of the ellipsoid that approximates Earth’s surface are stored in chaosmagpy.basicConfig['params.ellipsoid'].

Parameters:
heightndarray, shape (…)

Altitude in kilometers.

betandarray, shape (…)

Geodetic colatitude

Xndarray, shape (…), optional

Geodetic northward vector component.

Zndarray, shape (…), optional

Geodetic downward vector component.

Returns:
radiusndarray, shape (…)

Radius in kilometers.

thetandarray, shape (…)

Geocentric colatitude in degrees.

B_radiusndarray, shape (…), optional

Radially upward vector component (only returned if X and Z are provided).

B_thetandarray, shape (…), optional

Spherical southward vector component (only returned if X and Z are provided).

References

The coordinate transformations are taken from Equations (51)-(53) in “The main field” (chapter 4) by Langel, R. A. in: “Geomagnetism”, Volume 1, Jacobs, J. A., Academic Press, 1987. The vector rotation is taken from Equation (4) in “5.02 - The Present and Future Geomagnetic Field” by Hulot et al. in: Treatise on Geophysics, Elsevier, 2015.