10 minutes to… understand the new dynamical spinup in OGGM v1.6#

In this example, we highlight a recent addition to OGGM: a dynamical spinup during the historical period.

# Libs
import xarray as xr
import matplotlib.pyplot as plt

# Locals
import oggm.cfg as cfg
from oggm import utils, workflow, tasks
from oggm.shop import gcm_climate
Downloading salem-sample-data...

Accessing the pre-processed directories including spinup runs#

Let’s focus on our usual suspect glacier: Hintereisferner.

# Initialize OGGM and set up the default run parameters
cfg.initialize(logging_level='WARNING')

# Local working directory (where OGGM will write its output)
cfg.PATHS['working_dir'] = utils.gettempdir('OGGM_gcm_run', reset=True)

# RGI glacier 
rgi_ids = utils.get_rgi_glacier_entities(['RGI60-11.00897'])
2023-03-10 19:11:42: oggm.cfg: Reading default parameters from the OGGM `params.cfg` configuration file.
2023-03-10 19:11:42: oggm.cfg: Multiprocessing switched OFF according to the parameter file.
2023-03-10 19:11:42: oggm.cfg: Multiprocessing: using all available processors (N=2)

To fetch the preprocessed directories including spinup, we have to tell OGGM where to find them:

# Currently only available with border 160
cfg.PARAMS['border'] = 160 
base_url = 'https://cluster.klima.uni-bremen.de/~oggm/gdirs/oggm_v1.6/L3-L5_files/2023.1/elev_bands/W5E5_spinup'
gdirs = workflow.init_glacier_directories(rgi_ids, from_prepro_level=5, prepro_base_url=base_url)
2023-03-10 19:11:57: oggm.cfg: PARAMS['border'] changed from `80` to `160`.
2023-03-10 19:11:57: oggm.workflow: init_glacier_directories from prepro level 5 on 1 glaciers.
2023-03-10 19:11:57: oggm.workflow: Execute entity tasks [gdir_from_prepro] on 1 glaciers

A new workflow including a recalibration#

These directories are very similar to the default ones (same input data, same baseline climate…), but they have a few differences:

TODO

What’s next?#