A comprehensive toolkit for computing global sea level changes from ice sheet variations using glacial isostatic adjustment (GIA) modeling. This repository implements elastic and viscoelastic Earth models to calculate sea level fingerprints from ice loading/unloading scenarios.
SLcode solves the gravitationally self-consistent sea level equation following the methodologies of Kendall et al. (2005) and Austermann et al. (2015). The code computes how sea level changes globally when ice masses change, accounting for:
- Gravitational effects: Changes in Earth's gravitational field due to ice and water redistribution
- Solid Earth deformation: Elastic and viscoelastic response to ice loading/unloading
- Rotational effects: Changes in Earth's rotation due to mass redistribution
- Ocean geometry changes: Self-consistent updating of coastlines and ocean basins
- Multiple Earth models: Elastic, viscoelastic, and benchmarked implementations
- Spherical harmonic methods: Efficient global computations using spectral techniques
- Real ice sheet data: Includes West Antarctic Ice Sheet collapse scenarios
- Comprehensive Love numbers: Pre-computed elastic parameters for various Earth models
- Visualization tools: Built-in plotting capabilities for sea level fingerprints
# Install dependencies
make install-deps
# Or manually:
pip3 install numpy scipy matplotlib pyshtools astropy xarray- MATLAB R2015b or later
- Signal Processing Toolbox recommended
# Run the main sea level solver
make
# Or explicitly:
make python-elastic# Elastic model (MATLAB)
make matlab-elastic
# Viscoelastic model (MATLAB)
make matlab-viscoelastic
# All benchmarked versions
make matlab-benchmarkedmake helpSL_equation_elastic.py- Primary Python implementation (Updated for Python 3, uses pyshtools)SL_equation_elastic_benchmarked.m- MATLAB elastic modelSL_equation_viscoelastic_benchmarked.m- MATLAB viscoelastic modelSL_equation_viscoelastic_GIAonly.m- MATLAB GIA-only modelSL_equation_DT.m- MATLAB dynamic topography model
SLcode_py/- Alternative Python implementation (legacy pyspharm-based)
SavedLN/- Love numbers for various Earth modelsSavedLN_EP/- Extended precision Love numbersice_grid/- Ice sheet data (West Antarctic Ice Sheet scenarios)SLcode_py/gebco_08_15am.mat- Global topography/bathymetry data
SLFunctions/- MATLAB utility functions for spherical harmonics, Love numbers, etc.plot_output/- Plotting tools for visualization
GRL_2022_proglacial_lakes/- Proglacial lakes study implementationCSDMS_workshop/- Workshop materials and examplesbenchmark_in_out/- Benchmark test cases
The code solves the gravitationally self-consistent sea level equation:
S(φ,λ,t) = N(φ,λ,t) - U(φ,λ,t)/g
Where:
S(φ,λ,t)is the sea level changeN(φ,λ,t)is the solid Earth deformationU(φ,λ,t)is the gravitational potential changeφ,λare latitude and longitudetis time
- Instantaneous response to loading
- Uses elastic Love numbers (h, k, l)
- Suitable for modern ice mass changes
- Time-dependent response
- Accounts for mantle viscosity
- Suitable for glacial timescales
The code expands all fields in spherical harmonics:
f(φ,λ) = Σ Σ f_lm Y_lm(φ,λ)
l m
Using optimized transforms via pyshtools for efficiency up to degree ~2800.
rho_ice = 916.7 kg/m³- Ice densityrho_water = 1000 kg/m³- Water densityrho_sed = 2300 kg/m³- Sediment densityg = 9.80616 m/s²- Gravitational accelerationrsphere = 6.37122e6 m- Earth radius
maxdeg = 64- Maximum spherical harmonic degreek_max = 10- Maximum iterations for convergenceepsilon = 1e-4- Convergence criterion
ice_grid/WAIS.mat- West Antarctic Ice Sheet dataice_Ant- Present-day ice thicknessice_EAIS- Future ice configurationlat_WAIS,lon_WAIS- Coordinate grids
SavedLN/prem.l90C.umVM2.lmVM2.mat- Love numbersh_el- Elastic displacement Love numbersk_el- Elastic gravitational Love numbersh_el_tide,k_el_tide- Tidal Love numbers
SLcode_py/gebco_08_15am.mat- Global relief model
The code produces a global map of relative sea level change normalized to the global mean sea level equivalent of the ice change.
plotSL- Normalized sea level fingerprintdelSL- Raw sea level changescaling_fact- Normalization factor
- Updated all print statements for Python 3
- Replaced deprecated
numpy.complexwithcomplex - Fixed deprecated
scipy.interpolate.interp2dwarnings - Implemented pyshtools integration for spherical harmonic transforms
- Migrated from pyspharm to pyshtools for better maintenance and accuracy
- pyshtools provides:
- Proven accuracy for spherical harmonic degrees up to 2800
- Multiple grid format support (DH, GLQ)
- Active development and comprehensive documentation
- Fast Fortran backend with Python interface
- Automatic interpolation to pyshtools-compatible grids
- Support for Driscoll-Healy (DH) and Gauss-Legendre Quadrature (GLQ) grids
- Proper m-primary to l-primary coefficient ordering conversion
-
Kendall, R.A., Mitrovica, J.X., and Milne, G.A. (2005). On post-glacial sea level - II. Numerical formulation and comparative results on spherically symmetric models. Geophysical Journal International, 161, 679-706.
-
Austermann, J., Mitrovica, J.X., Latychev, K., and Milne, G.A. (2015). Barbados-based estimate of ice volume at Last Glacial Maximum affected by subsequent sea-level change. Nature Geoscience, 6, 3-6.
-
Mitrovica, J.X., and Wahr, J. (2005). Time-variable gravity from GRACE: First results. Geophysical Research Letters, 32, L11402.
-
Wieczorek, M. A. and Meschede, M. (2018). SHTools — Tools for working with spherical harmonics, Geochemistry, Geophysics, Geosystems, 19, 2574-2592.
If you use this code in your research, please cite:
@software{slcode2024,
title={SLcode: Sea Level Equation Solver},
author={Austermann, Jacqueline and Wickert, Andrew},
year={2024},
note={Updated for Python 3 with pyshtools integration},
url={https://github.com/your-repo/slcode-enhanced}
}- For questions about the scientific methodology: See the references above
- For technical issues: Create an issue in the repository
- For MATLAB compatibility: Ensure you have required toolboxes
Academic use permitted. Please cite the relevant papers when using this code in publications.
This implementation has been updated and enhanced for modern Python environments while preserving the core scientific algorithms developed by J. Austermann and A. Wickert.