diff --git a/scripts/runCalibAndPlum.sh b/scripts/runCalibAndPlum.sh index b157b8db3a3246e69c8edb8e5a45b42fcd31dc67..3c635f574ce00a873a3059c1cc985731976c39f7 100755 --- a/scripts/runCalibAndPlum.sh +++ b/scripts/runCalibAndPlum.sh @@ -5,10 +5,11 @@ if [ $# -ne 1 ]; then exit 0 fi -jobName=${1//\//_}c # remove slash from path as qsub doesnt allow it -jobName=${jobName/hind1970/h_} -echo $jobName -calibJob=${jobName}_c +jobName=${1//\//_} # remove slash from path as qsub doesnt allow it +jobName=${jobName/hind1970/h} +calibJob=${jobName}c +echo "" +echo $jobName, $calibJob qsub -N $calibJob /exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2/scripts/runPlum.sh $1/calib qsub -N $jobName -hold_jid $calibJob /exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2/scripts/runPlum.sh $1 diff --git a/scripts/scheduleHindScenarios.sh b/scripts/scheduleHindScenarios.sh new file mode 100755 index 0000000000000000000000000000000000000000..2e3138c50f31674d0b007827d415ecf37ad82ad7 --- /dev/null +++ b/scripts/scheduleHindScenarios.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +if [ "$#" -lt 1 ]; then + echo "Need to specify scenario table file" + exit +fi + + +filename="$1" +output_dir=/exports/csce/eddie/geos/groups/LURG/models/PLUM/output/hind1970 +echo "Starting scenarios in $output_dir" + +while read -r datarow +do + IFS=',' read -r -a array <<< "$datarow" + + if [ -z "$header" ]; then + header=( "${array[@]}" ) + else + ensemble="${array[0]}" + scenario="${array[1]}" + scenario_dir=$output_dir/$ensemble/$scenario + echo $scenario for $ensemble + + if [ ! -d "$scenario_dir" ]; then + echo "Scenario $scenario dir is missing, so skipping" + continue; + fi + + echo "/exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2/scripts/runCalibAndPlum.sh hind1970/$ensemble/$scenario" + /exports/csce/eddie/geos/groups/LURG/models/PLUM/plumv2/scripts/runCalibAndPlum.sh hind1970/$ensemble/$scenario + fi +done < $filename +