From 75707ab4f9574c048d6fb7382adebc93d132df0d Mon Sep 17 00:00:00 2001 From: Tyler Sutterley Date: Mon, 13 Jan 2025 15:57:20 -0800 Subject: [PATCH 1/4] fix: deprecated tick label resizing --- gravity_toolkit/associated_legendre.py | 32 ++++++++++++------------- gravity_toolkit/legendre.py | 4 ++-- gravity_toolkit/legendre_polynomials.py | 4 ++-- notebooks/GRACE-Harmonic-Plots.ipynb | 6 ++--- scripts/calc_degree_one.py | 23 ++++++------------ scripts/geocenter_compare_tellus.py | 11 ++++----- scripts/geocenter_monte_carlo.py | 11 ++++----- scripts/geocenter_ocean_models.py | 11 ++++----- scripts/geocenter_processing_centers.py | 11 ++++----- scripts/monte_carlo_degree_one.py | 12 ++++------ 10 files changed, 49 insertions(+), 76 deletions(-) diff --git a/gravity_toolkit/associated_legendre.py b/gravity_toolkit/associated_legendre.py index 33ae2898..cfb11abe 100644 --- a/gravity_toolkit/associated_legendre.py +++ b/gravity_toolkit/associated_legendre.py @@ -34,19 +34,19 @@ def associated_legendre(LMAX, x, Parameters ---------- LMAX: int - maximum degree of Legrendre polynomials + maximum degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 Typically ``cos(theta)``, where ``theta`` is the colatitude in radians method: str, default 'holmes' - Method for computing the associated Legrendre polynomials + Method for computing the associated Legendre polynomials - ``'columbo'`` - ``'holmes'`` - ``'mohlenkamp'`` MMAX: int or NoneType, default None - maximum order of Associated Legrendre polynomials + maximum order of Associated Legendre polynomials astype: np.dtype, default np.float64 output variable data type @@ -76,21 +76,21 @@ def plm_colombo(LMAX, x, Parameters ---------- LMAX: int - maximum degree of Legrendre polynomials + maximum degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 Typically ``cos(theta)``, where ``theta`` is the colatitude in radians MMAX: int or NoneType, default None - maximum order of Associated Legrendre polynomials + maximum order of Associated Legendre polynomials astype: np.dtype, default np.float64 output variable data type Returns ------- - plms: np.ndarray + plm: np.ndarray fully-normalized Legendre polynomials - dplms: np.ndarray + dplm: np.ndarray first derivative of Legendre polynomials """ @@ -155,21 +155,21 @@ def plm_holmes(LMAX, x, Parameters ---------- LMAX: int - maximum degree of Legrendre polynomials + maximum degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 Typically ``cos(theta)``, where ``theta`` is the colatitude in radians MMAX: int or NoneType, default None - maximum order of Associated Legrendre polynomials + maximum order of Associated Legendre polynomials astype: np.dtype, default np.float64 output variable data type Returns ------- - plms: np.ndarray + plm: np.ndarray fully-normalized Legendre polynomials - dplms: np.ndarray + dplm: np.ndarray first derivative of Legendre polynomials """ @@ -277,21 +277,21 @@ def plm_mohlenkamp(LMAX, x, Parameters ---------- LMAX: int - maximum degree of Legrendre polynomials + maximum degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 Typically ``cos(theta)``, where ``theta`` is the colatitude in radians MMAX: int or NoneType, default None - maximum order of Associated Legrendre polynomials + maximum order of Associated Legendre polynomials astype: np.dtype, default np.float64 output variable data type Returns ------- - plms: np.ndarray + plm: np.ndarray fully-normalized Legendre polynomials - dplms: np.ndarray + dplm: np.ndarray first derivative of Legendre polynomials """ @@ -308,7 +308,7 @@ def plm_mohlenkamp(LMAX, x, # Initialize the output Legendre polynomials plm = np.zeros((LMAX+1, MMAX+1, sx), dtype=astype) - dplm = np.zeros((LMAX+1,LMAX+1,sx), dtype=astype) + dplm = np.zeros((LMAX+1, LMAX+1, sx), dtype=astype) # Jacobi polynomial for the recurrence relation jlmm = np.zeros((LMAX+1, MMAX+1, sx)) # for x=cos(th): u= sin(th) diff --git a/gravity_toolkit/legendre.py b/gravity_toolkit/legendre.py index ebb6a9d3..c78246ba 100644 --- a/gravity_toolkit/legendre.py +++ b/gravity_toolkit/legendre.py @@ -10,7 +10,7 @@ Oceanography, Institute for Geophysics and Planetary Physics, UCSD. 1993 INPUTS: - l: degree of Legrendre polynomials + l: degree of Legendre polynomials x: elements ranging from -1 to 1 typically cos(theta), where theta is the colatitude in radians @@ -50,7 +50,7 @@ def legendre(l, x, NORMALIZE=False): Parameters ---------- l: int - degree of Legrendre polynomials + degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 diff --git a/gravity_toolkit/legendre_polynomials.py b/gravity_toolkit/legendre_polynomials.py index c2e429b5..2aaedc2d 100755 --- a/gravity_toolkit/legendre_polynomials.py +++ b/gravity_toolkit/legendre_polynomials.py @@ -11,7 +11,7 @@ Pl,dPl = legendre_polynomials(lmax, np.cos(theta)) INPUTS: - lmax: maximum degree of Legrendre polynomials + lmax: maximum degree of Legendre polynomials x: elements ranging from -1 to 1 typically cos(theta), where theta is the colatitude in radians @@ -54,7 +54,7 @@ def legendre_polynomials(lmax, x, ASTYPE=np.float64): Parameters ---------- lmax: int - maximum degree of Legrendre polynomials + maximum degree of Legendre polynomials x: np.ndarray elements ranging from -1 to 1 diff --git a/notebooks/GRACE-Harmonic-Plots.ipynb b/notebooks/GRACE-Harmonic-Plots.ipynb index 0dbe58f1..3882815d 100644 --- a/notebooks/GRACE-Harmonic-Plots.ipynb +++ b/notebooks/GRACE-Harmonic-Plots.ipynb @@ -453,10 +453,8 @@ "# add x and y labels\n", "ax1.set_ylabel('Degree [l]', fontsize=13)\n", "ax1.set_xlabel('Order [m]', fontsize=13)\n", - "for tick in ax1.xaxis.get_major_ticks():\n", - " tick.label.set_fontsize(13)\n", - "for tick in ax1.yaxis.get_major_ticks():\n", - " tick.label.set_fontsize(13)\n", + "ax1.tick_params(axis='both', which='both',\n", + " labelsize=13, direction='in')\n", "\n", "# Add horizontal colorbar and adjust size\n", "# extend = add extension triangles to upper and lower bounds\n", diff --git a/scripts/calc_degree_one.py b/scripts/calc_degree_one.py index cf48ff3d..bf0f5386 100755 --- a/scripts/calc_degree_one.py +++ b/scripts/calc_degree_one.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" calc_degree_one.py -Written by Tyler Sutterley (06/2024) +Written by Tyler Sutterley (01/2025) Calculates degree 1 variations using GRACE coefficients of degree 2 and greater, and ocean bottom pressure variations from ECCO and OMCT/MPIOM @@ -167,6 +167,7 @@ https://doi.org/10.1029/2007JB005338 UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 06/2024: use wrapper to importlib for optional dependencies Updated 10/2023: generalize mission variable to be GRACE/GRACE-FO Updated 09/2023: output comprehensive netCDF4 files with all components @@ -1062,13 +1063,8 @@ def calc_degree_one(base_dir, PROC, DREL, MODEL, LMAX, RAD, prop=dict(size=16,weight='bold'), frameon=False, loc=2) ax[i].add_artist(artist) # axes tick adjustments - for tick in ax[i].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[i].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) - # adjust ticks - ax[i].get_xaxis().set_tick_params(which='both', direction='in') - ax[i].get_yaxis().set_tick_params(which='both', direction='in') + ax[i].tick_params(axis='both', which='both', + labelsize=14, direction='in') # labels and set limits to Swenson range ax[2].set_xlabel('Time [Yr]', fontsize=14) ax[2].set_xlim(2003, 2007) @@ -1113,13 +1109,8 @@ def calc_degree_one(base_dir, PROC, DREL, MODEL, LMAX, RAD, prop=dict(size=16,weight='bold'), frameon=False, loc=2) ax[i].add_artist(artist) # axes tick adjustments - for tick in ax[i].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[i].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) - # adjust ticks - ax[i].get_xaxis().set_tick_params(which='both', direction='in') - ax[i].get_yaxis().set_tick_params(which='both', direction='in') + ax[i].tick_params(axis='both', which='both', + labelsize=14, direction='in') # labels and set limits ax[2].set_xlabel('Grace Month', fontsize=14) xmin = np.floor(GSM_Ylms.month[0]/10.)*10. @@ -1475,7 +1466,7 @@ def arguments(): models['HDF5'] = 'reformatted GIA in HDF5 format' # GIA model type parser.add_argument('--gia','-G', - type=str, metavar='GIA', default='AW13-ICE6G', choices=models.keys(), + type=str, metavar='GIA', choices=models.keys(), help='GIA model type to read') # full path to GIA file parser.add_argument('--gia-file', diff --git a/scripts/geocenter_compare_tellus.py b/scripts/geocenter_compare_tellus.py index d5714594..992df24d 100644 --- a/scripts/geocenter_compare_tellus.py +++ b/scripts/geocenter_compare_tellus.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" geocenter_compare_tellus.py -Written by Tyler Sutterley (05/2023) +Written by Tyler Sutterley (01/2025) Plots the GRACE/GRACE-FO geocenter time series for different GRACE/GRACE-FO processing centers comparing with the JPL GRACE Tellus product @@ -17,6 +17,7 @@ -M X, --missing X: Missing GRACE months in time series UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 05/2023: use pathlib to define and operate on paths Updated 03/2023: place matplotlib import within try/except statement Updated 12/2022: single implicit import of gravity toolkit @@ -182,12 +183,8 @@ def geocenter_compare_tellus(grace_dir,DREL,START_MON,END_MON,MISSING): ax[j].set_xlim(xmin, xmax) ax[j].set_ylim(-9.5,8.5) # axes tick adjustments - ax[j].get_xaxis().set_tick_params(which='both', direction='in') - ax[j].get_yaxis().set_tick_params(which='both', direction='in') - for tick in ax[j].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[j].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) + ax[j].tick_params(axis='both', which='both', + labelsize=14, direction='in') # add legend lgd = ax[0].legend(loc=3,frameon=False) diff --git a/scripts/geocenter_monte_carlo.py b/scripts/geocenter_monte_carlo.py index 6befef94..925627a1 100644 --- a/scripts/geocenter_monte_carlo.py +++ b/scripts/geocenter_monte_carlo.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" geocenter_monte_carlo.py -Written by Tyler Sutterley (05/2023) +Written by Tyler Sutterley (01/2025) CALLING SEQUENCE: python geocenter_monte_carlo.py --start 4 --end 237 @@ -15,6 +15,7 @@ -M X, --missing X: Missing GRACE months in time series UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 05/2023: use pathlib to define and operate on paths Updated 03/2023: place matplotlib import within try/except statement Updated 12/2022: single implicit import of gravity toolkit @@ -142,12 +143,8 @@ def geocenter_monte_carlo(grace_dir,PROC,DREL,START_MON,END_MON,MISSING): ax[j].set_xlim(xmin, xmax) ax[j].set_ylim(-9.5,8.5) # axes tick adjustments - ax[j].get_xaxis().set_tick_params(which='both', direction='in') - ax[j].get_yaxis().set_tick_params(which='both', direction='in') - for tick in ax[j].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[j].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) + ax[j].tick_params(axis='both', which='both', + labelsize=14, direction='in') # labels and set limits ax[0].set_ylabel(f'{PROC} Geocenter Variation [mm]', fontsize=14) diff --git a/scripts/geocenter_ocean_models.py b/scripts/geocenter_ocean_models.py index a12f2ac0..cbbeb7b6 100644 --- a/scripts/geocenter_ocean_models.py +++ b/scripts/geocenter_ocean_models.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" geocenter_ocean_models.py -Written by Tyler Sutterley (05/2023) +Written by Tyler Sutterley (01/2025) Plots the GRACE/GRACE-FO geocenter time series comparing results using different ocean bottom pressure estimates @@ -19,6 +19,7 @@ -O X, --ocean X: ocean bottom pressure products to use UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 05/2023: use pathlib to define and operate on paths Updated 03/2023: place matplotlib import within try/except statement Updated 12/2022: single implicit import of gravity toolkit @@ -128,12 +129,8 @@ def geocenter_ocean_models(grace_dir,PROC,DREL,MODEL,START_MON,END_MON,MISSING): ax[j].set_xlim(xmin, xmax) ax[j].set_ylim(-9.5,8.5) # axes tick adjustments - ax[j].get_xaxis().set_tick_params(which='both', direction='in') - ax[j].get_yaxis().set_tick_params(which='both', direction='in') - for tick in ax[j].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[j].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) + ax[j].tick_params(axis='both', which='both', + labelsize=14, direction='in') # add legend lgd = ax[0].legend(loc=3,frameon=False) diff --git a/scripts/geocenter_processing_centers.py b/scripts/geocenter_processing_centers.py index 66db9e5b..252c9d0d 100644 --- a/scripts/geocenter_processing_centers.py +++ b/scripts/geocenter_processing_centers.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" geocenter_processing_centers.py -Written by Tyler Sutterley (05/2023) +Written by Tyler Sutterley (01/2025) Plots the GRACE/GRACE-FO geocenter time series for different GRACE/GRACE-FO processing centers @@ -17,6 +17,7 @@ -M X, --missing X: Missing GRACE months in time series UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 05/2023: use pathlib to define and operate on paths Updated 03/2023: place matplotlib import within try/except statement Updated 12/2022: single implicit import of gravity toolkit @@ -139,12 +140,8 @@ def geocenter_processing_centers(grace_dir,PROC,DREL,START_MON,END_MON,MISSING): ax[j].set_xlim(xmin, xmax) ax[j].set_ylim(-9.5,8.5) # axes tick adjustments - ax[j].get_xaxis().set_tick_params(which='both', direction='in') - ax[j].get_yaxis().set_tick_params(which='both', direction='in') - for tick in ax[j].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[j].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) + ax[j].tick_params(axis='both', which='both', + labelsize=14, direction='in') # add legend lgd = ax[0].legend(loc=3,frameon=False) diff --git a/scripts/monte_carlo_degree_one.py b/scripts/monte_carlo_degree_one.py index ad1a3e3a..7ecb2b6f 100644 --- a/scripts/monte_carlo_degree_one.py +++ b/scripts/monte_carlo_degree_one.py @@ -1,7 +1,7 @@ #!/usr/bin/env python u""" monte_carlo_degree_one.py -Written by Tyler Sutterley (06/2024) +Written by Tyler Sutterley (01/2025) Calculates degree 1 errors using GRACE coefficients of degree 2 and greater, and ocean bottom pressure variations from OMCT/MPIOM in a Monte Carlo scheme @@ -157,6 +157,7 @@ https://doi.org/10.1029/2005GL025305 UPDATE HISTORY: + Updated 01/2025: fixed deprecated tick label resizing Updated 06/2024: use wrapper to importlib for optional dependencies Updated 10/2023: generalize mission variable to be GRACE/GRACE-FO Updated 09/2023: add more root level attributes to output netCDF4 files @@ -904,13 +905,8 @@ def monte_carlo_degree_one(base_dir, PROC, DREL, LMAX, RAD, frameon=False, loc=2, prop=dict(size=16,weight='bold')) ax[i].add_artist(artist) # axes tick adjustments - for tick in ax[i].xaxis.get_major_ticks(): - tick.label.set_fontsize(14) - for tick in ax[i].yaxis.get_major_ticks(): - tick.label.set_fontsize(14) - # adjust ticks - ax[i].get_xaxis().set_tick_params(which='both', direction='in') - ax[i].get_yaxis().set_tick_params(which='both', direction='in') + ax[i].tick_params(axis='both', which='both', + labelsize=14, direction='in') # adjust locations of subplots and save to file fig.subplots_adjust(left=0.12,right=0.94,bottom=0.06,top=0.98,hspace=0.1) args = (PROC,DREL,model_str,ds_str) From 8474efdad7391e996a4261b6135b04f553b969a2 Mon Sep 17 00:00:00 2001 From: Tyler Sutterley Date: Thu, 5 Jun 2025 15:53:34 -0700 Subject: [PATCH 2/4] docs: merge multiple bibtex citations together --- .github/workflows/python-publish.yml | 2 +- .github/workflows/python-request.yml | 4 ++-- doc/source/api_reference/calc_degree_one.rst | 4 ++-- .../api_reference/calc_harmonic_resolution.rst | 2 +- doc/source/api_reference/calc_mascon.rst | 6 +++--- doc/source/api_reference/calc_sensitivity_kernel.rst | 2 +- .../api_reference/dealiasing_global_uplift.rst | 2 +- doc/source/api_reference/destripe_harmonics.rst | 2 +- doc/source/api_reference/grace_raster_grids.rst | 4 ++-- doc/source/api_reference/grace_spatial_error.rst | 4 ++-- doc/source/api_reference/grace_spatial_maps.rst | 2 +- doc/source/api_reference/monte_carlo_degree_one.rst | 6 +++--- doc/source/api_reference/run_sea_level_equation.rst | 4 ++-- doc/source/api_reference/scale_grace_maps.rst | 6 +++--- doc/source/getting_started/Background.rst | 2 +- doc/source/getting_started/Geocenter-Variations.rst | 10 +++++----- doc/source/getting_started/Spatial-Maps.rst | 12 ++++++------ doc/source/getting_started/Time-Series-Analysis.rst | 2 +- gravity_toolkit/clenshaw_summation.py | 2 +- gravity_toolkit/gen_averaging_kernel.py | 2 +- gravity_toolkit/gen_disc_load.py | 3 +-- gravity_toolkit/gen_point_load.py | 2 +- gravity_toolkit/gen_spherical_cap.py | 3 +-- gravity_toolkit/geocenter.py | 3 +-- gravity_toolkit/grace_input_months.py | 6 +++--- gravity_toolkit/harmonic_gradients.py | 2 +- gravity_toolkit/harmonics.py | 2 +- gravity_toolkit/legendre.py | 2 +- gravity_toolkit/legendre_polynomials.py | 2 +- gravity_toolkit/read_GRACE_harmonics.py | 2 +- gravity_toolkit/read_SLR_harmonics.py | 2 +- gravity_toolkit/read_love_numbers.py | 2 +- gravity_toolkit/sea_level_equation.py | 11 +++++------ gravity_toolkit/spatial.py | 2 +- gravity_toolkit/time_series/lomb_scargle.py | 6 +++--- gravity_toolkit/time_series/savitzky_golay.py | 2 +- gravity_toolkit/utilities.py | 6 +++--- scripts/plot_AIS_GrIS_maps.py | 2 +- scripts/plot_AIS_grid_3maps.py | 2 +- scripts/plot_AIS_grid_4maps.py | 2 +- scripts/plot_AIS_grid_maps.py | 4 ++-- scripts/plot_AIS_grid_movie.py | 2 +- scripts/plot_AIS_regional_maps.py | 2 +- scripts/plot_AIS_regional_movie.py | 2 +- scripts/plot_GrIS_grid_3maps.py | 2 +- scripts/plot_GrIS_grid_5maps.py | 2 +- scripts/plot_GrIS_grid_maps.py | 4 ++-- scripts/plot_GrIS_grid_movie.py | 2 +- scripts/plot_QML_grid_3maps.py | 2 +- scripts/plot_global_grid_3maps.py | 2 +- scripts/plot_global_grid_4maps.py | 2 +- scripts/plot_global_grid_5maps.py | 2 +- scripts/plot_global_grid_9maps.py | 2 +- scripts/plot_global_grid_maps.py | 2 +- scripts/plot_global_grid_movie.py | 2 +- 55 files changed, 87 insertions(+), 91 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 2c2e5b03..aaa92f8f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -10,7 +10,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/python-request.yml b/.github/workflows/python-request.yml index eee9124c..9829eb8f 100644 --- a/.github/workflows/python-request.yml +++ b/.github/workflows/python-request.yml @@ -52,7 +52,7 @@ jobs: --password=${{ secrets.EARTHDATA_PASSWORD }} \ --webdav=${{ secrets.PODAAC_PASSWORD }} - name: Archive code coverage results - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: code-coverage-report + name: code-coverage-report-${{ matrix.os }} path: ./coverage.xml diff --git a/doc/source/api_reference/calc_degree_one.rst b/doc/source/api_reference/calc_degree_one.rst index 652db560..d69fa4ab 100644 --- a/doc/source/api_reference/calc_degree_one.rst +++ b/doc/source/api_reference/calc_degree_one.rst @@ -2,7 +2,7 @@ calc_degree_one.py ================== -- Calculates degree 1 variations using GRACE/GRACE-FO coefficients of degree 2 and greater, and modeled ocean bottom pressure variations :cite:p:`Swenson:2008cr` :cite:p:`Sutterley:2019bx`. +- Calculates degree 1 variations using GRACE/GRACE-FO coefficients of degree 2 and greater, and modeled ocean bottom pressure variations :cite:p:`Swenson:2008cr,Sutterley:2019bx`. `Source code`__ @@ -26,7 +26,7 @@ Calling Sequence * ``4``: Wang et al. (2012) values from PREM with soft sediment :cite:p:`Wang:2012gc` --kl -k : @after - * ``None``: use derived values from :cite:p:`Trupin:1992kp` :cite:p:`Blewitt:2003bz`. + * ``None``: use derived values from :cite:p:`Trupin:1992kp,Blewitt:2003bz`. --gia -G : @after * ``'IJ05-R2'``: Ivins R2 GIA Models :cite:p:`Ivins:2013cq` diff --git a/doc/source/api_reference/calc_harmonic_resolution.rst b/doc/source/api_reference/calc_harmonic_resolution.rst index d79b2018..4926eb5d 100644 --- a/doc/source/api_reference/calc_harmonic_resolution.rst +++ b/doc/source/api_reference/calc_harmonic_resolution.rst @@ -2,7 +2,7 @@ calc_harmonic_resolution.py =========================== -- Calculates the spatial resolution that can be resolved by the spherical harmonics of a certain degree :cite:p:`Barthelmes:2013fy` :cite:p:`HofmannWellenhof:2006hy` +- Calculates the spatial resolution that can be resolved by the spherical harmonics of a certain degree :cite:p:`Barthelmes:2013fy,HofmannWellenhof:2006hy` - Default method uses the smallest half-wavelength that can be resolved - Secondary method calculates the smallest possible bump that can be resolved diff --git a/doc/source/api_reference/calc_mascon.rst b/doc/source/api_reference/calc_mascon.rst index 3638ff94..b41ef5b2 100644 --- a/doc/source/api_reference/calc_mascon.rst +++ b/doc/source/api_reference/calc_mascon.rst @@ -4,9 +4,9 @@ calc_mascon.py - Reads in GRACE/GRACE-FO spherical harmonic coefficients - Correct spherical harmonics with the specified GIA model group -- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2006hu` -- Calculates a time-series of regional mass anomalies through a least-squares mascon procedure following :cite:p:`Tiwari:2009bx` :cite:p:`Jacob:2012gv` -- Calculates the regional mascon errors following :cite:p:`Wahr:2006bx` +- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj,Swenson:2006hu` +- Calculates a time-series of regional mass anomalies through a least-squares mascon procedure following :cite:t:`Tiwari:2009bx,Jacob:2012gv` +- Calculates the regional mascon errors following :cite:t:`Wahr:2006bx` `Source code`__ diff --git a/doc/source/api_reference/calc_sensitivity_kernel.rst b/doc/source/api_reference/calc_sensitivity_kernel.rst index 08411dbf..72276dd7 100644 --- a/doc/source/api_reference/calc_sensitivity_kernel.rst +++ b/doc/source/api_reference/calc_sensitivity_kernel.rst @@ -2,7 +2,7 @@ calc_sensitivity_kernel.py ========================== -- Calculates spatial sensitivity kernels through a least-squares mascon procedure following :cite:p:`Tiwari:2009bx` :cite:p:`Jacob:2012gv` +- Calculates spatial sensitivity kernels through a least-squares mascon procedure following :cite:t:`Tiwari:2009bx,Jacob:2012gv` `Source code`__ diff --git a/doc/source/api_reference/dealiasing_global_uplift.rst b/doc/source/api_reference/dealiasing_global_uplift.rst index 84b84ad5..92e0111b 100644 --- a/doc/source/api_reference/dealiasing_global_uplift.rst +++ b/doc/source/api_reference/dealiasing_global_uplift.rst @@ -2,7 +2,7 @@ dealiasing_global_uplift.py =========================== -- Reads GRACE/GRACE-FO level-1b dealiasing data files for global atmospheric and oceanic loading and estimates anomalies in elastic crustal uplift :cite:p:`Davis:2004il` :cite:p:`Wahr:1998hy` +- Reads GRACE/GRACE-FO level-1b dealiasing data files for global atmospheric and oceanic loading and estimates anomalies in elastic crustal uplift :cite:p:`Davis:2004il,Wahr:1998hy` `Source code`__ diff --git a/doc/source/api_reference/destripe_harmonics.rst b/doc/source/api_reference/destripe_harmonics.rst index 88ee5d7f..ce876194 100644 --- a/doc/source/api_reference/destripe_harmonics.rst +++ b/doc/source/api_reference/destripe_harmonics.rst @@ -2,7 +2,7 @@ destripe_harmonics ================== -- Filters spherical harmonic coefficients for correlated "striping" errors following :cite:p:`Swenson:2006hu` +- Filters spherical harmonic coefficients for correlated "striping" errors following :cite:t:`Swenson:2006hu` Calling Sequence ################ diff --git a/doc/source/api_reference/grace_raster_grids.rst b/doc/source/api_reference/grace_raster_grids.rst index 514353a8..1867fb45 100644 --- a/doc/source/api_reference/grace_raster_grids.rst +++ b/doc/source/api_reference/grace_raster_grids.rst @@ -4,8 +4,8 @@ grace_raster_grids.py - Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports projected spatial fields - Correct spherical harmonics with the specified GIA model group -- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2006hu` -- Converts data to specified units and performs a Clenshaw harmonic summation to convert to the spatial domain :cite:p:`Holmes:2002ff` :cite:p:`Tscherning:1982tu` +- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj,Swenson:2006hu` +- Converts data to specified units and performs a Clenshaw harmonic summation to convert to the spatial domain :cite:p:`Holmes:2002ff,Tscherning:1982tu` `Source code`__ diff --git a/doc/source/api_reference/grace_spatial_error.rst b/doc/source/api_reference/grace_spatial_error.rst index 745eab9b..07f62f76 100644 --- a/doc/source/api_reference/grace_spatial_error.rst +++ b/doc/source/api_reference/grace_spatial_error.rst @@ -2,8 +2,8 @@ grace_spatial_error.py ====================== -- Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports spatial error field following :cite:p:`Wahr:2006bx` -- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2006hu` +- Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports spatial error field following :cite:t:`Wahr:2006bx` +- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj,Swenson:2006hu` - Converts data to specified units and performs a spherical harmonic summation to convert error field to the spatial domain :cite:p:`Wahr:1998hy` `Source code`__ diff --git a/doc/source/api_reference/grace_spatial_maps.rst b/doc/source/api_reference/grace_spatial_maps.rst index d992268e..09dc7b98 100644 --- a/doc/source/api_reference/grace_spatial_maps.rst +++ b/doc/source/api_reference/grace_spatial_maps.rst @@ -4,7 +4,7 @@ grace_spatial_maps.py - Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports monthly spatial fields - Correct spherical harmonics with the specified GIA model group -- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2006hu` +- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj,Swenson:2006hu` - Converts data to specified units and performs a spherical harmonic summation to convert to the spatial domain :cite:p:`Wahr:1998hy` `Source code`__ diff --git a/doc/source/api_reference/monte_carlo_degree_one.rst b/doc/source/api_reference/monte_carlo_degree_one.rst index 6979e814..59d6f039 100644 --- a/doc/source/api_reference/monte_carlo_degree_one.rst +++ b/doc/source/api_reference/monte_carlo_degree_one.rst @@ -2,8 +2,8 @@ monte_carlo_degree_one.py ========================= -- Estimates uncertainties in degree 1 using GRACE/GRACE-FO coefficients of degree 2 and greater, and modeled ocean bottom pressure variations in a Monte Carlo scheme :cite:p:`Swenson:2008cr` :cite:p:`Sutterley:2019bx`. -- Calculates the estimated spherical harmonic errors following :cite:p:`Wahr:2006bx` +- Estimates uncertainties in degree 1 using GRACE/GRACE-FO coefficients of degree 2 and greater, and modeled ocean bottom pressure variations in a Monte Carlo scheme :cite:p:`Swenson:2008cr,Sutterley:2019bx`. +- Calculates the estimated spherical harmonic errors following :cite:t:`Wahr:2006bx` `Source code`__ @@ -27,7 +27,7 @@ Calling Sequence * ``4``: Wang et al. (2012) values from PREM with soft sediment :cite:p:`Wang:2012gc` --kl -k : @after - * ``None``: use derived values from :cite:p:`Trupin:1992kp` :cite:p:`Blewitt:2003bz`. + * ``None``: use derived values from :cite:p:`Trupin:1992kp,Blewitt:2003bz`. --gia -G : @after * ``'IJ05-R2'``: Ivins R2 GIA Models :cite:p:`Ivins:2013cq` diff --git a/doc/source/api_reference/run_sea_level_equation.rst b/doc/source/api_reference/run_sea_level_equation.rst index 77a77c43..00b0dd04 100644 --- a/doc/source/api_reference/run_sea_level_equation.rst +++ b/doc/source/api_reference/run_sea_level_equation.rst @@ -2,8 +2,8 @@ run_sea_level_equation.py ========================= -- Solves the sea level equation with the option of including polar motion feedback :cite:p:`Farrell:1976hm` :cite:p:`Kendall:2005ds` :cite:p:`Mitrovica:2003cq` -- Uses a Clenshaw summation to calculate the spherical harmonic summation :cite:p:`Holmes:2002ff` :cite:p:`Tscherning:1982tu` +- Solves the sea level equation with the option of including polar motion feedback :cite:p:`Farrell:1976hm,Kendall:2005ds,Mitrovica:2003cq` +- Uses a Clenshaw summation to calculate the spherical harmonic summation :cite:p:`Holmes:2002ff,Tscherning:1982tu` `Source code`__ diff --git a/doc/source/api_reference/scale_grace_maps.rst b/doc/source/api_reference/scale_grace_maps.rst index 6594c87f..8f1a19ea 100644 --- a/doc/source/api_reference/scale_grace_maps.rst +++ b/doc/source/api_reference/scale_grace_maps.rst @@ -4,10 +4,10 @@ scale_grace_maps.py - Reads in GRACE/GRACE-FO spherical harmonic coefficients and exports scaled spatial fields - Correct spherical harmonics with the specified GIA model group -- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2006hu` +- Filters and smooths data with specified processing algorithms :cite:p:`Jekeli:1981vj,Swenson:2006hu` - Converts data to centimeters water equivalent, performs a spherical harmonic summation to convert to the spatial domain :cite:p:`Wahr:1998hy` -- Scales the spatial fields following :cite:p:`Landerer:2012kf` -- Calculates the scaled spatial error field following :cite:p:`Wahr:2006bx` +- Scales the spatial fields following :cite:t:`Landerer:2012kf` +- Calculates the scaled spatial error field following :cite:t:`Wahr:2006bx` `Source code`__ diff --git a/doc/source/getting_started/Background.rst b/doc/source/getting_started/Background.rst index 49d6295c..945a4526 100644 --- a/doc/source/getting_started/Background.rst +++ b/doc/source/getting_started/Background.rst @@ -129,7 +129,7 @@ The instantaneous shape of the Earth's gravitational field can be described in terms of an equipotential surface, a surface of constant potential energy where the gravitational potential is constant :cite:p:`HofmannWellenhof:2006hy`. The Earth's geoid is the equipotential surface that coincides with global mean -sea level if the oceans were at rest :cite:p:`HofmannWellenhof:2006hy` :cite:p:`Wahr:1998hy`. +sea level if the oceans were at rest :cite:p:`HofmannWellenhof:2006hy,Wahr:1998hy`. The distance between the geoid and an Earth reference ellipsoid is the geoid height (:math:`N`), or the geoidal undulation :cite:p:`HofmannWellenhof:2006hy`. diff --git a/doc/source/getting_started/Geocenter-Variations.rst b/doc/source/getting_started/Geocenter-Variations.rst index 3065da66..7650c04a 100644 --- a/doc/source/getting_started/Geocenter-Variations.rst +++ b/doc/source/getting_started/Geocenter-Variations.rst @@ -20,7 +20,7 @@ far-field signals leaking into each regional estimate :cite:p:`Velicogna:2009ft` ``calc_degree_one.py`` calculates coefficients of degree one by combining GRACE/GRACE-FO spherical harmonic products with estimates of -ocean bottom pressure (OBP) following :cite:p:`Swenson:2008cr` and :cite:p:`Sutterley:2019bx`. +ocean bottom pressure (OBP) following :cite:t:`Swenson:2008cr,Sutterley:2019bx`. The method assumes that the change in global surface mass density, :math:`\Delta\sigma(\theta,\phi)`, can be separated into individual land and ocean components using a land-function @@ -35,17 +35,17 @@ land and ocean components using a land-function The oceanic components of the change in degree one spherical harmonics (:math:`\Delta C^{ocean}_{10}`, :math:`\Delta C^{ocean}_{11}`, and :math:`\Delta S^{ocean}_{11}`) can then be calculated from the changes in ocean mass, -:math:`\Delta\sigma_{ocean}(\theta,\phi)` :cite:p:`Swenson:2008cr` :cite:p:`Wahr:1998hy`. +:math:`\Delta\sigma_{ocean}(\theta,\phi),Swenson:2008cr,Wahr:1998hy`. If the oceanic contributions to degree one variability (:math:`\Delta C^{ocean}_{10}`, :math:`\Delta C^{ocean}_{11}`, and :math:`\Delta S^{ocean}_{11}`) can be estimated from an ocean model, then the unknown complete degree one terms (:math:`\Delta C_{10}`, :math:`\Delta C_{11}`, and :math:`\Delta S_{11}`) can be calculated from the residual between the oceanic degree one terms and the measured mass change over the ocean calculated using all other degrees of -the global spherical harmonics from GRACE/GRACE-FO :cite:p:`Swenson:2008cr` :cite:p:`Sutterley:2019bx`. +the global spherical harmonics from GRACE/GRACE-FO :cite:p:`Swenson:2008cr,Sutterley:2019bx`. The ``calc_degree_one.py`` program will output geocenter files in ascii format -for each GRACE/GRACE-FO month following :cite:p:`Sutterley:2019bx`. +for each GRACE/GRACE-FO month following :cite:t:`Sutterley:2019bx`. Uncertainties in geocenter due to a combination of error sources can be estimated using the ``monte_carlo_degree_one.py`` program. @@ -55,7 +55,7 @@ Load Love Numbers The degree one Love number of gravitational potential :math:`k_1` is defined so that the degree one terms describe the offset between the center of mass (CM) of the combined surface mass and deformed solid Earth, and the center of figure (CF) -of the deformed solid Earth surface :cite:p:`Trupin:1992kp` :cite:p:`Blewitt:2003bz`. +of the deformed solid Earth surface :cite:p:`Trupin:1992kp,Blewitt:2003bz`. For the CF coordinate system, this means .. math:: diff --git a/doc/source/getting_started/Spatial-Maps.rst b/doc/source/getting_started/Spatial-Maps.rst index 10f4043d..bbb618d8 100644 --- a/doc/source/getting_started/Spatial-Maps.rst +++ b/doc/source/getting_started/Spatial-Maps.rst @@ -25,7 +25,7 @@ Using load Love numbers to calculate the elastic yielding assumes that all other time-variable solid Earth contributions have been independently removed from the spherical harmonic coefficients :cite:p:`Wahr:1998hy`. Here, we use load Love and Shida numbers with parameters calculated from -the Preliminary Reference Earth model (PREM) :cite:p:`Farrell:1972cm` :cite:p:`Dziewonski:1981bz`. +the Preliminary Reference Earth model (PREM) :cite:p:`Farrell:1972cm,Dziewonski:1981bz`. In order to help estimate the uncertainty in elastic deformation, ``grace_spatial_maps.py`` can use different sets of load Love numbers by adjusting the ``--love`` command line option. @@ -45,7 +45,7 @@ require the inclusion of degree one terms to be fully accurate :cite:p:`Swenson: ``grace_spatial_maps.py`` has geocenter options to select the degree one product to include with the GRACE/GRACE-FO derived harmonics. There are options for using measurements from satellite laser ranging :cite:p:`Cheng:2013tz` and -calculations from time-variable gravity and ocean model outputs :cite:p:`Swenson:2008cr` :cite:p:`Sutterley:2019bx`. +calculations from time-variable gravity and ocean model outputs :cite:p:`Swenson:2008cr,Sutterley:2019bx`. If including degree one harmonics and changing the reference frame, the reference frame for the load Love numbers needs to be updated accordingly :cite:p:`Blewitt:2003bz`. In ``grace_spatial_maps.py`` and other GRACE/GRACE-FO programs, the reference frame for the load Love numbers @@ -87,7 +87,7 @@ for some low degree and order spherical harmonics. :math:`C_{30}`, :math:`C_{40}`, and :math:`C_{50}` with -SLR low degree harmonic products :cite:p:`Cheng:2011hh` :cite:p:`Cheng:2018jz` :cite:p:`Koenig:2019gs` :cite:p:`Loomis:2019dc` :cite:p:`Loomis:2020bq`. +SLR low degree harmonic products :cite:p:`Cheng:2011hh,Cheng:2018jz,Koenig:2019gs,Loomis:2019dc,Loomis:2020bq`. Corrections ########### @@ -118,13 +118,13 @@ Filtering ######### The GRACE/GRACE-FO coefficients are impacted by random spherical harmonic errors -that increase as a function of spherical harmonic degree :cite:p:`Wahr:1998hy` :cite:p:`Swenson:2002hs`. +that increase as a function of spherical harmonic degree :cite:p:`Wahr:1998hy,Swenson:2002hs`. The truncation of the spherical harmonics series also results in spurious ringing artifacts from Gibbs phenomenon. The impact of these errors can be reduced using Gaussian averaging functions -as described in :cite:p:`Jekeli:1981vj` :cite:p:`Swenson:2002hs`. +as described in :cite:p:`Jekeli:1981vj,Swenson:2002hs`. GRACE/GRACE-FO coefficients are also impacted by correlated north/south "striping" errors, -which can be spectrally filtered following :cite:p:`Swenson:2006hu`. +which can be spectrally filtered following :cite:t:`Swenson:2006hu`. .. |beta| unicode:: U+03B2 .. GREEK SMALL LETTER BETA diff --git a/doc/source/getting_started/Time-Series-Analysis.rst b/doc/source/getting_started/Time-Series-Analysis.rst index d605e9a1..3eb2f7af 100644 --- a/doc/source/getting_started/Time-Series-Analysis.rst +++ b/doc/source/getting_started/Time-Series-Analysis.rst @@ -59,7 +59,7 @@ Getting the kernels "just right" in order to isolate regions of interest takes s The set of least-squares mascon programs have been used in :cite:p:`Velicogna:2014km` and other publications for regional time series analysis. The ``calc_mascon.py`` program additionally calculates the GRACE/GRACE-FO error -harmonics following :cite:p:`Wahr:2006bx`. +harmonics following :cite:t:`Wahr:2006bx`. The ``calc_mascon.py`` program will output a text file of the time series for each mascon (format: GRACE/GRACE-FO month, mid-month date in decimal-year format, diff --git a/gravity_toolkit/clenshaw_summation.py b/gravity_toolkit/clenshaw_summation.py index 19a9b681..c7bbeaff 100644 --- a/gravity_toolkit/clenshaw_summation.py +++ b/gravity_toolkit/clenshaw_summation.py @@ -79,7 +79,7 @@ def clenshaw_summation(clm, slm, lon, lat, ): r""" Calculates the spatial field for a series of spherical harmonics for a - sequence of ungridded points :cite:p:`Holmes:2002ff` :cite:p:`Tscherning:1982tu` + sequence of ungridded points :cite:p:`Holmes:2002ff,Tscherning:1982tu` Parameters ---------- diff --git a/gravity_toolkit/gen_averaging_kernel.py b/gravity_toolkit/gen_averaging_kernel.py index 429a07f2..b291906b 100755 --- a/gravity_toolkit/gen_averaging_kernel.py +++ b/gravity_toolkit/gen_averaging_kernel.py @@ -61,7 +61,7 @@ def gen_averaging_kernel(gclm, gslm, eclm, eslm, sigma, hw, LMAX=60, MMAX=None, CUTOFF=1e-15, UNITS=0, LOVE=None): r""" Generates averaging kernel coefficients which minimize the - total error following :cite:p:`Swenson:2002hs` + total error following :cite:t:`Swenson:2002hs` Uses a normalized form of the Gaussian averaging function from :cite:p:`Jekeli:1981vj` diff --git a/gravity_toolkit/gen_disc_load.py b/gravity_toolkit/gen_disc_load.py index 015b3916..474b1b3f 100644 --- a/gravity_toolkit/gen_disc_load.py +++ b/gravity_toolkit/gen_disc_load.py @@ -84,8 +84,7 @@ def gen_disc_load(data, lon, lat, area, LMAX=60, MMAX=None, UNITS=2, PLM=None, LOVE=None): r""" Calculates spherical harmonic coefficients for a uniform disc load - :cite:p:`Holmes:2002ff` :cite:p:`Longman:1962ev` :cite:p:`Farrell:1972cm` - :cite:p:`Pollack:1973gi` :cite:p:`Jacob:2012eo` + :cite:p:`Holmes:2002ff,Longman:1962ev,Farrell:1972cm,Pollack:1973gi,Jacob:2012eo` Parameters ---------- diff --git a/gravity_toolkit/gen_point_load.py b/gravity_toolkit/gen_point_load.py index 8cf05d8d..78ff3de3 100644 --- a/gravity_toolkit/gen_point_load.py +++ b/gravity_toolkit/gen_point_load.py @@ -65,7 +65,7 @@ def gen_point_load(data, lon, lat, LMAX=60, MMAX=None, UNITS=1, LOVE=None): """ Calculates spherical harmonic coefficients for point masses - :cite:p:`Longman:1962ev` :cite:p:`Farrell:1972cm` :cite:p:`Pollack:1973gi` + :cite:p:`Longman:1962ev,Farrell:1972cm,Pollack:1973gi` Parameters ---------- diff --git a/gravity_toolkit/gen_spherical_cap.py b/gravity_toolkit/gen_spherical_cap.py index 208d8888..bea477b9 100755 --- a/gravity_toolkit/gen_spherical_cap.py +++ b/gravity_toolkit/gen_spherical_cap.py @@ -102,8 +102,7 @@ def gen_spherical_cap(data, lon, lat, LMAX=60, MMAX=None, AREA=0, RAD_CAP=0, RAD_KM=0, UNITS=1, PLM=None, LOVE=None): r""" Calculates spherical harmonic coefficients for a spherical cap - :cite:p:`Holmes:2002ff` :cite:p:`Longman:1962ev` :cite:p:`Farrell:1972cm` - :cite:p:`Pollack:1973gi` :cite:p:`Jacob:2012eo` + :cite:p:`Holmes:2002ff,Longman:1962ev,Farrell:1972cm,Pollack:1973gi,Jacob:2012eo` Parameters ---------- diff --git a/gravity_toolkit/geocenter.py b/gravity_toolkit/geocenter.py index c30b5627..247b77ff 100644 --- a/gravity_toolkit/geocenter.py +++ b/gravity_toolkit/geocenter.py @@ -617,8 +617,7 @@ def from_tellus(self, geocenter_file, **kwargs): """ Reads monthly geocenter spherical harmonic data files from GRACE Tellus Technical Notes (TN-13) calculated using GRACE/GRACE-FO measurements and - Ocean Models of Degree 1 :cite:p:`Swenson:2008cr` :cite:p:`Sun:2016bf` - :cite:p:`Sun:2016hh` + Ocean Models of Degree 1 :cite:p:`Swenson:2008cr,Sun:2016bf,Sun:2016hh` Datasets distributed by NASA PO.DAAC diff --git a/gravity_toolkit/grace_input_months.py b/gravity_toolkit/grace_input_months.py index b4cb61d7..12cf35b7 100644 --- a/gravity_toolkit/grace_input_months.py +++ b/gravity_toolkit/grace_input_months.py @@ -199,7 +199,7 @@ def grace_input_months(base_dir, PROC, DREL, DSET, LMAX, start_mon, end_mon, Can correct for ECMWF atmospheric "jumps" using GAE/GAF/GAG files :cite:p:`Fagiolini:2015kc` - Can correct for Pole Tide drift following :cite:p:`Wahr:2015dg` + Can correct for Pole Tide drift following :cite:t:`Wahr:2015dg` Parameters ---------- @@ -284,9 +284,9 @@ def grace_input_months(base_dir, PROC, DREL, DSET, LMAX, start_mon, end_mon, - ``'CSR'``: use values from CSR (5x5 with 6,1) - ``'GSFC'``: use values from GSFC POLE_TIDE: bool, default False - Correct GSM data with pole tides following :cite:p:`Wahr:2015dg` + Correct GSM data with pole tides following :cite:t:`Wahr:2015dg` ATM: bool, default False - Correct data with ECMWF "jump" corrections following :cite:p:`Fagiolini:2015kc` + Correct data with ECMWF "jump" corrections following :cite:t:`Fagiolini:2015kc` DEG1_FILE: str or NoneType, default None full path to degree 1 coefficients file MODEL_DEG1: bool, default False diff --git a/gravity_toolkit/harmonic_gradients.py b/gravity_toolkit/harmonic_gradients.py index dfc5ae37..8e0704b2 100644 --- a/gravity_toolkit/harmonic_gradients.py +++ b/gravity_toolkit/harmonic_gradients.py @@ -162,7 +162,7 @@ def geostrophic_currents(clm1, slm1, lon, lat, r""" Converts data from spherical harmonic coefficients to a spatial fields of ocean geostrophic currents following - :cite:p:`Wahr:1998hy` :cite:p:`Wahr:2002ie` + :cite:p:`Wahr:1998hy,Wahr:2002ie` Parameters ---------- diff --git a/gravity_toolkit/harmonics.py b/gravity_toolkit/harmonics.py index f0212757..877c0edf 100644 --- a/gravity_toolkit/harmonics.py +++ b/gravity_toolkit/harmonics.py @@ -1793,7 +1793,7 @@ def convolve(self, var): def destripe(self, **kwargs): """ Filters spherical harmonic coefficients for correlated "striping" - errors following :cite:p:`Swenson:2006hu` + errors following :cite:t:`Swenson:2006hu` Parameters ---------- diff --git a/gravity_toolkit/legendre.py b/gravity_toolkit/legendre.py index c78246ba..af6b192c 100644 --- a/gravity_toolkit/legendre.py +++ b/gravity_toolkit/legendre.py @@ -45,7 +45,7 @@ def legendre(l, x, NORMALIZE=False): """ Computes associated Legendre functions for a particular degree - following :cite:p:`Abramowitz:1965vw` and :cite:p:`Jacobs:1987vv` + following :cite:t:`Abramowitz:1965vw,Jacobs:1987vv` Parameters ---------- diff --git a/gravity_toolkit/legendre_polynomials.py b/gravity_toolkit/legendre_polynomials.py index 2aaedc2d..332e6a00 100755 --- a/gravity_toolkit/legendre_polynomials.py +++ b/gravity_toolkit/legendre_polynomials.py @@ -49,7 +49,7 @@ def legendre_polynomials(lmax, x, ASTYPE=np.float64): """ Computes fully-normalized Legendre polynomials and their first derivative - following :cite:p:`HofmannWellenhof:2006hy` + following :cite:t:`HofmannWellenhof:2006hy` Parameters ---------- diff --git a/gravity_toolkit/read_GRACE_harmonics.py b/gravity_toolkit/read_GRACE_harmonics.py index 4a628e84..eeb6cc77 100644 --- a/gravity_toolkit/read_GRACE_harmonics.py +++ b/gravity_toolkit/read_GRACE_harmonics.py @@ -89,7 +89,7 @@ def read_GRACE_harmonics(input_file, LMAX, **kwargs): MMAX: int or NoneType, default None Maximum order of spherical harmonics POLE_TIDE: bool, default False - Correct for pole tide drift following :cite:p:`Wahr:2015dg` + Correct for pole tide drift following :cite:t:`Wahr:2015dg` Returns ------- diff --git a/gravity_toolkit/read_SLR_harmonics.py b/gravity_toolkit/read_SLR_harmonics.py index 9d596fe2..37430e6e 100644 --- a/gravity_toolkit/read_SLR_harmonics.py +++ b/gravity_toolkit/read_SLR_harmonics.py @@ -243,7 +243,7 @@ def read_GSFC_weekly_6x1(SLR_file, SCALE=1.0, HEADER=True): r""" Reads weekly 5x5 spherical harmonic coefficients with 1 coefficient from degree 6 calculated from satellite laser ranging measurements - :cite:p:`Loomis:2019dc` :cite:p:`Loomis:2020bq` + :cite:p:`Loomis:2019dc,Loomis:2020bq` Parameters ---------- diff --git a/gravity_toolkit/read_love_numbers.py b/gravity_toolkit/read_love_numbers.py index f1b2f44e..bb8c9e02 100755 --- a/gravity_toolkit/read_love_numbers.py +++ b/gravity_toolkit/read_love_numbers.py @@ -103,7 +103,7 @@ def read_love_numbers(love_numbers_file, LMAX=None, HEADER=2, COLUMNS=['l','hl','kl','ll'], REFERENCE='CE', FORMAT='tuple'): """ Reads PREM load Love/Shida numbers file and applies isomorphic - parameters :cite:p:`Dziewonski:1981bz` :cite:p:`Blewitt:2003bz` + parameters :cite:p:`Dziewonski:1981bz,Blewitt:2003bz` :cite:p:`Wahr:1998hy` Parameters diff --git a/gravity_toolkit/sea_level_equation.py b/gravity_toolkit/sea_level_equation.py index 712853f9..002ed8cc 100644 --- a/gravity_toolkit/sea_level_equation.py +++ b/gravity_toolkit/sea_level_equation.py @@ -132,11 +132,10 @@ def sea_level_equation(loadClm, loadSlm, glon, glat, land_function, LMAX=0, PLM=None, FILL_VALUE=0, ASTYPE=np.longdouble, SCALE=1e-280, **kwargs): """ Solves the sea level equation with the option of including - polar motion feedback :cite:p:`Farrell:1976hm` :cite:p:`Kendall:2005ds` - :cite:p:`Mitrovica:2003cq` + polar motion feedback :cite:p:`Farrell:1976hm,Kendall:2005ds,Mitrovica:2003cq` Uses a Clenshaw summation to calculate the spherical harmonic - summation :cite:p:`Holmes:2002ff` :cite:p:`Tscherning:1982tu` + summation :cite:p:`Holmes:2002ff,Tscherning:1982tu` Parameters ---------- @@ -228,13 +227,13 @@ def sea_level_equation(loadClm, loadSlm, glon, glat, land_function, LMAX=0, elif (FLUID_LOVE == 0): # Han and Wahr (1989) fluid love number # klf = 3.0*G*(C-A)/(rad_e**5*omega**2) + # klf = 3.0*G*H0*A/(rad_e**5*omega**2) G = 6.6740e-11# gravitational constant [m^3/(kg*s^2)] Re = 6.371e6# mean radius of the Earth [m] A_moi = 8.0077e+37# mean equatorial moment of inertia [kg m^2] omega = 7.292115e-5# mean rotation rate of the Earth [radians/s] - ef = 0.00328475# dynamical ellipticity (C_moi-A_moi)/A_moi - C_moi = A_moi*(1.0 + ef)# mean polar moment of inertia [kg m^2] - klf = 3.0*G*(C_moi-A_moi)*(Re**-5)*(omega**-2) + H0 = 0.00328475# dynamical ellipticity (C_moi-A_moi)/A_moi + klf = 3.0*G*H0*A_moi*(Re**-5)*(omega**-2) klf = 0.00328475/0.00348118 if (FLUID_LOVE == 1): # Munk and MacDonald (1960) secular love number with IERS and PREM values diff --git a/gravity_toolkit/spatial.py b/gravity_toolkit/spatial.py index 255b57e8..adc80ea5 100644 --- a/gravity_toolkit/spatial.py +++ b/gravity_toolkit/spatial.py @@ -1943,7 +1943,7 @@ def kfactor(self, var): """ Calculate the scaling factor and scaling factor errors from two ``spatial`` or ``scaling_factors`` objects - following :cite:p:`Landerer:2012kf` and :cite:p:`Hsu:2017hd` + following :cite:t:`Landerer:2012kf` and :cite:p:`Hsu:2017hd` Parameters ---------- diff --git a/gravity_toolkit/time_series/lomb_scargle.py b/gravity_toolkit/time_series/lomb_scargle.py index f24c3326..8b52a413 100755 --- a/gravity_toolkit/time_series/lomb_scargle.py +++ b/gravity_toolkit/time_series/lomb_scargle.py @@ -59,14 +59,14 @@ def lomb_scargle(t_in, d_in, **kwargs): """ Computes periodograms for least-squares spectral analysis following - :cite:p:`Lomb:1976bo` :cite:p:`Scargle:1982eu` and computes the - frequency probabilities following :cite:p:`Horne:1986ds` + :cite:p:`Lomb:1976bo,Scargle:1982eu` and computes the + frequency probabilities following :cite:t:`Horne:1986ds` Parameters ---------- t_in: float input time array - d_in: floatto consider + d_in: float input data array NORMALIZE: bool, default False Compute normalized periodogram diff --git a/gravity_toolkit/time_series/savitzky_golay.py b/gravity_toolkit/time_series/savitzky_golay.py index a95e4a09..42ea690f 100644 --- a/gravity_toolkit/time_series/savitzky_golay.py +++ b/gravity_toolkit/time_series/savitzky_golay.py @@ -66,7 +66,7 @@ def savitzky_golay(t_in, y_in, WINDOW=None, ORDER=2, DERIV=0, RATE=1, DATA_ERR=0): """ Smooth and optionally differentiate data with a Savitzky-Golay - filter :cite:p:`Savitzky:1964bn` :cite:p:`Press:1988we` + filter :cite:p:`Savitzky:1964bn,Press:1988we` Parameters ---------- diff --git a/gravity_toolkit/utilities.py b/gravity_toolkit/utilities.py index 4c8c0460..9ff549be 100644 --- a/gravity_toolkit/utilities.py +++ b/gravity_toolkit/utilities.py @@ -1571,7 +1571,7 @@ def cmr_product_shortname( cmr_shortname['grace-fo']['L1B'] = dict(JPL={}) cmr_shortname['grace-fo']['L2'] = dict(CSR={},GFZ={},JPL={}) - # dictionary entry for GRACE Level-1B deliasing products + # dictionary entry for GRACE Level-1B dealiasing products # for each data release for rl in ['RL06']: shortname = grace_l1_format.format('AOD1B','GFZ',rl) @@ -2109,11 +2109,11 @@ def compile_regex_pattern( args = (DSET,) pattern = r'{0}-2_\d+-\d+_\d+_GRGS_([a-zA-Z0-9_\-]+)(\.txt)?(\.gz)?$' elif mission is not None: - # deliasing products with mission listed + # dealiasing products with mission listed args = (DSET, mission) pattern = r'{0}-2_([a-zA-Z0-9_\-]+)_{1}_([a-zA-Z0-9_\-]+)(\.gz)?$' else: - # deliasing products: use products in standard format + # dealiasing products: use products in standard format args = (DSET,) pattern = r'{0}-2_([a-zA-Z0-9_\-]+)(\.gz)?$' # return the compiled regular expression operator diff --git a/scripts/plot_AIS_GrIS_maps.py b/scripts/plot_AIS_GrIS_maps.py index 898d70be..a082fb43 100644 --- a/scripts/plot_AIS_GrIS_maps.py +++ b/scripts/plot_AIS_GrIS_maps.py @@ -399,7 +399,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_AIS_grid_3maps.py b/scripts/plot_AIS_grid_3maps.py index 86065c6f..352ea0db 100644 --- a/scripts/plot_AIS_grid_3maps.py +++ b/scripts/plot_AIS_grid_3maps.py @@ -307,7 +307,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_AIS_grid_4maps.py b/scripts/plot_AIS_grid_4maps.py index baac6693..550ef497 100644 --- a/scripts/plot_AIS_grid_4maps.py +++ b/scripts/plot_AIS_grid_4maps.py @@ -308,7 +308,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_AIS_grid_maps.py b/scripts/plot_AIS_grid_maps.py index 585a13fd..0125d3b1 100644 --- a/scripts/plot_AIS_grid_maps.py +++ b/scripts/plot_AIS_grid_maps.py @@ -318,7 +318,7 @@ def plot_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: @@ -550,7 +550,7 @@ def plot_grid(base_dir, FILENAME, ax1.spines['geo'].set_capstyle('projecting') # adjust subplot within figure - fig.subplots_adjust(left=0.02,right=0.98,bottom=0.02,top=0.98) + fig.subplots_adjust(left=0.02,right=0.98,bottom=0.01,top=0.97) # create output directory if non-existent FIGURE_FILE.parent.mkdir(mode=MODE, parents=True, exist_ok=True) # save to file diff --git a/scripts/plot_AIS_grid_movie.py b/scripts/plot_AIS_grid_movie.py index 94f68ba4..ce956b41 100644 --- a/scripts/plot_AIS_grid_movie.py +++ b/scripts/plot_AIS_grid_movie.py @@ -322,7 +322,7 @@ def animate_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_AIS_regional_maps.py b/scripts/plot_AIS_regional_maps.py index b935a798..4196dcd9 100644 --- a/scripts/plot_AIS_regional_maps.py +++ b/scripts/plot_AIS_regional_maps.py @@ -397,7 +397,7 @@ def plot_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_AIS_regional_movie.py b/scripts/plot_AIS_regional_movie.py index 528aa0be..ac966ddd 100644 --- a/scripts/plot_AIS_regional_movie.py +++ b/scripts/plot_AIS_regional_movie.py @@ -402,7 +402,7 @@ def animate_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_GrIS_grid_3maps.py b/scripts/plot_GrIS_grid_3maps.py index b317cee1..5e80b57f 100644 --- a/scripts/plot_GrIS_grid_3maps.py +++ b/scripts/plot_GrIS_grid_3maps.py @@ -324,7 +324,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_GrIS_grid_5maps.py b/scripts/plot_GrIS_grid_5maps.py index a766d8f6..9d804ab4 100644 --- a/scripts/plot_GrIS_grid_5maps.py +++ b/scripts/plot_GrIS_grid_5maps.py @@ -307,7 +307,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_GrIS_grid_maps.py b/scripts/plot_GrIS_grid_maps.py index 440970c7..d42373bc 100644 --- a/scripts/plot_GrIS_grid_maps.py +++ b/scripts/plot_GrIS_grid_maps.py @@ -331,7 +331,7 @@ def plot_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: @@ -564,7 +564,7 @@ def plot_grid(base_dir, FILENAME, ax1.spines['geo'].set_capstyle('projecting') # adjust subplot within figure - fig.subplots_adjust(left=0.02,right=0.99,bottom=0.02,top=0.96) + fig.subplots_adjust(left=0.02,right=0.99,bottom=0.01,top=0.95) # create output directory if non-existent FIGURE_FILE.parent.mkdir(mode=MODE, parents=True, exist_ok=True) # save to file diff --git a/scripts/plot_GrIS_grid_movie.py b/scripts/plot_GrIS_grid_movie.py index 39fa1b50..b2ebc63e 100644 --- a/scripts/plot_GrIS_grid_movie.py +++ b/scripts/plot_GrIS_grid_movie.py @@ -343,7 +343,7 @@ def animate_grid(base_dir, FILENAME, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_QML_grid_3maps.py b/scripts/plot_QML_grid_3maps.py index d9ec864e..ae50db05 100644 --- a/scripts/plot_QML_grid_3maps.py +++ b/scripts/plot_QML_grid_3maps.py @@ -313,7 +313,7 @@ def plot_grid(base_dir, FILENAMES, cmap.set_bad(alpha=0.0) else: # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_3maps.py b/scripts/plot_global_grid_3maps.py index e20993ee..d8736213 100644 --- a/scripts/plot_global_grid_3maps.py +++ b/scripts/plot_global_grid_3maps.py @@ -178,7 +178,7 @@ def plot_grid(base_dir, FILENAMES, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_4maps.py b/scripts/plot_global_grid_4maps.py index 77633229..96fcf4c4 100644 --- a/scripts/plot_global_grid_4maps.py +++ b/scripts/plot_global_grid_4maps.py @@ -178,7 +178,7 @@ def plot_grid(base_dir, FILENAMES, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_5maps.py b/scripts/plot_global_grid_5maps.py index f58cc31b..5deef916 100644 --- a/scripts/plot_global_grid_5maps.py +++ b/scripts/plot_global_grid_5maps.py @@ -179,7 +179,7 @@ def plot_grid(base_dir, FILENAMES, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_9maps.py b/scripts/plot_global_grid_9maps.py index 8c584837..4406f4ce 100644 --- a/scripts/plot_global_grid_9maps.py +++ b/scripts/plot_global_grid_9maps.py @@ -178,7 +178,7 @@ def plot_grid(base_dir, FILENAMES, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_maps.py b/scripts/plot_global_grid_maps.py index f23ac3fd..761abd59 100644 --- a/scripts/plot_global_grid_maps.py +++ b/scripts/plot_global_grid_maps.py @@ -176,7 +176,7 @@ def plot_grid(base_dir, FILENAME, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: diff --git a/scripts/plot_global_grid_movie.py b/scripts/plot_global_grid_movie.py index 3d629a0f..eff08e2e 100644 --- a/scripts/plot_global_grid_movie.py +++ b/scripts/plot_global_grid_movie.py @@ -175,7 +175,7 @@ def animate_grid(base_dir, FILENAME, # colormap cmap = copy.copy(cm.get_cmap(COLOR_MAP)) # grey color map for bad values - cmap.set_bad('w',0.5) + cmap.set_bad('lightgray',1.0) # set transparency ALPHA if BOUNDARY is None: From 7fbdc1990f08741c3b31ff0d91528a2e18078527 Mon Sep 17 00:00:00 2001 From: Tyler Sutterley Date: Thu, 5 Jun 2025 16:15:26 -0700 Subject: [PATCH 3/4] Update python-request.yml --- .github/workflows/python-request.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/python-request.yml b/.github/workflows/python-request.yml index 9829eb8f..1cff97f4 100644 --- a/.github/workflows/python-request.yml +++ b/.github/workflows/python-request.yml @@ -13,7 +13,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - python-version: [3.11] + python-version: [3.12] env: OS: ${{ matrix.os }} PYTHON: ${{ matrix.python-version }} From 2013ae4b77c6428c7442efffde492bffe2c7c3c9 Mon Sep 17 00:00:00 2001 From: Tyler Sutterley Date: Thu, 5 Jun 2025 16:20:02 -0700 Subject: [PATCH 4/4] Update test_download_and_read.py --- test/test_download_and_read.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test_download_and_read.py b/test/test_download_and_read.py index f25be6a9..02bbcdf5 100644 --- a/test/test_download_and_read.py +++ b/test/test_download_and_read.py @@ -123,7 +123,7 @@ def test_itsg_graz_download_and_read(): itsg_file.unlink() # PURPOSE: Download Sutterley and Velicogna (2019) geocenter files -@pytest.fixture(scope="module", autouse=True) +@pytest.fixture(scope="module", autouse=False) def download_geocenter(): # download geocenter files to filepath filename = inspect.getframeinfo(inspect.currentframe()).filename @@ -138,6 +138,7 @@ def download_geocenter(): @pytest.mark.parametrize("PROC", ['CSR','GFZ','JPL']) @pytest.mark.parametrize("DREL", ['RL06']) # PURPOSE: read Sutterley and Velicogna (2019) geocenter files +@pytest.mark.skip(reason='presently skipping download from figshare') def test_geocenter_read(PROC, DREL): filename = inspect.getframeinfo(inspect.currentframe()).filename filepath = pathlib.Path(filename).absolute().parent