GGTOOLS
The ggtools package is an archive of scientific routines that can be used to handle the GRACE(Gravity Recovery and Climate Experiment) and GRACE-FO(Follow-on) GSM data(RL06 Level-2 monthly solutions) and GLDAS grid data.
Install / Use
/learn @lcx366/GGTOOLSREADME
Welcome to the GRACE & GLDAS Tools
The ggtools package is an archive of scientific routines that can be used to handle the GRACE(Gravity Recovery and Climate Experiment) and GRACE-FO(Follow-on) GSM data(RL06 Level-2 monthly solutions) and GLDAS grid data.
How to Install
GGTOOLS can be installed with the following two steps
conda install cartopy netcdf4 h5pypip install ggtools
How to Upgrade
GGTOOLS can be upgraded to the latest version with pip install ggtools --upgrade.
How to use
GRACE
Download static gravity models
Download static gravity models GGM05C and EIGEN-6C4 from ICGEM(International Centre for Global Earth Models). This is not a necessary step unless you want to prepare for removing the background(reference) gravity field from the GRACE GSM data later.
from ggtools.gg import static_download
for static_model in ['GGM05C','EIGEN-6C4']:
gravity_model = static_download(static_model)
print(gravity_model)
static_models/GGM05C.gfc
static_models/EIGEN-6C4.gfc
For more details, please refer to static_download?.
Check the time coverage of the GRACE GSM data
GRACE GSM data is expressed as a form of Spherical Harmonic Coefficients(SHCs) or Stokes coefficients. Before downloading the GRACE GSM data from ISDC(Information System and Data Center), it's suggested to view the time intervals for all feasible GRACE GSM data so far published by CSR(University of Texas Center for Space Research), GFZ(German Research Centre for Geosciences), and JPL(Jet Propulsion Laboratory). This is not a necessary step, but it can help to understand the outline of the data.
from ggtools.gg import print_gsm_date_coverage
for source in ['CSR','GFZ','JPL']:
print_gsm_date_coverage(source,96)
print_gsm_date_coverage(source,60)
GSM data for CSR_RL06_96 is available from 2002-04-05 to 2019-10-31
GSM data for CSR_RL06_60 is available from 2002-04-05 to 2019-10-31
GSM data for GFZ_RL06_96 is available from 2002-04-05 to 2019-10-31
GSM data for GFZ_RL06_60 is available from 2002-04-05 to 2019-10-31
GSM data for JPL_RL06_96 is available from 2002-04-04 to 2019-10-31
GSM data for JPL_RL06_60 is available from 2002-04-04 to 2019-10-31
For more details, please refer to print_gsm_date_coverage?.
Download GRACE GSM data
Download all feasible GRACE GSM data published by CSR, GFZ, and JPL so far.
from ggtools.gg import gsm_download
for source in ['CSR','GFZ','JPL']:
gsm_download(source,96)
gsm_download(source,60)
Downloading ... GSM-2_2019274-2019304_GRFO_UTCSR_BB01_0600.gz ... 226 Transfer complete
Downloading ... GSM-2_2019274-2019304_GRFO_UTCSR_BA01_0600.gz ... 226 Transfer complete
Downloading ... GSM-2_2019274-2019304_GRFO_JPLEM_BB01_0600.gz ... 226 Transfer complete
Downloading ... GSM-2_2019274-2019304_GRFO_JPLEM_BA01_0600.gz ... 226 Transfer complete
For more details, please refer to gsm_download?.
Download SLR C20 data
Download SLR C20 data(RL06 monthly solutions) published by CSR.
from ggtools.gg import slr_c20_download
slr_c20_download()
Downloading ... TN-11_C20_SLR_RL06.txt ... 226 Transfer complete
For more details, please refer to slr_c20_download?.
Read GRACE GSM data
Read all 96th-degree GRACE GSM data downloaded previously.
from ggtools.gg import read_gsm
csr_gsm = read_gsm('CSR',96)
gfz_gsm = read_gsm('GFZ',96)
jpl_gsm = read_gsm('JPL',96)
# basic information on GRACE GSM data
print(csr_gsm,'\n')
print(gfz_gsm,'\n')
print(jpl_gsm)
title = GRACE & GRACE-FO Geopotential Coefficients CSR RL06
max_degree = 96
max_order = 96
degree_order = 96
normalization = fully normalized
institution = UT-AUSTIN/CSR
processing_level = 2
product_version = RL06
time_coverage_start = 2002-04
time_coverage_end = 2019-10
solution_counts = 178
total_month_counts = 211
missing_month_counts = 33
title = GRACE & GRACE-FO Geopotential GSM Coefficients GFZ RL06
max_degree = 96
max_order = 96
degree_order = 96
normalization = fully normalized
institution = GFZ German Research Centre for Geosciences
processing_level = 2
product_version = 6.0
time_coverage_start = 2002-04
time_coverage_end = 2019-10
solution_counts = 178
total_month_counts = 211
missing_month_counts = 33
title = GRACE & GRACE-FO Geopotential Coefficients JPL RL06
max_degree = 96
max_order = 96
degree_order = 96
normalization = fully normalized
institution = NASA/JPL
processing_level = 2
product_version = 6.0
time_coverage_start = 2002-04
time_coverage_end = 2019-10
solution_counts = 169
total_month_counts = 211
missing_month_counts = 42
For more details, please refer to read_gsm? and csr_gsm?.
print(csr_gsm.summary)
print(csr_gsm.background_gravity)
print(csr_gsm.earth_gravity_param)
print(csr_gsm.permanent_tide)
print(csr_gsm.mean_equator_radius)
print(csr_gsm.missing_month,'\n')
print(gfz_gsm.background_gravity)
print(gfz_gsm.permanent_tide)
print(gfz_gsm.mean_equator_radius,'\n')
print(jpl_gsm.missing_month)
print(jpl_gsm.shc[10],'\n') # geopotential coefficients for the 10th monthly solution
print(jpl_gsm.shc_std[10]) # standard deviation in geopotential coefficients
Spherical harmonic coefficients representing an estimate of the mean gravity field of Earth during the specified timespan derived from GRACE & GRACE-FO mission measurements. These coefficients represent the full magnitude of land hydrology, ice, and solid Earth processes. Further, they represent atmospheric and oceanic processes not captured in the accompanying GAC product. The 0th and 1st degree terms are excluded from CSR level-2.
GGM05C
3.9860044150E+14 m3/s2
inclusive
6.3781363000E+06 m
['2002-06' '2002-07' '2003-06' '2011-01' '2011-06' '2012-05' '2012-10'
'2013-03' '2013-08' '2013-09' '2014-02' '2014-07' '2014-12' '2015-07'
'2015-10' '2015-11' '2016-04' '2016-09' '2016-10' '2017-02' '2017-07'
'2017-08' '2017-09' '2017-10' '2017-11' '2017-12' '2018-01' '2018-02'
'2018-03' '2018-04' '2018-05' '2018-08' '2018-09']
EIGEN-6C4
exclusive
6.3781364600E+06 m
['2002-06' '2002-07' '2003-06' '2004-07' '2004-08' '2004-09' '2004-10'
'2011-01' '2011-06' '2012-04' '2012-05' '2012-06' '2012-07' '2012-10'
'2013-03' '2013-08' '2013-09' '2014-02' '2014-07' '2014-12' '2015-01'
'2015-02' '2015-07' '2015-10' '2015-11' '2016-04' '2016-09' '2016-10'
'2017-02' '2017-07' '2017-08' '2017-09' '2017-10' '2017-11' '2017-12'
'2018-01' '2018-02' '2018-03' '2018-04' '2018-05' '2018-08' '2018-09']
[[[ 1.00000000e+00 0.00000000e+00 0.00000000e+00 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[-4.84169287e-04 -2.29490037e-10 2.43933401e-06 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
...
[ 9.37921024e-11 -8.38607258e-11 -2.33486569e-10 ... -2.26383594e-09
0.00000000e+00 0.00000000e+00]
[ 5.33299728e-10 1.81153117e-09 2.78305221e-10 ... 2.61977837e-09
2.59548687e-09 0.00000000e+00]
[-1.25276141e-09 5.11732945e-10 1.26614370e-09 ... 1.14454762e-09
1.62194507e-09 -2.14363128e-09]]
[[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 0.00000000e+00 0.00000000e+00 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 1.38511555e-09 -1.40030144e-06 ... 0.00000000e+00
0.00000000e+00 0.00000000e+00]
...
[ 0.00000000e+00 2.29543385e-09 1.35606111e-10 ... -1.57903333e-09
0.00000000e+00 0.00000000e+00]
[ 0.00000000e+00 6.34755345e-10 -2.53978387e-10 ... -1.20141984e-09
-3.45902449e-10 0.00000000e+00]
[ 0.00000000e+00 1.63243506e-09 -7.04276590e-11 ... -2.73715185e-09
4.34383583e-10 1.63871799e-09]]]
[[[0.0000e+00 0.0000e+00 0.0000e+00 ... 0.0000e+00 0.0000e+00 0.0000e+00]
[0.0000e+00 0.0000e+00 0.0000e+00 ... 0.0000e+00 0.0000e+00 0.0000e+00]
[6.4545e-12 3.4606e-12 1.3888e-12 ... 0.0000e+00 0.0000e+00 0.0000e+00]
...
[1.5314e-11 1.5326e-11 1.5305e-11 ... 4.5916e-11 0.0000e+00 0.0000e+00]
[1.4790e-11 1.4741e-11 1.4724e-11 ... 4.1441e-11 4.6175e-11 0.0000e+00]
[1.5805e-11 1.5750e-11 1.5728e-11 ... 1.1087e-10 3.9720e-11 4.0593e-11]]
[[0.0000e+00 0.0000e+00 0.0000e+00 ... 0.0000e+00 0.0000e+00 0.0000e+00]
[0.0000e+00 0.0000e+00 0.0000e+00 ... 0.0000e+00 0.0000e+00 0.0000e+00]
[0.0000e+00 3.0349e-12 1.4492e-12 ... 0.0000e+00 0.0000e+00 0.0000e+00]
...
[0.0000e+00 1.5277e-11 1.5313e-11 ... 4.5258e-11 0.0000e+00 0.0000e+00]
[0.0000e+00 1.4695e-11 1.4742e-11 ... 4.1784e-11 4.6037e-11 0.0000e+00]
[0.0000e+00 1.5703e-11 1.5747e-11 ... 1.1097e-10 3.9901e-11 4.0941e-11]]]
Note that CSR and GFZ use different background(reference) gravity models. One is GGM05C and the other is EIGEN-6C4. These two gravity models define the same Earth gravity constant, but slightly different Earth's mean equator radius. In addition, both GGM05C and the monthly solutions released by CSR include the permanent tide. In contrast, neither EIGEN-6C4 nor the monthly solutions released by GFZ include this item. Therefore, it is necessary to remove the background field or the average field from the monthly solutions.
De-average GRACE GSM data
Remove the average field from the monthly solutions.
csr_gsm_deaverage = csr_gsm
