- oggm.workflow.init_glacier_directories(rgidf=None, *, reset=False, force=False, from_prepro_level=None, prepro_border=None, prepro_rgi_version=None, prepro_base_url=None, from_tar=False, delete_tar=False)¶
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.
Careful: when starting from a pre-processed directory with from_prepro_level or from_tar, the existing directories will be overwritten!
- rgidfGeoDataFrame 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.
delete the existing glacier directories if found.
setting reset=True will trigger a yes/no question to the user. Set force=True to avoid this.
get the gdir data from the official pre-processed pool. If this argument is set, the existing directories will be overwritten!
for from_prepro_level only: if you want to override the default behavior which is to use cfg.PARAMS[‘border’]
for from_prepro_level only: if you want to override the default behavior which is to use cfg.PARAMS[‘rgi_version’]
for from_prepro_level only: if you want to override the default URL from which to download the gdirs. Default can be accessed from
from oggm.utils import GDIR_L3L5_URL
- from_tarbool or str, 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 the original tar file after extraction. If this argument is set, the existing directories will be overwritten!
- gdirslist of
the initialised glacier directories
- gdirslist of
This task is very similar to init_glacier_regions, with one main difference: it does not process the DEMs for this glacier. Eventually, init_glacier_regions will be deprecated and removed from the codebase.