source: flex_extract.git/python/joboper.ksh @ 97e09f4

ctbtodevfeature/makefilesorigin/task/language-editingtask/language-editing
Last change on this file since 97e09f4 was 54a8a01, checked in by Anne Philipp <anne.philipp@…>, 3 years ago

restructuring, documentations and bug fixes

  • Property mode set to 100644
File size: 2.6 KB
Line 
1#!/bin/ksh
2
3# ON ECGB:
4# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
5# start with sbatch NAME_OF_THIS_FILE directly on machine
6
7#SBATCH --workdir=/scratch/ms/at/km4a
8#SBATCH --qos=normal
9#SBATCH --job-name=flex_ecmwf
10#SBATCH --output=flex_ecmwf.%j.out
11#SBATCH --error=flex_ecmwf.%j.out
12#SBATCH --mail-type=FAIL
13#SBATCH --time=12:00:00
14
15## CRAY specific batch requests
16##PBS -N flex_ecmwf
17##PBS -q np
18##PBS -S /usr/bin/ksh
19## -o /scratch/ms/spatlh00/lh0/flex_ecmwf.$PBS_JOBID.out
20## job output is in .ecaccess_DO_NOT_REMOVE
21##PBS -j oe
22##PBS -V
23##PBS -l EC_threads_per_task=24
24##PBS -l EC_memory_per_task=32000MB
25
26set -x
27export VERSION=7.1
28case $HOST in
29  *ecg*)
30  module load python
31  module unload grib_api
32  module unload emos
33  module load grib_api/1.14.5
34  module load emos/437-r64
35  export PATH=${PATH}:${HOME}/flex_extract_v7.1/python
36  ;;
37  *cca*)
38  module switch PrgEnv-cray PrgEnv-intel
39  module load grib_api
40  module load emos
41  module load python
42  export SCRATCH=$TMPDIR
43  export PATH=${PATH}:${HOME}/flex_extract_v7.1/python
44  ;;
45esac
46
47cd $SCRATCH
48mkdir -p python$$
49cd python$$
50
51export CONTROL=CONTROL
52
53cat >$CONTROL<<EOF
54GATEWAY srvx8.img.univie.ac.at
55DESTINATION annep@genericSftp
56accuracy 16
57addpar 186 187 188 235 139 39
58area
59base_time ${MSJ_BASETIME}
60basetime None
61controlfile CONTROL.temp
62cwc 0
63date_chunk 3
64debug 1
65destination None
66dpdeta 1
67dtime 3
68ecfsdir ectmp:/${USER}/econdemand/
69ecgid None
70ecstorage 0
71ectrans 1
72ecuid None
73end_date ${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}
74eta 0
75etadiff 0
76etapar 77
77expver 1
78format GRIB1
79gateway None
80gauss 1
81grib2flexpart 0
82grid 5000
83inputdir ../work
84install_target None
85job_template job.temp
86left -15000
87level 60
88levelist 55/to/60
89lower 30000
90mailfail ${USER}
91mailops ${USER}
92makefile None
93marsclass EI
94maxstep 11
95number OFF
96omega 0
97omegadiff 0
98outputdir ../work
99prefix EI
100queue ecgate
101resol 63
102right 45000
103smooth 0
104start_date ${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}
105step 00 01 02 03 04 05 00 07 08 09 10 11 00 01 02 03 04 05 00 07 08 09 10 11
106stream OPER
107time 00 00 00 00 00 00 06 00 00 00 00 00 12 12 12 12 12 12 18 12 12 12 12 12
108type AN FC FC FC FC FC AN FC FC FC FC FC AN FC FC FC FC FC AN FC FC FC FC FC
109upper 75000
110wrf 0
111EOF
112
113
114submit.py --controlfile=$CONTROL --inputdir=./work --outputdir=./work 1> prot 2>&1
115
116if [ $? -eq 0 ] ; then
117  l=0
118  for muser in `grep -i MAILOPS $CONTROL`; do
119      if [ $l -gt 0 ] ; then 
120         mail -s flex.${HOST}.$$ $muser <prot
121      fi
122      l=$(($l+1))
123  done
124else
125  l=0
126  for muser in `grep -i MAILFAIL $CONTROL`; do
127      if [ $l -gt 0 ] ; then 
128         mail -s "ERROR! flex.${HOST}.$$" $muser <prot
129      fi
130      l=$(($l+1))
131  done
132fi
133
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG