Skip to content

Commit

Permalink
#3571: Add a COMPARE family
Browse files Browse the repository at this point in the history
  • Loading branch information
ehogan committed Jun 25, 2024
1 parent 3361ea6 commit b120b47
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
[command]
default=rtw-env python ${COMPARE_SCRIPT} ${KGO_DIR} ${COMPARISON_OUTPUT_DIR} --verbose
default=BASH_XTRACEFD=1 # Send the output from 'set -x' to 'stdout' rather than 'stderr'.
=set -euxo pipefail
=rtw-env python ${COMPARE_SCRIPT} ${KGO_DIR} ${COMPARISON_OUTPUT_DIR} --verbose
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# ${PATH} by Cylc).

[command]
default=cp ${ENV_FILE_SITE_PATH} ${SHARE_BIN_DIR}/${ENV_FILE}
default=BASH_XTRACEFD=1 # Send the output from 'set -x' to 'stdout' rather than 'stderr'.
=set -euxo pipefail
=cp ${ENV_FILE_SITE_PATH} ${SHARE_BIN_DIR}/${ENV_FILE}

[file:${SHARE_BIN_DIR}]
mode=mkdir
Original file line number Diff line number Diff line change
Expand Up @@ -91,26 +91,30 @@
ROSE_TASK_APP = process
RECIPE_PATH = "${CYLC_TASK_PARAM_medium//--//}.yml"

[[COMPARE]]
inherit = None, COMPUTE
[[[environment]]]
ROSE_TASK_APP = compare
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARE_SCRIPT=${ESMVALTOOL_DIR}/esmvaltool/utils/testing/regression/compare.py

# Bash variable manipulation `##*--` below strips leading path from recipe
# parameter to obtain RECIPE_NAME.
# RECIPE_NAME is the recipe file basename without yml extension, as used by
# ESMValTool for naming output directories. E.g. for the recipe
# examples/recipe_python.yml, RECIPE_NAME=recipe_python
[[compare<fast>]]
inherit = None, COMPUTE
inherit = COMPARE
[[[environment]]]
ROSE_TASK_APP = compare
RECIPE_NAME = "${CYLC_TASK_PARAM_fast##*--}"
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARE_SCRIPT=${ESMVALTOOL_DIR}/esmvaltool/utils/testing/regression/compare.py
COMPARISON_OUTPUT_DIR=${OUTPUT_DIR}/${RECIPE_NAME}*
KGO_DIR=${KGO_ROOT_PATH}/${RECIPE_NAME}*

[[compare<medium>]]
inherit = None, COMPUTE
inherit = COMPARE
[[[environment]]]
ROSE_TASK_APP = compare
RECIPE_NAME = "${CYLC_TASK_PARAM_medium##*--}"
KGO_ROOT_PATH = {{ KGO_ROOT_PATH }}
COMPARISON_OUTPUT_DIR=${OUTPUT_DIR}/${RECIPE_NAME}*
KGO_DIR=${KGO_ROOT_PATH}/${RECIPE_NAME}*

{% include 'site/' ~ SITE ~ '.cylc' %}

0 comments on commit b120b47

Please sign in to comment.