Hi there.
Because I came across an edge-case just now in some coupled modelling dev work, just wondering if there is job script environment variable called something like $CYLC_WORKFLOW_RUN_NUMBER, i.e. the run1 in u-ab123/run1?
I can’t see one mentioned in the docs and I guess I could do…
$ basename $CYLC_WORKFLOW_ID
Anyway, just curious!
Cheers
Jonny
Hi Jonny,
No, there’s no job environment variable for the workflow run number; and note that workflows can be installed with a custom run name or no run name at all – see cylc install --help.
If there is one (which is the default) you can get it from the basename of $CYLC_WORKFLOW_ID (as you noted) or $CYLC_WORKFLOW_RUN_DIR
Hilary
1 Like
Thanks Hilary!
Good point about the custom run name, I hadn’t thought of that.
Cheers
Jonny