Skip to content
Open
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
37 changes: 35 additions & 2 deletions notebooks/tutorials/massbalance_calibration.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"\n",
"from oggm import cfg, utils, workflow, tasks, graphics\n",
"from oggm.core import massbalance\n",
"from oggm.core.massbalance import mb_calibration_from_scalar_mb, mb_calibration_from_geodetic_mb, mb_calibration_from_wgms_mb"
"from oggm.core.massbalance import mb_calibration_from_scalar_mb, mb_calibration_from_geodetic_mb, mb_calibration_from_wgms_mb, mb_calibration_to_rmsd"
]
},
{
Expand Down Expand Up @@ -621,6 +621,39 @@
"mbdf_in_situ[['ref_mb','mod_mb']].std()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Calibrating on direct glaciological in-situ MB observations with the RMSD\n",
"\n",
"In the case above, we are calibrating with the in-situ observations using `mb_calibration_from_wgms_mb`, however this calibration technique takes the mean of these observation values. When taking the mean of our dataset, we can lose some statistical detail that could help us improve our calibration.\n",
"\n",
"From our annual MB observations, we have one observation for each year in the observation period. This means that we can calibrate with some new methods and success criteria capturing new data characteristics such as interannual data variability!\n",
"\n",
"A new calibration method has been introduced in the OGGM that requires annual mass balance observations, this is the `mb_calibration_to_rmsd` function. To calibrate, we use the Root Mean Square Deviation, to calculate the squared deviations between each observed value, year by year. \n",
"\n",
"We then minimise the squared deviations as our loss function and calibrate our mass balance parameters using multi-parameter optimisation. This is a difference from the other calibration methods, which calibrate one parameter per optimisation. \n",
"\n",
"Let's see an example use case!"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We start by just performing a calibration with just the melt factor mass balance parameter. "
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"mb_calibration_to_rmsd(gdir_hef, ref_df=mbdf_in_situ['ref_mb'], overwrite_gdir=True)"
]
},
{
"cell_type": "markdown",
"metadata": {
Expand Down Expand Up @@ -1373,7 +1406,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.3"
"version": "3.11.13"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,
Expand Down
Loading