Skip to content

Getting there #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ out.*
RGI60-*
sandbox/
outputs
ignore/
ignore/

# Mac
.DS_Store
Expand Down
7 changes: 5 additions & 2 deletions _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,17 @@ chapters:
- file: notebooks/tutorials/run_with_a_spinup_and_gcm_data
- file: notebooks/tutorials/dynamical_spinup
- file: notebooks/tutorials/numeric_solvers
- file: notebooks/tutorials/ioggm

- file: book/thickness
sections:
- file: notebooks/tutorials/inversion
- file: notebooks/tutorials/observed_thickness_with_dynamic_spinup

- file: book/calving
sections:
- file: notebooks/tutorials/kcalving_parameterization

- file: book/shop
sections:
- file: notebooks/tutorials/oggm_shop
Expand All @@ -67,7 +72,5 @@ chapters:
- file: book/construction
sections:
- file: notebooks/construction/inversion_with_frontal_ablation
- file: notebooks/construction/kcalving_parameterization
- file: notebooks/construction/merging_glaciers.ipynb
- file: notebooks/construction/area_length_filter

3 changes: 3 additions & 0 deletions book/calving.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Calving

- [](../notebooks/tutorials/kcalving_parameterization.ipynb)
2 changes: 0 additions & 2 deletions book/construction.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# Tutorials in (re-)construction

- [](../notebooks/construction/inversion_with_frontal_ablation.ipynb)
- [](../notebooks/construction/kcalving_parameterization.ipynb)
- [](../notebooks/construction/merging_glaciers.ipynb)
- [](../notebooks/construction/area_length_filter.ipynb)
1 change: 1 addition & 0 deletions book/dynamics.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
- [](../notebooks/tutorials/run_with_a_spinup_and_gcm_data.ipynb)
- [](../notebooks/tutorials/dynamical_spinup.ipynb)
- [](../notebooks/tutorials/numeric_solvers.ipynb)
- [](../notebooks/tutorials/ioggm.ipynb)
Binary file added img/show_viewer.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion notebooks/10minutes/preprocessed_directories.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
"- `RGI60-11.00897`: [Hintereisferner](http://acinn.uibk.ac.at/research/ice-and-climate/projects/hintereisferner) in the Austrian Alps.\n",
"- `RGI60-18.02342`: [Tasman Glacier](https://en.wikipedia.org/wiki/Tasman_Glacier) in New Zealand\n",
"- `RGI60-11.00787`: [Kesselwandferner](https://de.wikipedia.org/wiki/Kesselwandferner) in the Austrian Alps\n",
"- ... or any other glacier identifier! You can find other glacier identifiers by exploring the [GLIMS viewer](https://www.glims.org/maps/glims). See the [working with the RGI](working_with_rgi.ipynb) tutorial for an introduction on RGI IDs and the GLIMS browser.\n",
"- ... or any other glacier identifier! You can find other glacier identifiers by exploring the [GLIMS viewer](https://www.glims.org/maps/glims). See the [working with the RGI](../tutorials/working_with_rgi.ipynb) tutorial for an introduction on RGI IDs and the GLIMS browser.\n",
"\n",
"For an operational run on an RGI region, you might want to download the [Randolph Glacier Inventory](https://www.glims.org/RGI/) dataset instead, and start a run from it. This case is covered in the [working with the RGI](../tutorials/working_with_rgi.ipynb) tutorial."
]
Expand Down
64 changes: 0 additions & 64 deletions notebooks/construction/merging_glaciers.ipynb

This file was deleted.

