Last active
December 23, 2021 20:53
-
-
Save brews/2a910211beb9acf5ff97c5306647716f to your computer and use it in GitHub Desktop.
Launch Argo Workflow end-to-end runs for diurnal temperature range (DTR) for various parameter files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #! /usr/bin/env bash | |
| # 2021-12-21 | |
| # B. Malevich <[email protected]> | |
| # Launch Argo Workflow end-to-end runs with various parameter files. | |
| set -e | |
| VARIABLE_ID="dtr" | |
| declare -a TARGET_SOURCES=( | |
| "ACCESS-CM2" | |
| "ACCESS-ESM1-5" | |
| "AWI-CM-1-1-MR" | |
| "BCC-CSM2-MR" | |
| "CanESM5" | |
| "EC-Earth3" | |
| "EC-Earth3-Veg" | |
| "EC-Earth3-Veg-LR" | |
| "FGOALS-g3" | |
| "GFDL-CM4" | |
| "GFDL-ESM4" | |
| "INM-CM4-8" | |
| "INM-CM5-0" | |
| "KIOST-ESM" | |
| "MIROC-ES2L" | |
| "MIROC6" | |
| "MPI-ESM1-2-HR" | |
| "MPI-ESM1-2-LR" | |
| "MRI-ESM2-0" | |
| "NESM3" | |
| "NorESM2-LM" | |
| "NorESM2-MM" | |
| ) | |
| 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