Input context

Input context#

The input Context is a dictionary used to fill the Jinja templates to generate the submitted job script.

For instance, the following line, declared for instance in the tasks.cfg file

echo "the {{ app_conf }} model"

will be converted to

echo "the CROCO model"

The minimal content of this dictionary is the following, in alphabetical order:

Name

Type

Explanation

Example

app_conf

str or None

App configuration name

"MANGA".

app_exp

str or None

App experiment name

"RUN2025".

app_name

str or None

App name

"CROCO".

app_path

str or None

Merged version.

"CROCO/MANGA/RUN2025"

context

Context

Itself

cycle

Cycle or None

Current cycle

cycles_begin_date

WoomDate or None

First date of cycles

Timestamp('2020-01-01 00:00:00')

cycles_end_date

WoomDate or None

Last date of cycles

Timestamp('2020-01-03 00:00:00')

cycles_freq

Timedelta or None

Time step of cycles.

Timedelta('0 days 12:00:00')

cycles_round

str or None

Rounding precision

"D"

task_context_json

str

Path to the json file for this task context [1]

"{{ task_submission_dir }}/context.json"

task_env

EnvConfig

Task environment configuration [1]

env_vars

dict

User and generated declared environment variables

host

Host

Host instance

hostmanager

HostManager

Host manager instance

logger

logging.Logger

The worflow logger

member

Member or None

Current member

nmembers

int

Ensemble size

5

task_submission_dir

str

Job submission directory [1]

“/home/username/woom/myworkflow/jobs/task_path”`

task_run_dir

str

Job run directory [1]

“/scratch/username/woom/myapp/prolog/mytask”`

task_script_path

str

Path to the job script [1]

"{{ task_submission_dir }}/job.sh"

paths

dict

Local workflow paths (bin, lib, lib/python…)

scratch_dir

str

Path to the scratch dir

"/scratch/username/woom"

task

Task or None

Task instance

task_name

str or None

Task instance

"run_ibc"

task_path

str

{app_path}/{cycle.token}/{task_name}/{member.label} [1]

"CROCO/MANGA/EXP/2020-01-01T12:00:00/run_ibc"

task_tree

TastTree

Task tree instance [1]

"run_ibc"

taskmanager

TaskManager

Task manager instance

os

os

os module

params

dict

User-defined parameters from the [params] section of the workflow configuration. Access with params.<name> (e.g., {{ params.my_param }})

workflow

Workflow

Workflow instance

workflow_dir

str

Workflow dir

“/home/username/woom/myworkflow”`

<name>_dir

str

Directories declared in the host configuration