Hello,
Can you help me convert clock-triggers from old-style cylc7 syntax to the new-style cylc8 style? I see lots of very strange behaviour in my suites when running in cylc8 and I suspect it’s not dealing with clock-triggers in the same way in compatability mode. In cylc8, tasks get started that are way beyond the runahead and the scheduler doens’t wait for the clock-trigger time properly, as it would have done in cylc7.
I saw the notes in Workflow Configuration — Cylc 8.2.2 documentation and External Triggers — Cylc 8.2.2 documentation
but I can’t see how my existing suite.rc should be converted to this new syntax. My suites don’t look like these simple example, and the documentation is missing a before-and-after example showing how to port the old into the new style.
In my modelling suites each cycle point starts with a blank dummy task that, if successfully completed, starts the down-stream tasks that run the model cycle. The only purpose of these “start” tasks is to be clock-triggered, and their trigger time is an offset from the cycle point time (in UTC).
My suites have jinja2 switches in them which turn parts of the suite on/off. Because cylc7 only has a single point where clock-triggers were set, my solution was to build a list of tasks which then get added to the single clock-trigger statement. Here’s a simple example where the clock-trigger
statement is only used when the suite is not in HINDCAST mode (i.e. it’s in FORECAST mode, when you need to wait for certain start tasks to wait for their trigger time).
In my example below the CLOCK_TRIGGER_TASKS
would only include the fcst_XX_suite_start_12
tasks if the variable FORECAST_DAYS is greater than 0.
[[special tasks]]
{% if not HINDCAST %}
{% set CLOCK_TRIGGER_TASKS = [ ] %}
{{ CLOCK_TRIGGER_TASKS.append( "upd_suite_start_00(PT3H37M)" ) or "" }}
{{ CLOCK_TRIGGER_TASKS.append( "upd_suite_start_06(PT3H37M)" ) or "" }}
{{ CLOCK_TRIGGER_TASKS.append( "upd_suite_start_12(PT3H37M)" ) or "" }}
{{ CLOCK_TRIGGER_TASKS.append( "upd_suite_start_18(PT5H)" ) or "" }}
{% for DAY in range(0,FORECAST_DAYS|int) %}
{% set TSEC = 13800 + DAY * 440 %} # from 3H50M in steps of 7.333 minutes (440secs)
{{ CLOCK_TRIGGER_TASKS.append( "fcst" ~ ('%02d' % DAY) ~ "_suite_start_12(+PT" ~ ((TSEC/60/60%24) | int) ~"H" ~ ((TSEC/60%60) | int) ~ "M)" ) or$
{% endfor %}
{% if CLOCK_TRIGGER_TASKS|length %}
clock-trigger = {{ CLOCK_TRIGGER_TASKS|join(", ") }}
{% endif %}
{% endif %} {# HINDCAST #}
Is this syntax still supported, or do I need to port it to cylc8? And how would I do this?
My graph is defined further down in the [[dependencies]]
section where it was in cylc7, but in the notes for cylc8 (the links mentioned above) I see a very different structure, but I couldn’t find any documentation that had any examples of how to write this section in the new way.
So, I guess what I’m asking is how to port this minimal example (based on something quoted in the documentation) from old-style to new-style clock triggers, keeping in mind that I have these jinja2 rules about what goes when in the clock-trigger list
[scheduling]
[[special tasks]]
clock-trigger = foo(PT2H)
[[dependencies]]
[[[T00]]]
graph = """
foo
"""
The documentation gives an example of the new-style clock-trigger as
[scheduling]
initial cycle point = now
[[xtriggers]]
# Trigger 5 min after wallclock time is equal to cycle point.
clock = wall_clock(offset=PT5M)
[[graph]]
T00 = @clock => get-data => process-data
but there’s no mention of how to get from cylc7 to cylc8 style. The examples also use a strange short hand I’ve never used T00 = ...
- is that the same as [[[T00]] graph =""" ... """
?
Can you help?
Thanks, Fred