Earth
Gravitational Model
Fortran and CCodes for Higher Order and
Degree Geopotential and Derivatives Computation
Hélio
Koiti Kuga (INPE)
Valdemir Carrara (INPE)
These Fortran and C
libraries compute the Earth gravity with high order and degree. This paper
describes the software implementation for higher order and degree
geopotential and derivatives computation. It includes test and
application cases.


Fortran
source codes
Fortran source codes
including example of utilization with a truncated
EGM2008 model. The Fortran code uses the parameters of the geopotential
model: Ae, GM, C(n,m), S(n,m) as local variables, which are in the
calling parameters of the subroutine computing the geopotential.
Besides C and S are twodimensional arrays so care must be taken with
the declaration of their sizes in the main program (recall that Fortran
stores matrix columnswise). We prefer to keep the twodimensional
array for the sake of readability of code. However, The user can modify
(at his will) the program to store C(n,m) and S(n,m) as onedimensional
arrays (see C sourcecodes) and save some memory storage. The following
Fortransource codes together with test case are available:
 Download the Geopotential Fortran codes
(zip file).
 Download the Geopotential Acceleration
Fortran codes (zip file): Besides the geopotential acceleration,
the subroutine "Leg_ForCol_Ac" can be modified to compute jointly the
geopotential value, by supressing the comments character "!" related to
variable "Omega", and including it in the calling parameters. Besides,
if only the geopotential gradient in spherical coordinates is desired,
it is explicit in the final lines of subroutine "Leg_ForCol_Ac" as "Vl,
Vf, Vr" (Partial derivatives of geopotential wrt longitude, colatitude,
radius), just before converting them to cartesian coordinates.

C
source codes
The AnsiC source
codes include an example of utilization with a truncated EGM2008 model.
These codes use the parameters of the geopotential model Ae, GM,
C(n,m), S(n,m) as global variables. Thus they weren't included in the
calling parameters of the procedure that computes the geopotential, and
must be loaded beforehand. Besides, C(n,m) and S(n,m) are loaded as
onedimensional arrays. Users should use the same strategy to load any
other geopotential model, when using the C procedures. The following
Csource codes together with test case are available:
 Download the Geopotential
C codes
 Donwload the Geopotential Acceleration C
codes: Besides the geopotential acceleration, the void procedure
"leg_forcol_ac" can be modified to compute jointly the geopotential
value, by supressing the comments character "//" related to variable
"omega", or including it in the calling parameters if desired. If only
the geopotential gradient in spherical coordinates is desired, it is
explicit in the final lines of void procedure "leg_forcol_ac" as "vl,
vf, vr" (Partial derivatives of geopotential wrt longitude, colatitude,
radius), just before converting them to cartesian coordinates.

Remarks
 The correction of original EGM 2008 values for time
drift of harmonic coefficients (see IERS conventions 2010, TN36,
Chapter 6) is up to the user.
 For test purposes, only a truncated (to order/degree
10) version of EGM 2008 ("EGM2008_ZeroTide_Truncated.dat") is provided
together with source codes. The full (and heavy: more than 200MBytes)
EGM 2008 or other models can be downloaded
by the user at NGA.
 The original
paper published by SBSR in 2013 was replaced here by a corrected version.
 Email me for suggestions and questions.

Valdemir Carrara, Feb 2023
©Copyright:
Carrara, V.
2023
Contact:
