Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions rose-stem/flow.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
{% set SITE_VARS = {} %}

{#- Import variable definitions #}
%include 'include/variables.rc'
%include 'include/variables.cylc'

[scheduler]
UTC mode = True
Expand All @@ -42,14 +42,14 @@
stall handlers = "suite_report_git.py -S $CYLC_WORKFLOW_RUN_DIR"

{#- Import any Cylc task parameters #}
%include 'include/parameters.rc'
%include 'include/parameters.cylc'

{#- Import the dependency graphs for the available jobs and groups #}
%include 'include/graph.rc'
%include 'include/graph.cylc'

[scheduling]
{#- Import any queues #}
%include 'include/queues.rc'
%include 'include/queues.cylc'

[[graph]]
R1 = """
Expand Down Expand Up @@ -103,5 +103,5 @@ export FCM_VERSION={{FCM_VERSION}}
{% endfor %}

{#- Import family and job definitions #}
%include 'include/runtime.rc'
%include 'runtime-common.rc'
%include 'include/runtime.cylc'
%include 'runtime-common.cylc'
4 changes: 2 additions & 2 deletions rose-stem/include/graph.rc → rose-stem/include/graph.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
###############################################################################

{% if SITE == 'meto' %}
%include 'include/meto/graph.rc'
%include 'include/meto/graph.cylc'
{% elif SITE == 'vm' %}
%include 'include/vm/graph.rc'
%include 'include/vm/graph.cylc'
{% endif %}
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


# Redefine site-independent SCRIPTS group
# (normally found in runtime-common.rc, Done to enforce loading of
# (normally found in runtime-common.cylc, Done to enforce loading of
# scitools when running on MONSooN ; Python 3 is req'd by UMDP3 checker)
[[SCRIPTS]]
inherit = None, METO_AZSPICE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Import site-specific parameter sets

# {% if SITE == 'niwa' %}
# %include 'include/niwa/parameters.rc'
# %include 'include/niwa/parameters.cylc'
# {% endif %}
4 changes: 2 additions & 2 deletions rose-stem/include/queues.rc → rose-stem/include/queues.cylc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Import site-specific queues

{% if SITE == 'meto' %}
%include 'include/meto/queues.rc'
%include 'include/meto/queues.cylc'
{% elif SITE == 'vm' %}
%include 'include/vm/queues.rc'
%include 'include/vm/queues.cylc'
{% endif %}
13 changes: 7 additions & 6 deletions rose-stem/include/runtime.rc → rose-stem/include/runtime.cylc
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@

[[SOURCE_EXTRACTION]]
post-script = """
mkdir $CYLC_WORKFLOW_RUN_DIR/bin/
cp $SOURCE_DIRECTORY/ukca/dependencies.yaml $CYLC_WORKFLOW_RUN_DIR
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/suite_report_git.py $CYLC_WORKFLOW_RUN_DIR/bin
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/suite_data.py $CYLC_WORKFLOW_RUN_DIR/bin
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/git_bdiff.py $CYLC_WORKFLOW_RUN_DIR/bin
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/get_git_sources.py $CYLC_WORKFLOW_RUN_DIR/bin
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/suite_report_git.py $CYLC_WORKFLOW_RUN_DIR/bin/
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/suite_data.py $CYLC_WORKFLOW_RUN_DIR/bin/
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/git_bdiff.py $CYLC_WORKFLOW_RUN_DIR/bin/
cp $SOURCE_DIRECTORY/SimSys_Scripts/github_scripts/get_git_sources.py $CYLC_WORKFLOW_RUN_DIR/bin/
"""
[[[environment]]]
ROSE_TASK_APP = extract_source
Expand Down Expand Up @@ -58,7 +59,7 @@ rsync -avz --exclude=".*" $SOURCE_DIRECTORY/* $hostname:$RELATIVE_SOURCE_DIRECTO
## Site-specific runtime definitions
###############################################################################
{% if SITE == 'meto' %}
%include 'include/meto/runtime.rc'
%include 'include/meto/runtime.cylc'
{% elif SITE == 'vm' %}
%include 'include/vm/runtime.rc'
%include 'include/vm/runtime.cylc'
{% endif %}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Redefine site-independent SCRIPTS group
# (normally found in runtime-common.rc)
# (normally found in runtime-common.cylc)
# Need to use python3 for this script
[[SCRIPTS]]
inherit = None, LINUX
Expand Down
8 changes: 7 additions & 1 deletion rose-stem/lib/python/read_sources.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
##############################################################################
# (c) Crown copyright 2025 Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
##############################################################################

import yaml
import tempfile
import os
Expand All @@ -13,7 +19,7 @@ def get_dependencies_file(wc_loc):
tempdir = tempfile.mkdtemp()

try:
host, path = wc_loc.split(":")
host, path = wc_loc.split(":", 1)
path = os.path.join(path, "dependencies.yaml")
copy_command = f"scp -o StrictHostKeyChecking=no {host}:"
except ValueError:
Expand Down
11 changes: 10 additions & 1 deletion rose-stem/lib/python/utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
##############################################################################
# (c) Crown copyright 2025 Met Office. All rights reserved.
# The file LICENCE, distributed with this code, contains details of the terms
# under which the code may be used.
##############################################################################

from subprocess import Popen, PIPE


Expand All @@ -8,4 +14,7 @@ def get_site():
out, _ = proc.communicate()
if proc.returncode or "SITE" not in out:
raise Exception('Could not determine the rose-stem "SITE"')
return out.replace("SITE=", "").strip()
# At some sites there may be many variables that are returned by rose config rose-stem
# Try to just grab the thing after SITE= and then ignore anything afterwards
site = out.split("SITE=")[1].split(' ')[0].strip()
return site
File renamed without changes.