The ultimate goal of OGGM will be to hide the python workflow behind the model entirely, and run it only using configuration files and scripts. We are not there yet, and if you want to use and participate to the development of OGGM you’ll have to get your hands dirty. We hope however that the workflow is structured enough so that it is possible to jump in without having to understand all of its internals.
The few examples below are meant to illustrate the general design of OGGM, without going into the details of the implementation.
The following imports are necessary for all of the examples:
In : import geopandas as gpd In : import oggm In : import os In : from oggm import cfg, tasks, graphics In : from oggm.utils import get_demo_file
Initialisation and GlacierDirectories¶
The first thing to do when running OGGM is to initialise it. This function will read the default configuration file which contains all user defined parameters:
In : cfg.initialize()
These parameters are now accessible to all OGGM routines. For example, the
cfg.PARAMS dict contains some runtime parameters, while
the paths to the input files and the working directory (where the model output
will be written):
In : cfg.PARAMS['topo_interp'] Out: 'cubic' In : cfg.PARAMS['temp_default_gradient']