Skip to content

Commit 5bc031a

Browse files
RolfHutsverhoeven
andauthored
Finish case3 and4 (#28)
* Changed strat-time in use case 3 to be in line with use case 2 * text changes to notebook 3. Needs re-running but is taking (too?) long to start container on research cloud * oops. This commit is without the output folder! * fixed notebook 3 * finished text on case 3 and case 4. Needs final run to generate results and have cell-counts be nice in order. Once that is done, branch can be merged back into main. * Case4 output (#27) * Make case2 fair (#25) * tried to make notebook 2 FAIR, failed on technicallities. Try again after weekend * Found the porblem: using configparser creates .ini files that are byte for byte identical, but create an error when calling initialize(). Raised an issue for this, not something I can fix. * Fixed problem: used work-around * final edits to text of notebook2 before pull request * fixed and made FAIR case 2. Solved issue with configParser (thanks Stefan!) * Added output files from case 4 * Reran case 4 Co-authored-by: Rolf Hut <[email protected]> * moved files from case 5. Had to change filenames for 3 and 4 into 4 and 5 because Overleaf doesn't allow lists of sections to start at zero. Will change file names of other notebooks in other branch. Co-authored-by: Stefan Verhoeven <[email protected]>
1 parent f09bb45 commit 5bc031a

10 files changed

+1204
-739
lines changed

Case3ForcePCRGlobWBWithadditionalEvapInfo.ipynb

Lines changed: 0 additions & 714 deletions
This file was deleted.
-76.5 KB
Binary file not shown.
-135 KB
Binary file not shown.

Case4ForcePCRGlobWBWithadditionalEvapInfo.ipynb

Lines changed: 756 additions & 0 deletions
Large diffs are not rendered by default.

case4_MARRMOT_calibration_ensemble_RunSavanah.ipynb renamed to case5_MARRMOT_calibration_ensemble_RunSavanah.ipynb

Lines changed: 37 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"id": "dffd5e98",
1414
"metadata": {},
1515
"source": [
16-
"# Case study 4: Calibrate Marrmot M14 using GRDC data"
16+
"# Case study 5: Calibrate Marrmot M14 using GRDC data"
1717
]
1818
},
1919
{
@@ -25,13 +25,17 @@
2525
"The model used in this notebook is: [MARRMoT](https://github.com/wknoben/MARRMoT) M14 (TOPMODEL)\n",
2626
"We use [CMA Evolution Strategy (CMA-ES) algorithm](https://github.com/CMA-ES/pycma) package for finding the best parameters for the model. The procedure is explained in the cells below.\n",
2727
"\n",
28+
"This notebook is written in a different style of programming than the other notebooks in this repo. In this notebook functions for the most important parts of the analyses are written first, and subsequently called, instead of having a more script like style of programming. This is done for two reasons.\n",
29+
"\n",
30+
"1. Since many optimization algorithms, CMA-ES included, require functions to be optimized to be passed to the algorithm. This notebooks shows that the eWaterCycle platform support this type of workflow.\n",
31+
"2. This notebook shows that the script style of programming used in the other notebooks of this repository is not a requirement of the platform but rather a choice of the user and other styles of programming are equally supported.\n",
2832
"\n",
2933
"***NOTE: this notebooks is computationally expensive. Although it might possible to execute it on the demo machine (be sure to adapt the POPSIZE and MAXITER settings below), this is not recommended. This notebook has been executed on a machine with 24 cpu cores and took about 4 hours to complete. It is included here to demonstrate what is possible with ewatercycle, not as a performance benchmark. Please use it with care.***"
3034
]
3135
},
3236
{
3337
"cell_type": "code",
34-
"execution_count": 2,
38+
"execution_count": 1,
3539
"id": "21bb49ea",
3640
"metadata": {},
3741
"outputs": [
@@ -54,7 +58,7 @@
5458
},
5559
{
5660
"cell_type": "code",
57-
"execution_count": null,
61+
"execution_count": 2,
5862
"id": "2c8216fe",
5963
"metadata": {
6064
"tags": []
@@ -106,7 +110,7 @@
106110
},
107111
{
108112
"cell_type": "code",
109-
"execution_count": 2,
113+
"execution_count": 3,
110114
"id": "9bebaff3",
111115
"metadata": {
112116
"tags": []
@@ -129,9 +133,17 @@
129133
"## 1. Loading forcing data"
130134
]
131135
},
136+
{
137+
"cell_type": "markdown",
138+
"id": "7b0f49af-39f9-4427-bc10-b7fb4bac66e1",
139+
"metadata": {},
140+
"source": [
141+
"Note that while this notebook was run on the Cartesius supercomputer, the file system of the SURF research cloud has (on purpose) a similar structure to make sure that calls like the one below work on both machines."
142+
]
143+
},
132144
{
133145
"cell_type": "code",
134-
"execution_count": 3,
146+
"execution_count": 4,
135147
"id": "863ad1b9",
136148
"metadata": {},
137149
"outputs": [],
@@ -141,7 +153,7 @@
141153
},
142154
{
143155
"cell_type": "code",
144-
"execution_count": 4,
156+
"execution_count": 5,
145157
"id": "e8f244c9",
146158
"metadata": {},
147159
"outputs": [
@@ -191,11 +203,11 @@
191203
"and about `ask-and-tell interface` see an example at https://pypi.org/project/cma/.\n",
192204
"\n",
193205
"### Practical hints\n",
194-
"The `run_model()` function uses two CPU cores (model-octave, and bmi-server)\n",
206+
"The `run_model()` function uses 1.33 CPU cores (1 for model-octave, and 1/3 for communication)\n",
195207
"and takes about 4 min to run the model for the CALIBRATION period.\n",
196208
"There are 24 cores available in a `normal` partition on Cartesius.\n",
197209
"If you want to keep the running time to 4 min for e.g. CALIBRATION, you can\n",
198-
"have 12 runs simultaneously. Therefore, the `popsize:12` in the cma-es option.\n",
210+
"have 18 runs simultaneously. Therefore, the `popsize:18` in the cma-es option.\n",
199211
"If you want to get the results of the whole notebook after a\n",
200212
"reasenable amount of time, you can change `maxiter` in the cma-es option."
201213
]
@@ -210,18 +222,18 @@
210222
},
211223
{
212224
"cell_type": "code",
213-
"execution_count": 5,
225+
"execution_count": 6,
214226
"id": "fec6e64d",
215227
"metadata": {},
216228
"outputs": [],
217229
"source": [
218-
"POPSIZE = 18 # it can be equal to number of available cores/2\n",
230+
"POPSIZE = 18 # it can be equal to number of available cores * 0.75\n",
219231
"MAXITER = 50 # with this, the notebook takes ~4 hours (maximum)"
220232
]
221233
},
222234
{
223235
"cell_type": "code",
224-
"execution_count": 6,
236+
"execution_count": 7,
225237
"id": "feda0536",
226238
"metadata": {},
227239
"outputs": [],
@@ -392,7 +404,7 @@
392404
},
393405
{
394406
"cell_type": "code",
395-
"execution_count": 7,
407+
"execution_count": 8,
396408
"id": "e19135a5",
397409
"metadata": {
398410
"execution": {
@@ -453,7 +465,7 @@
453465
},
454466
{
455467
"cell_type": "code",
456-
"execution_count": 8,
468+
"execution_count": 9,
457469
"id": "e19fbdeb",
458470
"metadata": {
459471
"execution": {
@@ -505,7 +517,7 @@
505517
},
506518
{
507519
"cell_type": "code",
508-
"execution_count": 9,
520+
"execution_count": 10,
509521
"id": "8d96f4b3",
510522
"metadata": {
511523
"execution": {
@@ -581,9 +593,17 @@
581593
" return fig"
582594
]
583595
},
596+
{
597+
"cell_type": "markdown",
598+
"id": "1cc3fbe3-e522-4b26-bdfe-f053b4806d17",
599+
"metadata": {},
600+
"source": [
601+
"Since this run is done on the Cartesius supercomputer the output figure is written into the output folder as set in the configuration file. For this repo, this file has been manually copied into the figures sub-directory."
602+
]
603+
},
584604
{
585605
"cell_type": "code",
586-
"execution_count": 10,
606+
"execution_count": 11,
587607
"id": "ebf65971",
588608
"metadata": {
589609
"execution": {
@@ -616,19 +636,11 @@
616636
"fig = plot_parameters(calibration_results)\n",
617637
"fig.savefig(f\"{filename}.png\", bbox_inches=\"tight\", dpi=300)"
618638
]
619-
},
620-
{
621-
"cell_type": "code",
622-
"execution_count": null,
623-
"id": "41172288",
624-
"metadata": {},
625-
"outputs": [],
626-
"source": []
627639
}
628640
],
629641
"metadata": {
630642
"kernelspec": {
631-
"display_name": "Python 3",
643+
"display_name": "Python 3 (ipykernel)",
632644
"language": "python",
633645
"name": "python3"
634646
},
@@ -642,7 +654,7 @@
642654
"name": "python",
643655
"nbconvert_exporter": "python",
644656
"pygments_lexer": "ipython3",
645-
"version": "3.7.7"
657+
"version": "3.9.7"
646658
}
647659
},
648660
"nbformat": 4,

notebooksToWorkOutSmallSteps/FLX_US-Ha1_FLUXNET2015_SUBSET_DD_1991-2012_1-4.csv renamed to externalData/FLX_US-Ha1_FLUXNET2015_SUBSET_DD_1991-2012_1-4.csv

File renamed without changes.
75.8 KB
Loading
135 KB
Loading

0 commit comments

Comments
 (0)