oggm.workflow.execute_entity_task#

oggm.workflow.execute_entity_task(task, gdirs, **kwargs)[source]#

Execute a task on gdirs.

If you asked for multiprocessing, it will do it.

If task has more arguments than gdir they have to be keyword arguments.

Parameters
taskfunction or sequence of functions

The entity task(s) to apply. Can be None, in which case each gdir is expected to be a tuple of (task, gdir). When passing a sequence, each item can also optionally be a tuple of (task, dictionary). In this case the dictionary items will be passed to the task as kwargs.

gdirslist of oggm.GlacierDirectory objects

The glacier directories to process. Each individual gdir can optionally be a tuple of (gdir, dictionary). In this case, the values in the dictionary will be passed to the task as keyword arguments for that specific gdir.

Returns
List of results from task. Last task if a list of tasks was given.