source: flex_extract.git/python/joboper.ksh @ d69b677

devfeature/makefilesorigin/task/language-editingtask/language-editing
Last change on this file since d69b677 was d69b677, checked in by Anne Philipp <bscannephilipp@…>, 3 years ago

original ECMWFDATA v7.0.2 from flexpart.eu

  • Property mode set to 100644
File size: 2.8 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/spatlh00/lh0
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
27
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 ECMWFDATA=$HOME/ECMWFDATA7.0
36#  export PYTHONPATH=$ECMWFDATA/python
37  export PATH=${PATH}:${HOME}/ECMWFDATA7.0/python
38  ;;
39  *cca*)
40  module switch PrgEnv-cray PrgEnv-intel
41  module load grib_api
42  module load emos
43  module load python
44  export SCRATCH=$TMPDIR
45#  export ECMWFDATA=$HOME/ECMWFDATA7.0
46#  export PYTHONPATH=$ECMWFDATA/python
47  export PATH=${PATH}:${HOME}/ECMWFDATA7.0/python
48  ;;
49#  *)
50#  export ECMWFDATA=$HOME/ECMWFDATA7.0
51#  export PATH=/opt/anaconda/bin:$ECMWFDATA/python:${PATH}
52#  export PYTHONPATH=/opt/anaconda/lib/python2.7/site-packages/grib_api:$ECMWFDATA/python
53#  export SCRATCH=$ECMWFDATA/python
54#  which python
55#  ;;
56esac
57
58cd $SCRATCH
59mkdir -p python$$
60cd python$$
61
62export CONTROL=CONTROL
63
64cat >$CONTROL<<EOF
65GATEWAY srvx7.img.univie.ac.at
66DESTINATION leo@genericSftp
67accuracy 16
68addpar 186 187 188 235 139 39
69basetime None
70cwc 0
71date_chunk 3
72debug 0
73dpdeta 1
74dtime 3
75ecfsdir ectmp:/${USER}/econdemand/
76ecstorage 1
77ectrans 0
78start_date ${MSJ_YEAR}${MSJ_MONTH}${MSJ_DAY}
79eta 0
80etadiff 0
81expver 1
82format GRIB1
83gauss 1
84grib2flexpart 0
85grid 5000
86inputdir ../work
87left -175000
88level 60
89levelist 1/to/60
90lower -90000
91mailfail ${USER}
92mailops ${USER}
93makefile None
94marsclass EI
95maxstep 11
96number OFF
97omega 0
98omegadiff 0
99outputdir ../work
100prefix EN
101resol 63
102right 180000
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 90000
110EOF
111
112
113submit.py --controlfile=$CONTROL --inputdir=./work --outputdir=./work >prot
114
115if [ $? -eq 0 ] ; then
116  l=0
117  for muser in `grep -i MAILOPS $CONTROL`; do
118      if [ $l -gt 0 ] ; then 
119         mail -s flex.${HOST}.$$ $muser <prot
120      fi
121      l=$(($l+1))
122  done
123else
124  l=0
125  for muser in `grep -i MAILFAIL $CONTROL`; do
126      if [ $l -gt 0 ] ; then 
127         mail -s "ERROR! flex.${HOST}.$$" $muser <prot
128      fi
129      l=$(($l+1))
130  done
131fi
132
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG