This code accompanies an in review paper for JGR Earth Surface.
This is a brief overview of what you'll find in this repository:
After cloning this repository, you can use
conda
(or mamba) to install required dependencies from the provided environment.yaml
file.
conda env create -f environment.yaml
conda activate englacial_velocity
The flowline_ode
directory contains all of the core code for the method described
in the paper. Notebook examples are provided using this code. The
Englacial Velocity 2D.ipynb
notebook is the best place to start exploring.
The greenland stability_analysis
directory relates to the appendices of the paper.
See the section below on reproducing figures for details.
Figure 1 is a schematic depiction and has no code associated with it.
The Adobe Illustrator file and corresponding PNG are available in figures/layer_slope_cartoon_revision1.ai
and figures/layer_slope_cartoon_revision1.png
.
The Zero Slope Approx Error Examples.ipynb
is used to produce figures/zero-slope-errors-with.png
.
Figure 3 is a schematic depiction and has no code associated with it.
The Adobe Illustrator file and corresponding PNG are available in figures/error_geometry.ai
and figures/error_geometry.png
.
Figure 4 is created by Plot Rheology Results.ipynb
from three stored runs saved
as pickle files in the outputs_stored/
directory.
These three runs may be reproduced by running Englacial Velocity 2D.ipynb
three
times, setting the rheology exponent (n
) to 2
, 3
, and 4
.
Each time you run the notebook, an output tag is created in the form
outputs/YYYYMMDD_HHMMSS
. The main data output will be stored as
outputs/YYYYMMDD_HHMMSS.pickle
. Other figures saved will be stored as
outputs/YYYYMMDD_HHMMSS_figure_name.png
.
Figure 5 is created by Englacial Velocity 2D.ipynb
. Set n=3
(back to the default)
and then change the enhancement factor by uncommenting this line:
enhancement_factor_sym = 2 - (sympy.tanh((z - 1600)/100)) # Use this for the enhancement factor example (spatially variable rheology)
The output will be stored as YYYYMMDD_HHMMSS_stress_strain_rate.png
.
Figures 6, 7, and 8 are created by the Basal Slip Example.ipynb
notebook. This notebook
works almost exactly the same was as Englacial Velocity 2D.ipynb
.
The figure outputs will be stored as:
- Figure 6:
YYYYMMDD_HHMMSS_n2.0_vertical_velocity_error.png
- Figure 7:
YYYYMMDD_HHMMSS_n2.0_surface_bed_botlayer_velocity
- Figure 8:
YYYYMMDD_HHMMSS_n2.0_layer_misalignment.png
Figure 9 is created by starting with a scenario genereated by Englacial Velocity 2D.ipynb
and then re-running it multiple times with various noise simulated.
An example starting point is provided in outputs_stored/20241023_125643_n2.0.pickle
.
This can be generated by running Englacial Velocity 2D.ipynb
with n=2
.
Once generated (or using the stored output), run
Run Example With Noise.ipynb
to generate repeated re-runs of this example with
varying noise levels. (The notebook just needs to be run once -- it will look through
your specified noise levels.)
Finally, run Plot Noise Results.ipynb
, which will automatically collect the
output files from Run Example With Noise.ipynb
and produce plots. If you re-generated
the base example pickle file, you'll need to update this notebook with the path
to the same input you used for Run Example With Noise.ipynb
.
To run the notebooks associated with the appendices, you'll need several
publicly-available datasets. The greenland_stability_analysis/data
directory
is included empty in this repository. Once you've colleced the appropriate data,
it should look like this:
$ ls -lh greenland_stability_analysis/data
total 12G
2.5G BedMachineGreenland-v5.nc
3.2G GRE_G0120_0000.nc
2.2G RRRAG4_Greenland_1993_2013_01_age_grid.nc
1.4G RRRAG4_Greenland_1993_2013_01_radiostratigraphy.mat
The data files can be obtained from:
- BedMachine Greenland v5: https://nsidc.org/data/idbmg4/versions/5
- Radiostratigraphy and Age Structure of the GIS: https://nsidc.org/data/rrrag4/versions/1
- ITS_LIVE Greenland Surface Velocity: https://nsidc.org/apps/itslive/
Figure A1 is generated by greenland_stability_analysis/Greenland Stability.ipynb
.
Figure A2 is generated by greenland_stability_analysis/Greenland SIA.ipynb
.