-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_plot_refl.sh
executable file
·86 lines (56 loc) · 2.24 KB
/
create_plot_refl.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/bin/bash
# Author: Alicia Bentley
#####################################
# Script for submitting jobs on Hera
# that download data from HPSS
#####################################
echo cycle: ${CYCLE}
echo domain: ${DOMAIN}
mkdir -p ${IMAGES_PATH}'/'${CASE}'/images/'${CYCLE}
'cp' ${SCRIPTS_PATH}/plot*.ncl ${DATA_PATH}/${CASE}/${CYCLE}/.
cd ${DATA_PATH}/${CASE}/
##########################################
if [[ $DOMAIN = "new" ]]; then
REGIONNAME="tn"
minlat=31.0
maxlat=40.0
minlon=-93.5
maxlon=-79.5
echo "submitting ${REGIONNAME} domain script for ${CYCLE}"
cat > ${DATA_PATH}/${CASE}/${CYCLE}/plot_refl_${REGIONNAME}_${CYCLE}.csh <<EOF
#!/bin/csh
#SBATCH --account=ovp
#SBATCH --job-name=${REGIONNAME}_refl_${CYCLE}
#SBATCH --output=plot_${REGIONNAME}_${CYCLE}.%j.out
#SBATCH -q batch
#SBATCH --nodes=1
#SBATCH --time=3:00:00
cd ${DATA_PATH}/${CASE}/${CYCLE}/
/bin/rm -rf ../plot_${CYCLE}_${REGIONNAME}_done
ncl 'scriptyyyymmddhh="${CYCLE}"' 'eventname="${CASE}"' 'scriptregion="${DOMAIN}"' 'regionname="${REGIONNAME}"' 'minlat="${minlat}"' 'maxlat="${maxlat}"' 'minlon="${minlon}"' 'maxlon="${maxlon}"' 'fhr_inc="${FHR_INC}"' 'fhr_start="${FHR_START}"' 'fhr_end="${FHR_END}"' 'images_path="${IMAGES_PATH}"' 'cycle_number="${CYCLE_NUMBER}"' ${DATA_PATH}/${CASE}/${CYCLE}/plot_gfs_lambert_refl.ncl
touch ../plot_${CYCLE}_${REGIONNAME}_done
exit
EOF
sbatch ${DATA_PATH}/${CASE}/${CYCLE}/plot_refl_${REGIONNAME}_${CYCLE}.csh
sleep 5
#################################################
else
echo "submitting ${DOMAIN} domain script for ${CYCLE}"
cat > ${DATA_PATH}/${CASE}/${CYCLE}/plot_refl_${DOMAIN}_${CYCLE}.sh <<EOF
#!/bin/bash
#SBATCH --account=ovp
#SBATCH --job-name=${DOMAIN}_refl_${CYCLE}
#SBATCH --output=plot_${DOMAIN}_${CYCLE}.%j.out
#SBATCH -q batch
#SBATCH --nodes=1
#SBATCH --time=6:00:00
cd ${DATA_PATH}/${CASE}/${CYCLE}/
/bin/rm -rf ../plot_${CYCLE}_${DOMAIN}_done
ncl 'scriptyyyymmddhh="${CYCLE}"' 'eventname="${CASE}"' 'scriptregion="${DOMAIN}"' 'fhr_inc="${FHR_INC}"' 'fhr_start="${FHR_START}"' 'fhr_end="${FHR_END}"' 'images_path="${IMAGES_PATH}"' ${DATA_PATH}/${CASE}/${CYCLE}/plot_gfs_lambert_refl.ncl
touch ../plot_${CYCLE}_${DOMAIN}_done
exit
EOF
sbatch ${DATA_PATH}/${CASE}/${CYCLE}/plot_refl_${DOMAIN}_${CYCLE}.sh
sleep 5
fi
exit