35 changes: 19 additions & 16 deletions notebooks/tutorials/building_the_prepro_gdirs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@
"- Optionally intersects\n",
"\n",
"Related Tutorials:\n",
"- [working_with_rgi](tutorials/working_with_rgi.ipynb) will show you how to read glacier outline files and prepare them for a run\n",
"- [use_your_own_inventory](tutorials/use_your_own_inventory.ipynb): Use custom glacier inventories with OGGM"
"- [working_with_rgi](working_with_rgi.ipynb) will show you how to read glacier outline files and prepare them for a run\n",
"- [use_your_own_inventory](use_your_own_inventory.ipynb): Use custom glacier inventories with OGGM"
]
},
{
Expand Down Expand Up @@ -158,6 +158,9 @@
"rgidf = gpd.read_file(utils.get_rgi_region_file(rgi_region, version='62'))\n",
"rgidf = rgidf[np.isin(rgidf.RGIId, rgi_ids)]\n",
"\n",
"# We also take care of intersects for this RGI version\n",
"cfg.set_intersects_db(utils.get_rgi_intersects_region_file(rgi_region, version='62'))\n",
"\n",
"# set the used projection used for gdir, options 'tmerc' or 'utm'\n",
"cfg.PARAMS['map_proj'] = cfg.PARAMS['map_proj'] # default is 'tmerc'\n",
"\n",
Expand Down Expand Up @@ -201,8 +204,8 @@
"- DEM file\n",
"\n",
"Related Tutorials:\n",
"- [dem_sources](tutorials/dem_sources.ipynb): Create local topography maps from different DEM sources with OGGM\n",
"- [rgitopo_rgi6](tutorials/rgitopo_rgi6.ipynb): RGI-TOPO for RGI v6.0"
"- [dem_sources](dem_sources.ipynb): Create local topography maps from different DEM sources with OGGM\n",
"- [rgitopo_rgi6](rgitopo_rgi6.ipynb): RGI-TOPO for RGI v6.0"
]
},
{
Expand Down Expand Up @@ -281,10 +284,10 @@
"- Optional: additional datasets\n",
"\n",
"Related Tutorials:\n",
"- [elevation_bands_vs_centerlines](tutorials/elevation_bands_vs_centerlines.ipynb): Differences between \"elevation band\" and \"centerline\" flowlines\n",
"- [numeric_solvers](tutorials/numeric_solvers.ipynb): Understand the difference between the ice dynamic solvers in OGGM\n",
"- [oggm_shop](tutorials/oggm_shop.ipynb): OGGM-Shop and Glacier Directories in OGGM\n",
"- [ingest_gridded_data_on_flowlines](tutorials/ingest_gridded_data_on_flowlines.ipynb): ingest gridded products such as ice velocity into OGGM (and compare them with model output)"
"- [elevation_bands_vs_centerlines](elevation_bands_vs_centerlines.ipynb): Differences between \"elevation band\" and \"centerline\" flowlines\n",
"- [numeric_solvers](numeric_solvers.ipynb): Understand the difference between the ice dynamic solvers in OGGM\n",
"- [oggm_shop](oggm_shop.ipynb): OGGM-Shop and Glacier Directories in OGGM\n",
"- [ingest_gridded_data_on_flowlines](ingest_gridded_data_on_flowlines.ipynb): ingest gridded products such as ice velocity into OGGM (and compare them with model output)"
]
},
{
Expand Down Expand Up @@ -392,10 +395,10 @@
"- Volume estimate (default source: [Farinotti et al. (2019)](https://www.nature.com/articles/s41561-019-0300-3))\n",
"\n",
"Related Tutorials:\n",
"- [oggm_shop](tutorials/oggm_shop.ipynb): OGGM-Shop and Glacier Directories in OGGM\n",
"- [massbalance_calibration](tutorials/massbalance_calibration.ipynb): A look into the new mass balance calibration in OGGM v1.6\n",
"- [massbalance_perturbation](tutorials/massbalance_perturbation.ipynb): Mass balance parameter perturbation experiments\n",
"- [inversion](tutorials/inversion.ipynb): run the OGGM ice thickness inversion model with various ice parameters"
"- [oggm_shop](oggm_shop.ipynb): OGGM-Shop and Glacier Directories in OGGM\n",
"- [massbalance_calibration](massbalance_calibration.ipynb): A look into the new mass balance calibration in OGGM v1.6\n",
"- [massbalance_perturbation](massbalance_perturbation.ipynb): Mass balance parameter perturbation experiments\n",
"- [inversion](inversion.ipynb): run the OGGM ice thickness inversion model with various ice parameters"
]
},
{
Expand Down Expand Up @@ -451,7 +454,7 @@
"source": [
"**Guidance on utilizing various baseline climates:**\n",
"\n",
"Currently, OGGM supports a variety of baseline climates, including 'CRU', 'HISTALP', 'W5E5', 'GSWP3_W5E5' (the default), 'ERA5', 'ERA5L', 'CERA', 'ERA5dr', and 'ERA5L-HMA'. Although switching between these datasets is straightforward, calibrating the mass balance model according to each dataset is more complex. For instance, you'll need to choose a default precipitation factor that suits both your selected climate dataset and your specific region. Additionally, you must determine the best method to calibrate the mass balance parameters. For a comprehensive guide on the available options, explanations, and how to incorporate your own geodetic observations, please refer to the tutorial [massbalance_calibration](tutorials/massbalance_calibration.ipynb).\n",
"Currently, OGGM supports a variety of baseline climates, including 'CRU', 'HISTALP', 'W5E5', 'GSWP3_W5E5' (the default), 'ERA5', 'ERA5L', 'CERA', 'ERA5dr', and 'ERA5L-HMA'. Although switching between these datasets is straightforward, calibrating the mass balance model according to each dataset is more complex. For instance, you'll need to choose a default precipitation factor that suits both your selected climate dataset and your specific region. Additionally, you must determine the best method to calibrate the mass balance parameters. For a comprehensive guide on the available options, explanations, and how to incorporate your own geodetic observations, please refer to the tutorial [massbalance_calibration](massbalance_calibration.ipynb).\n",
"\n",
"Here's an example of using the ERA5 dataset:\n",
"\n",
Expand Down Expand Up @@ -529,8 +532,8 @@
"\n",
"Related Tutorials:\n",
"- 10 minutes to... [the new dynamical spinup in OGGM v1.6](../10minutes/dynamical_spinup.ipynb)\n",
"- [dynamical_spinup](tutorials/dynamical_spinup.ipynb): a deeper dive into the dynamical spinup for past simulations\n",
"- [numeric_solvers](tutorials/numeric_solvers.ipynb): Understand the difference between the ice dynamic solvers in OGGM"
"- [dynamical_spinup](dynamical_spinup.ipynb): a deeper dive into the dynamical spinup for past simulations\n",
"- [numeric_solvers](numeric_solvers.ipynb): Understand the difference between the ice dynamic solvers in OGGM"
]
},
{
Expand Down Expand Up @@ -614,7 +617,7 @@
"- No additional data is needed for this level.\n",
"\n",
"Related Tutorials:\n",
"- [store_and_compress_glacierdirs](tutorials/store_and_compress_glacierdirs.ipynb): storing glacier directories for later use\n"
"- [store_and_compress_glacierdirs](store_and_compress_glacierdirs.ipynb): storing glacier directories for later use\n"
]
},
{
Expand Down
5 changes: 2 additions & 3 deletions notebooks/tutorials/dem_sources.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If not specifying anything, OGGM will use it's default settings, i.e. NASADEM for mid- and low-latitudes (60°S-60°N). However, this needs registration at [NASA Earthdata](https://urs.earthdata.nasa.gov/) (see [below](#register)). Here, we choose the **SRTM** source as example DEM (no registration necessary)."
"If not specifying anything, OGGM will use it's default settings, i.e. NASADEM for mid- and low-latitudes (60°S-60°N). However, this needs registration at [NASA Earthdata](https://urs.earthdata.nasa.gov/) (see \"Register\" below). Here, we choose the **SRTM** source as example DEM (no registration necessary)."
]
},
{
Expand Down Expand Up @@ -177,7 +177,6 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"<a id='register'></a>\n",
"## Register for online datasets\n",
"The default DEM source for low and mid-latitudes (60°S-60°N), **NASADEM**, requires a user account to download data, so you need to register at [NASA Earthdata](https://urs.earthdata.nasa.gov/). There are other DEM sources where a registration is necessary; for **ASTGTMV3** at [NASA Earthdata](https://urs.earthdata.nasa.gov/), for **TanDEM-X** at [DLR](https://sso.eoc.dlr.de/tdm90/selfservice/), and for **COPDEM** at [spacedata.copernicus.eu/](https://spacedata.copernicus.eu).\n",
"\n",
Expand Down Expand Up @@ -493,7 +492,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
3 changes: 1 addition & 2 deletions notebooks/tutorials/dynamical_spinup.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@
"\n",
"If for whatever reason one wants to conduct the dynamic *melt_f* calibration without an inversion or does not want to include a dynamic spinup, reach out to us as there are already options included for this.\n",
"\n",
"\n",
"## The minimization algorithm:\n",
"\n",
"To start, a first guess of the control variable (temperature bias or *melt_f*) is used and evaluated. If by chance, the mismatch between model and observation is close enough, the algorithm stops already. Otherwise, the second guess depends on the calculated first guess mismatch. For example, if the first resulting area is smaller (larger) than the searched one, the second temperature bias will be colder (warmer). Because a colder (warmer) temperature leads to a larger (smaller) initial glacier state at *t_start*. If the second guess is still unsuccessful, for all consecutive guesses the previous value pairs (control variable, mismatch) are used to determine the next guess. For this, a stepwise linear function is fitted to these pairs and afterwards, the mismatch is set to 0 to get the following guess (this method is similar to the one described in Zekollari et al. 2019 Appendix A). Moreover, a maximum step length between two guesses is defined as too large step-sizes could easily lead to failing model runs (e.g. see [here](#Two-main-problems-why-the-dynamic-spinup-could-not-work:)). Further, the algorithm was adapted independently inside ```run_dynamic_spinup``` and ```run_dynamic_melt_f_calibration``` to cope with failing model runs individually. Note that this minimization algorithm only works if the underlying relationship between the control variable and the mismatch is strictly monotone.\n",
Expand Down Expand Up @@ -848,7 +847,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
},
"toc": {
"base_numbering": 1,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/tutorials/hydrological_output.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
},
"toc": {
"base_numbering": 1,
Expand Down
41 changes: 41 additions & 0 deletions notebooks/tutorials/ioggm.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "0",
"metadata": {},
"source": [
"# \"Instructed OGGM\": running IGM within the OGGM workflow"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "1",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
"source": [
"<div class=\"alert alert-info\">\n",
" <b>\n",
" The calving parameterization in OGGM has been developped for versions of OGGM before 1.6 (mostly: 1.5.3). The v1.6 series brought several changes in the mass balance calibration which made a lot of the code obsolete and in need of updates. As of now (Feb 2024), calving dynamics are implemented in the dynamical model and \"work\". There is still quite some work to do make calving (including calibration) fully operational. \n",
" </b>\n",
" The calving parameterization in OGGM has been developped for versions of OGGM before 1.6 (mostly: 1.5.3). The v1.6 series brought several changes in the mass balance calibration which made a lot of the calibration code obsolete and in need of updates.As of today (August 2024), calving dynamics are implemented in the dynamical model and they \"work\", as illustrated below. However, there is still quite some work to make calving (including calibration) fully operational for large scale runs.</b><br>See <a href=\"https://github.com/OGGM/oggm/issues/1733\">this github issue</a> for a longer discussion.\n",
"</div>"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We implement the very simple frontal ablation parameterization of [Oerlemans & Nick (2005)](https://www.cambridge.org/core/journals/annals-of-glaciology/article/minimal-model-of-a-tidewater-glacier/C6B72F547D8C44CDAAAD337E1F2FC97F) in OGGM's flowline model:\n",
"We implement the simple frontal ablation parameterization of [Oerlemans & Nick (2005)](https://www.cambridge.org/core/journals/annals-of-glaciology/article/minimal-model-of-a-tidewater-glacier/C6B72F547D8C44CDAAAD337E1F2FC97F) in OGGM's flowline model:\n",
"\n",
"$$F_{calving} = k d H_f w$$\n",
"\n",
Expand Down Expand Up @@ -490,7 +489,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
},
"toc": {
"base_numbering": 1,
Expand Down
2 changes: 1 addition & 1 deletion notebooks/tutorials/run_with_a_spinup_and_gcm_data.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.4"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
20 changes: 18 additions & 2 deletions notebooks/tutorials/working_with_rgi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"The glacier outlines obtained from the [Randolph Glacier Inventory](https://www.glims.org/RGI/) are the reference dataset for global and regional applications in OGGM. The current version supported by is V6, and OGGM ships with a slightly modified version which we called `62`. OGGM also supports RGI 7, but not yet for full modelling workflows. A tutorial will follow!"
"The glacier outlines obtained from the [Randolph Glacier Inventory](https://www.glims.org/RGI/) are the reference dataset for global and regional applications in OGGM. The current version supported by is V6, and OGGM ships with a slightly modified version which we called `62`. OGGM also supports RGI 7, but not yet for full modelling workflows."
]
},
{
Expand All @@ -21,6 +21,22 @@
"**Tags:** beginner, glacier-directory, workflow, RGI"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Find out the ID of a glacier"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"If there is a glacier you like, and you would like to know their RGI6 or RGI7 id, we recommend the [GLIMS glacier viewer](https://www.glims.org/maps/glims). To find the RGI6 ID, you'll need to tick the \"RGI6\" box in the map layers, then click on the glacier of your choice as illustrated below.\n",
"\n",
"![](../../img/show_viewer.gif)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -45,7 +61,7 @@
"source": [
"# this might take a couple of minutes!\n",
"from oggm import utils\n",
"utils.get_rgi_dir(version='62') # path to the data after download"
"utils.get_rgi_dir(version='62') # path to the data after download - for RGI7, you can use '70G' (for the glacier product) or '70C' (for the glacier complex product)"
]
},
{
Expand Down
Loading
Loading