Skip to content

Instantly share code, notes, and snippets.

@brews
Created January 14, 2022 23:55
Show Gist options
  • Save brews/e6533e9660efafdd02e10df871442dfa to your computer and use it in GitHub Desktop.
Save brews/e6533e9660efafdd02e10df871442dfa to your computer and use it in GitHub Desktop.
Launch downscale CMIP6 (dc6) Argo Workflow end-to-end tasmin runs with various parameter files.
#! /usr/bin/env bash
# 2022-01-14
# B. Malevich <[email protected]>
# Launch Argo Workflow end-to-end runs with various parameter files.
set -e
VARIABLE_ID="tasmin"
declare -a TARGET_SOURCES=(
"ACCESS-CM2"
"ACCESS-ESM1-5"
# "AWI-CM-1-1-MR"
"BCC-CSM2-MR"
# "CAMS-CSM1-0"
# "CMCC-CM2-SR5"
# "CMCC-ESM2"
# "CanESM5"
# "EC-Earth3"
# "EC-Earth3-Veg"
# "EC-Earth3-Veg-LR"
"FGOALS-g3"
"GFDL-CM4"
# "GFDL-ESM4"
"INM-CM4-8"
"INM-CM5-0"
# "KACE-1-0-G"
# "KIOST-ESM"
"MIROC-ES2L"
"MIROC6"
# "MPI-ESM-1-2-HAM"
# "MPI-ESM1-2-HR"
# "MPI-ESM1-2-LR"
# "MRI-ESM2-0"
"NESM3"
"NorESM2-LM"
"NorESM2-MM"
# "UKESM1-0-LL"
)
for s in "${TARGET_SOURCES[@]}"
do
echo "${s}"
TARGET_PARAM_FILE="https://raw.githubusercontent.com/ClimateImpactLab/downscaleCMIP6/master/workflows/parameters/${s}-${VARIABLE_ID}.yaml"
echo "${TARGET_PARAM_FILE}"
# Check that parameter file exists. No URL typos.
if curl --output /dev/null --silent --head --fail "${TARGET_PARAM_FILE}"
then
# Note using lowercase source_id for generateName.
argo submit --from "workflowtemplate/e2e-${VARIABLE_ID}-jobs" \
--parameter-file "${TARGET_PARAM_FILE}" \
--priority 0 \
--generate-name "e2e-${s@L}-${VARIABLE_ID}-" \
--labels="source_id=${s},variable_id=${VARIABLE_ID},env=prod"
else
echo "WARNING Parameter file does not exist: ${TARGET_PARAM_FILE}"
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment