title = "Example combining static chunking and dynamic cycling."
description = """A yearly dynamic cycle within which we split a model run into
three 4-month chunks, triggering the first chunk of the year of the last chunk
of the previous year."""
# NOTE: we'd normally recommend simply using a 4-monthly dynamic cycle for this!
[cylc]
    cycle point format = %Y-%m
    [[parameters]]
        r = 0..1
        m = 0..1
        c = 0..2
[scheduling]
    initial cycle point = 2010-01
    final cycle point = 2012-01
    [[dependencies]]
        [[[R1]]]
            graph = start => prep
        [[[P1Y]]]
            graph = """
    prep[-P1Y] => prep => init<r>
    init<r> => sim<r,m,c=0>
    sim<r,m,c> => post<r,m,c> => comb<r> => done
    sim<r,m,c-1> => sim<r,m,c>  # inter-chunk
    sim<r,m,c=2>[-P1Y] => sim<r,m,c=0>  # inter-cycle
    done[-P1Y] => done"""
        [[[R1/P0Y]]]
            graph = done => stop
[runtime]
    [[prep]]
    [[INIT, SIM, POST, COMB]]
    [[init<r>]]
        inherit = INIT
    [[sim<r,m,c>]]
        inherit = SIM
    [[post<r,m,c>]]
        inherit = POST
    [[comb<r>]]
        inherit = COMB
    [[done]]

[visualization]
    [[node attributes]]
        INIT = "color=orange"
        SIM = "color=red"
        POST = "color=steelblue"
        COMB = "color=darkgreen"
        start = "style=filled" "fillcolor=green"
        stop = "style=filled" "fillcolor=red"
        prep = "color=yellow3"
        done = "color=magenta"
        sim<r,m,c=0> = "style=filled", "fillcolor=yellow2"
        sim<r,m,c=1> = "style=filled", "fillcolor=yellow3"
        sim<r,m,c=2> = "style=filled", "fillcolor=yellow4"
