-
Notifications
You must be signed in to change notification settings - Fork 0
/
create_htar_gfs_anl.sh
executable file
·47 lines (32 loc) · 1.27 KB
/
create_htar_gfs_anl.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
#!/bin/bash
# Author: Alicia Bentley
#####################################
# Script for submitting jobs on Hera
# that download data from HPSS
#####################################
echo path: ${DATA_PATH}/${CASE}/${CYCLE}/analyses
echo fhr_inc: ${FHR_INC}
echo fhr_start: ${FHR_START}
echo fhr_end: ${FHR_END}
mkdir -p ${DATA_PATH}/${CASE}/${CYCLE}/analyses
'cp' ${SCRIPTS_PATH}/htar_gfs_anl.ncl ${DATA_PATH}/${CASE}/${CYCLE}/analyses/.
cd ${DATA_PATH}/${CASE}/
cat > ${DATA_PATH}/${CASE}/${CYCLE}/analyses/htar_gfs_anl.csh <<EOF
#!/bin/csh
#SBATCH --account=ovp
#SBATCH --job-name=gfs_htar
#SBATCH --output=gfs_anl_htar.%j.out
#SBATCH --ntasks=1
#SBATCH --partition=service
#SBATCH --time=8:00:00
cd ${DATA_PATH}/${CASE}/${CYCLE}/analyses
/bin/rm -rf ../htar_gfs_anl_${CYCLE}_done
echo ncl 'scriptyyyymmddhh="${CYCLE}"' 'eventname="${CASE}"' 'fhr_inc="${FHR_INC}"' 'fhr_start="${FHR_START}"' 'fhr_end="${FHR_END}"' ${DATA_PATH}/${CASE}/${CYCLE}/analyses/htar_gfs_anl.ncl
ncl 'scriptyyyymmddhh="${CYCLE}"' 'eventname="${CASE}"' 'fhr_inc="${FHR_INC}"' 'fhr_start="${FHR_START}"' 'fhr_end="${FHR_END}"' ${DATA_PATH}/${CASE}/${CYCLE}/analyses/htar_gfs_anl.ncl
#sleep 5
touch ../htar_gfs_anl_${CYCLE}_done
exit
EOF
sbatch ${DATA_PATH}/${CASE}/${CYCLE}/analyses/htar_gfs_anl.csh
sleep 5
exit