@@ -451,27 +451,30 @@ Primarily, for self-containment (see :ref:`Self-Contained Workflows`) shared IO
451
451
paths should be under the *workflow share directory *, the location of which is
452
452
passed to all tasks as ``$CYLC_WORKFLOW_SHARE_DIR ``.
453
453
454
- The ``rose task-env `` utility can provide additional environment
455
- variables that refer to static and cyclepoint-specific locations under the
456
- workflow share directory.
454
+ The ``$CYLC_TASK_SHARE_CYCLE_DIR `` variable can be used to target
455
+ cyclepoint-specific locations under the workflow share directory.
457
456
458
- .. code-block :: cylc
457
+ Sometimes it may be useful to refer to other cycles - to do this use
458
+ ``isodatetime ``:
459
459
460
- [runtime]
461
- [[my-task]]
462
- env-script = $(eval rose task-env -T P1D -T P2D)
460
+ .. code-block :: bash
463
461
464
- For a current cycle point of ``20170105 `` this will make the following
465
- variables available to tasks:
462
+ # Cylc task script
463
+ CYCLE_POINT_MINUS_P1D=$( isodatetime " ${CYLC_TASK_CYCLE_POINT} --offset -P1D)"
464
+ SHARE_CYCLE_DIR_MINUS_P1D=" ${CYLC_WORKFLOW_SHARE_DIR} /cycle/${CYCLE_POINT_MINUS_P1D} "
465
+ mkdir -p " ${SHARE_CYCLE_DIR_MINUS_P1D} "
466
+ echo " I believe in ..." > " ${SHARE_CYCLE_DIR_MINUS_P1D} /somefile"
466
467
467
- .. code-block :: bash
468
+ See ` ` isodatetime --help` ` for usage instructions.
469
+
470
+ .. versionadded:: 8.5.0
468
471
469
- ROSE_DATA= $CYLC_WORKFLOW_SHARE_DIR /data
470
- ROSE_DATAC= $CYLC_WORKFLOW_SHARE_DIR /cycle/20170105
471
- ROSE_DATACP1D= $CYLC_WORKFLOW_SHARE_DIR /cycle/20170104
472
- ROSE_DATACP2D= $CYLC_WORKFLOW_SHARE_DIR /cycle/20170103
472
+ ` ` $CYLC_TASK_SHARE_CYCLE_DIR ` ` (used in combination with the ` ` isodatetime ` `
473
+ command) is designed to
474
+ provide a Cylc internal replacement for the use of ` ` rose task-env ` `
475
+ to provide ` ` $ROSE_DATAC ` ` and derived variables.
473
476
474
- Subdirectories of ``$ROSE_DATAC `` etc. should be agreed between
477
+ Subdirectories of ` ` $CYLC_TASK_SHARE_CYCLE_DIR ` ` should be agreed between
475
478
different sub-systems of the workflow; typically they are named for the
476
479
file-generating tasks, and the file-consuming tasks should know to look there.
477
480
0 commit comments