Skip to content

Commit 4829129

Browse files
authored
Replace run_calibration_reg_glena.py with run_inversion.py (#149)
Closes #148
1 parent 476a2c7 commit 4829129

File tree

8 files changed

+29
-603
lines changed

8 files changed

+29
-603
lines changed

docs/model_structure.md

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ If you use a different file structure and do not update the relative file paths
3232
The model code itself is heavily commented with the hope that the code is easy to follow and develop further. After [installing PyGEM](install_pygem_target), downloading the required [input files](model_inputs_target), and setting up the [directory structure](directory_structure_target) (or modifying the *~/PyGEM/config.yaml* with your preferred directory structure) you are ready to run the code! Generally speaking, the workflow includes:
3333
* [Pre-process data](preprocessing_target) <em>(optional if including more data)</em>
3434
* [Set up configuration file](config_workflow_target)
35-
* [Calibrate frontal ablation parameter](workflow_cal_frontalablation_target) <em>(optional for marine-terimating glaciers)</em>
3635
* [Calibrate climatic mass balance parameters](workflow_cal_prms_target)
37-
* [Calibrate ice viscosity parameter](workflow_cal_glena_target)
36+
* [Calibrate frontal ablation parameter](workflow_cal_frontalablation_target) <em>(optional for marine-terimating glaciers)</em>
37+
* [Calibrate ice viscosity parameter](workflow_run_inversion_target)
3838
* [Run model simulation](workflow_sim_target)
3939
* [Post-process output](workflow_post_target)
4040
* [Analyze output](workflow_analyze_target)
@@ -92,17 +92,14 @@ Circularity issues exist in calibrating the frontal ablation parameter as the ma
9292
```
9393

9494

95-
(workflow_cal_glena_target)=
95+
(workflow_run_inversion_target)=
9696
### Calibrate ice viscosity model parameter
9797
The ice viscosity ("Glen A") model parameter is calibrated such that the ice volume estimated using the calibrated mass balance gradients are consistent with the reference ice volume estimates ([Farinotti et al. (2019)](https://www.nature.com/articles/s41561-019-0300-3)) for each RGI region. This is done by running the following:
9898
```
99-
run_calibration_reg_glena
99+
run_inversion
100100
```
101101

102-
If successful, the script will run without error and output the following:
103-
* ../Output/calibration/‘glena_region.csv’
104-
105-
For more details, see the [run_calibration_reg_glena.py Script Overview](run_calibration_reg_glena_overview_target).
102+
For more details, see the [run_inversion.py Script Overview](run_inversion_overview_target).
106103

107104

108105
(workflow_sim_target)=
@@ -130,7 +127,7 @@ For more details, see the [run_simulation.py Script Overview](run_simulation_tar
130127
There are currently several scripts available to post-process PyGEM simulations. To aggregate simulations by RGI region, climate scenario, and variable, run the *postproc_compile_simulations.py* script. For example to compile all Alaska's glacier mass, area, runoff, etc. for various scenarios we would run the following:
131128

132129
```
133-
compile_simulations -rgi_region 01 -scenario ssp245 ssp370 ssp585
130+
postproc_compile_simulations -rgi_region 01 -scenario ssp245 ssp370 ssp585
134131
```
135132

136133
(workflow_analyze_target)=

docs/run_calibration_reg_glena_overview.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

docs/run_inversion_overview.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(run_inversion_overview_target)=
2+
# run_inversion.py
3+
This script will perform ice thickness inversion while calibrating the ice viscosity ("Glen A") model parameter such that the modeled ice volume roughly matches the ice volume estimates from [Farinotti et al. (2019)](https://www.nature.com/articles/s41561-019-0300-3) for each RGI region. Run the script as follows:
4+
5+
```
6+
run_inversion -rgi_region01 <region>
7+
```
8+
9+
## Script Structure
10+
11+
Broadly speaking, the script follows:
12+
* Load glaciers
13+
* Load climate data
14+
* Compute apparent mass balance and invert for initial ice thickness
15+
* Use minimization to find agreement between our modeled and [Farinotti et al. (2019)](https://www.nature.com/articles/s41561-019-0300-3) modeled ice thickness estimates for each RGI region
16+
* Export the calibrated parameters
17+
18+
## Special Considerations
19+
The regional Glen A value is calibrated by inverting for the ice thickness of all glaciers in a given region without considering calving (all glaciers are considered land-terminating). After the "best" Glen A value is determined, a final round of ice thickness inversion is performed for tidewater glaciers with calving turned **on**. Running this script will by default export the regionally calibrated Glen A values to the path specfied by `sim.oggm_dynamics.glen_a_regional_relpath` in *~/PyGEM/config.yaml'*. The calibrated inversion parameters also get stored within a given glacier directories *diagnostics.json* file, e.g.:
20+
```
21+
{"dem_source": "COPDEM90", "flowline_type": "elevation_band", "apparent_mb_from_any_mb_residual": 2893.2237556771674, "inversion_glen_a": 3.784593106855888e-24, "inversion_fs": 0}
22+
```

docs/scripts_overview.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ maxdepth: 1
99
---
1010
1111
run_calibration_frontalablation_overview
12+
run_inversion_overview
1213
run_calibration_overview
13-
run_calibration_reg_glena_overview
1414
run_simulation_overview
1515
```

0 commit comments

Comments
 (0)