Skip to content

Embed CONTINUE logic within suite.rc instead of access-coupled #4

Open
@atteggiani

Description

@atteggiani

Overview

In the access-coupled script there is the following logic to set CONTINUE=false for warm restarts that are "new runs" (WARM_RESTART_NRUN=true):

# If it's the first cycle of a WARM_RESTART_NRUN set CONTINUE false so the UM
# does an NRUN
if [[ ${WARM_RESTART_NRUN,,} == "true" && $CYLC_TASK_CYCLE_POINT == $CYLC_SUITE_INITIAL_CYCLE_POINT ]] ; then
echo "Setting CONTINUE=false for WARM_RESTART_RUN"
export CONTINUE=false
fi

while the logic to set CONTINUE in an ACCESS-CM2 suite.rc script (for example for u-cy339 ) is the following:

{% if WARM_RESTART and not RECON %}
    CONTINUE = true
{% else %}
    CONTINUE = $( if [[ $CYLC_TASK_CYCLE_POINT == $CYLC_SUITE_INITIAL_CYCLE_POINT ]]; then echo ""; else echo "true"; fi)
{% endif %}

I think the logic in the access-coupled script should instead be placed inside the suite.rc itself, without changing the value of CONTINUE in a different script after setting it inside the suite.
In adition, when WARM_RESTART = false or WARM_RESTART = false and RECON = true the logic currently present in access-coupled should not run.

Solution

  • Delete the lines referenced above from the access-coupled script.
  • The logic in suite.rc should be changed to:
    {% if WARM_RESTART and not RECON and not WARM_RESTART_NRUN %}
        CONTINUE = true
    {% else %}
        CONTINUE = $( if [[ $CYLC_TASK_CYCLE_POINT == $CYLC_SUITE_INITIAL_CYCLE_POINT ]]; then echo "false"; else echo "true"; fi)
    {% endif %}
    

Why is this important

This would:

  • allow the user to better understand what the value of CONTINUE is and how to control it
  • avoid setting CONTINUE in two different places, especially because the access-coupled script is somehow "hidden" for the less-experienced user
  • avoid running the logic when WARM_RESTART = false or WARM_RESTART = false and RECON = true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions