Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Aug 23, 2024
1 parent dc4aebd commit d322103
Show file tree
Hide file tree
Showing 8 changed files with 107 additions and 72 deletions.
4 changes: 3 additions & 1 deletion _toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
format: jb-book
root: notebooks/welcome
chapters:

- file: book/10minutes
sections:
- file: notebooks/10minutes/preprocessed_directories
- file: notebooks/10minutes/run_with_gcm
- file: notebooks/10minutes/machine_learning
- file: notebooks/10minutes/dynamical_spinup

- file: book/workflow
sections:
- file: notebooks/tutorials/working_with_rgi
- file: notebooks/tutorials/store_and_compress_glacierdirs
- file: notebooks/tutorials/deal_with_errors
- file: notebooks/tutorials/elevation_bands_vs_centerlines
- file: notebooks/tutorials/building_the_prepro_gdirs
- file: notebooks/tutorials/full_prepro_workflow
- file: notebooks/tutorials/rebuilding_the_prepro_gdirs

- file: book/massbalance
sections:
Expand Down
1 change: 1 addition & 0 deletions book/workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
- [](../notebooks/tutorials/store_and_compress_glacierdirs.ipynb)
- [](../notebooks/tutorials/deal_with_errors.ipynb)
- [](../notebooks/tutorials/elevation_bands_vs_centerlines.ipynb)
- [](../notebooks/tutorials/building_the_prepro_gdirs.ipynb)
- [](../notebooks/tutorials/full_prepro_workflow.ipynb)
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).\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",
"\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
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,30 @@
"cells": [
{
"cell_type": "markdown",
"id": "fce08c8d-349a-4d05-9f15-acf45635b6d0",
"id": "0",
"metadata": {},
"source": [
"# Step-by-Step guide to rebuilding the preprocessed directories from scratch"
"# Step-by-Step guide to building preprocessed directories from scratch"
]
},
{
"cell_type": "markdown",
"id": "897ed423-1f0c-4e8a-a6cb-96b5b628a6c2",
"id": "1",
"metadata": {},
"source": [
"This guide is for anyone who wants to learn how to start from scratch with the preprocessed directories of OGGM. You might even use your own data. This tutorial assumes you are already familiar with OGGM basics. We won't go into every little detail here, but you'll find links for more information if you're interested.\n",
"This guide is for anyone who wants to learn how to start from scratch with building preprocessed directories, the same way OGGM does for its users. You might even use your own data. This tutorial assumes you are already familiar with OGGM basics. We won't go into every little detail here, but you'll find links for more information if you're interested.\n",
"\n",
"We've structured the guide into five main sections, each dedicated to a different level of preprocessing. At the beginning of each section, we'll outline the tasks to be performed, the data we'll use, and provide links to related tutorials. Additionally, at the end of each section, we'll share a corresponding `prepro_base_url`. This URL allows you to start directly at that level with everything pre-setup, bypassing the need to complete the earlier steps. Plus, in the tutorial [store_and_compress_glacierdirs](tutorials/store_and_compress_glacierdirs.ipynb), we show you how to save your work. This way, you don't have to redo everything from the beginning every time (many steps only need to be done once).\n",
"We've structured the guide into five main sections, each dedicated to a different level of preprocessing. At the beginning of each section, we'll outline the tasks to be performed, the data we'll use, and provide links to related tutorials. Additionally, at the end of each section, we'll share a corresponding `prepro_base_url`. This URL allows you to start directly at that level with everything pre-setup, bypassing the need to complete the earlier steps. Plus, in the tutorial [storing glacier directories for later use](store_and_compress_glacierdirs.ipynb), we show you how to save your work. This way, you don't have to redo everything from the beginning every time (many steps only need to be done once).\n",
"\n",
"**Tags:** advanced, glacier-directory, workflow\n",
"\n",
"Tip: There's a lot to learn here. If you're curious about a specific function and want to know more, just add a question mark (?) right after it, and you'll see more details."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "4c3453d8-ab5e-40dd-9848-f9f62d3446bd",
"id": "2",
"metadata": {
"tags": []
},
Expand All @@ -35,15 +37,7 @@
},
{
"cell_type": "markdown",
"id": "3b187aa3-4ca9-4167-968f-d41794a6e04e",
"metadata": {},
"source": [
"**Tags:** advanced, glacier-directory, workflow"
]
},
{
"cell_type": "markdown",
"id": "41158452-78e2-43e2-857e-f8195e01a29e",
"id": "3",
"metadata": {},
"source": [
"## Set-up\n",
Expand All @@ -60,7 +54,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "42ae6382-1036-4928-8c67-1d5e2aea60bf",
"id": "4",
"metadata": {
"tags": []
},
Expand All @@ -76,7 +70,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "3a29aeff-2f43-4b72-bc36-0c3c0164a54d",
"id": "5",
"metadata": {
"tags": []
},
Expand All @@ -90,7 +84,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "267fda12-59f9-4884-9a4e-5e5116b39c70",
"id": "6",
"metadata": {
"tags": []
},
Expand All @@ -104,7 +98,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0ff5627d-21fc-4e94-9aab-063e5ea72b47",
"id": "7",
"metadata": {
"tags": []
},
Expand All @@ -119,7 +113,7 @@
},
{
"cell_type": "markdown",
"id": "12c7bb0a-973d-4423-82b0-d59257d396bf",
"id": "8",
"metadata": {},
"source": [
"## Level 0\n",
Expand All @@ -141,7 +135,7 @@
},
{
"cell_type": "markdown",
"id": "5c0be655-9c70-4ac4-9c93-bd68c398d4b8",
"id": "9",
"metadata": {},
"source": [
"<div class=\"alert alert-danger\">\n",
Expand All @@ -154,7 +148,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b6bb1aee-e358-42c3-90d4-a3415496a441",
"id": "10",
"metadata": {
"tags": []
},
Expand All @@ -173,7 +167,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "94010c12-4482-4793-b830-b826b49358fb",
"id": "11",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -192,7 +186,7 @@
},
{
"cell_type": "markdown",
"id": "b2ec49ed-23ea-454b-b83f-b4de4ae8a143",
"id": "12",
"metadata": {},
"source": [
"## Level 1\n",
Expand All @@ -213,7 +207,7 @@
},
{
"cell_type": "markdown",
"id": "7126872c-090d-403d-851f-28d6a4207b20",
"id": "13",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
Expand All @@ -224,7 +218,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "51709fc8-2134-467b-ba78-5547f1ff7213",
"id": "14",
"metadata": {
"tags": []
},
Expand All @@ -238,17 +232,18 @@
"cfg.PARAMS['fixed_dx'] = cfg.PARAMS['fixed_dx'] # This allows setting a specific resolution in meters. It's applicable only when grid_dx_method is set to 'fixed'.\n",
"\n",
"# set the DEM source to use\n",
"source = None # we stick with the OGGM default\n",
"source = 'COPDEM90' # we use COPDEM here\n",
"\n",
"# this task adds the DEM and defines the local grid\n",
"workflow.execute_entity_task(tasks.define_glacier_region, gdirs,\n",
"workflow.execute_entity_task(tasks.define_glacier_region, \n",
" gdirs,\n",
" source=source);"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8c380a6c-89c4-4ff0-982e-a2fad54ecf05",
"id": "15",
"metadata": {
"tags": []
},
Expand All @@ -269,7 +264,7 @@
},
{
"cell_type": "markdown",
"id": "a1c2de9f-2c92-4c63-b286-b45c7b732f42",
"id": "16",
"metadata": {},
"source": [
"## Level 2\n",
Expand All @@ -294,7 +289,7 @@
},
{
"cell_type": "markdown",
"id": "3ce0d72e-9cbc-4314-b0c4-66f754e0cb71",
"id": "17",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
Expand All @@ -305,7 +300,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "a3b25ae1-4b01-431d-99f5-899d5800add7",
"id": "18",
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -345,13 +340,13 @@
" workflow.execute_entity_task(task, gdirs);\n",
" \n",
"else:\n",
" raise ValueError(f\"Unknown flowline type '{flowline_type_to_use}'! Select 'elevation_band' or 'centerline'!\")\n"
" raise ValueError(f\"Unknown flowline type '{flowline_type_to_use}'! Select 'elevation_band' or 'centerline'!\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7f7a9a58-8169-454e-a987-9eadc37c2f72",
"id": "19",
"metadata": {
"tags": []
},
Expand All @@ -378,7 +373,7 @@
},
{
"cell_type": "markdown",
"id": "f17d8c9a-0450-41a6-86e9-2ca5b596c8cb",
"id": "20",
"metadata": {},
"source": [
"## Level 3\n",
Expand All @@ -405,7 +400,7 @@
},
{
"cell_type": "markdown",
"id": "79a387c6-a5cc-4626-ab9d-79d2baaea332",
"id": "21",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
Expand All @@ -416,7 +411,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "02db978c-7a84-48c1-9f61-45d1fb0f96ad",
"id": "22",
"metadata": {
"tags": []
},
Expand Down Expand Up @@ -451,7 +446,7 @@
},
{
"cell_type": "markdown",
"id": "88378ac9-2311-4e60-8341-42a42093715b",
"id": "23",
"metadata": {},
"source": [
"**Guidance on utilizing various baseline climates:**\n",
Expand Down Expand Up @@ -493,7 +488,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "1bd30f3d-bdfe-411e-a112-d141687c13dc",
"id": "24",
"metadata": {
"tags": []
},
Expand All @@ -520,7 +515,7 @@
},
{
"cell_type": "markdown",
"id": "d06d0a9d-adb2-4b13-8002-00a90d9b643d",
"id": "25",
"metadata": {},
"source": [
"## Level 4\n",
Expand All @@ -541,7 +536,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "28e16c17-5af9-41e9-bebd-111068a6d5a5",
"id": "26",
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -581,7 +576,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5c4cb7f8-9187-44e9-969d-fe4834f7a7a2",
"id": "27",
"metadata": {
"tags": []
},
Expand All @@ -607,7 +602,7 @@
},
{
"cell_type": "markdown",
"id": "dd5da8f3-ade6-4bf5-ac47-cef0b7ac4e77",
"id": "28",
"metadata": {},
"source": [
"## Level 5\n",
Expand All @@ -625,7 +620,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c03a9cdb-590a-4b6e-b953-2e521cba6f7f",
"id": "29",
"metadata": {
"tags": []
},
Expand All @@ -640,7 +635,7 @@
},
{
"cell_type": "markdown",
"id": "8302f4ac-d893-4da1-9f9c-916357fcc491",
"id": "30",
"metadata": {},
"source": [
"<div class=\"alert alert-info\">\n",
Expand All @@ -651,7 +646,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9460379a-1c8c-4b2b-a605-36b3a58e234f",
"id": "31",
"metadata": {
"tags": []
},
Expand All @@ -677,15 +672,15 @@
},
{
"cell_type": "markdown",
"id": "b020d5cf-0b49-411e-9768-7448772636ae",
"id": "32",
"metadata": {},
"source": [
"And that's it! We've successfully recreated all the preprocessed levels offered by OGGM. Remember, if you prefer, you can bypass all previous steps and jump straight into your future projections from Level 5. Happy modeling!"
]
},
{
"cell_type": "markdown",
"id": "1809b9aa-27aa-4feb-9374-ad130b47c665",
"id": "33",
"metadata": {},
"source": [
"## What's next?\n",
Expand All @@ -711,7 +706,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.12.4"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit d322103

Please sign in to comment.