oggm.workflow.init_glacier_regions

oggm.workflow.init_glacier_regions(rgidf=None, *, reset=False, force=False, from_prepro_level=None, prepro_border=None, prepro_rgi_version=None, from_tar=False, delete_tar=False, use_demo_glaciers=None)[source]

Initializes the list of Glacier Directories for this run.

This is the very first task to do (always). If the directories are already available in the working directory, use them. If not, create new ones.

Parameters:
rgidf : GeoDataFrame or list of ids, optional for pre-computed runs

the RGI glacier outlines. If unavailable, OGGM will parse the information from the glacier directories found in the working directory. It is required for new runs.

reset : bool

delete the existing glacier directories if found.

force : bool

setting reset=True will trigger a yes/no question to the user. Set force=True to avoid this.

from_prepro_level : int

get the gdir data from the official pre-processed pool. See the documentation for more information

prepro_border : int

for from_prepro_level only: if you want to override the default behavior which is to use cfg.PARAMS[‘border’]

prepro_rgi_version : str

for from_prepro_level only: if you want to override the default behavior which is to use cfg.PARAMS[‘rgi_version’]

use_demo_glaciers : bool

whether to check the demo glaciers for download (faster than the standard prepro downloads). The default is to decide whether or not to check based on simple crietria such as glacier list size.

from_tar : bool, default=False

extract the gdir data from a tar file. If set to True, will check for a tar file at the expected location in base_dir.

delete_tar : bool, default=False

delete the original tar file after extraction.

delete_tar : bool, default=False

delete the original tar file after extraction.

Returns:
gdirs : list of oggm.GlacierDirectory objects

the initialised glacier directories