Index: Source/Fortran/makefile_fast
===================================================================
--- Source/Fortran/makefile_fast	(revision 1610f7325d2d44586c844cd85efb2b15a502abd3)
+++ Source/Fortran/makefile_fast	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -19,5 +19,6 @@
 LIB =  $(ECCODES_LIB) $(EMOSLIB)
 
-ECCODES_INCLUDE_DIR=/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15
+ECCODES_INCLUDE_DIR=/usr/local/include/
+#/usr/lib/x86_64-linux-gnu/fortran/gfortran-mod-15
 INC = -I. -I$(ECCODES_INCLUDE_DIR)
 
Index: Source/Python/Classes/ControlFile.py
===================================================================
--- Source/Python/Classes/ControlFile.py	(revision 026b3592e0f0e4124d157e7b5b2d5dbea02dba75)
+++ Source/Python/Classes/ControlFile.py	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -19,6 +19,6 @@
 #        - divided assignment of attributes and the check of conditions
 #        - outsourced the commandline argument assignments to control attributes
-#   June 202 - Petra Seibert (Univ of Vienna / BOKU)
-#        - update default makefile name
+#   June 2020 - Anne Philipp
+#        - update default makefile to None
 #
 # @License:
@@ -269,5 +269,5 @@
     makefile : str
         Name of the makefile to be used for the Fortran program.
-        Default value is 'makefile_local_gfortran'.
+        Default value is None.
 
     destination : str
@@ -404,5 +404,5 @@
         self.exedir = _config.PATH_FORTRAN_SRC
         self.installdir = None
-        self.makefile = 'makefile_local_gfortran'
+        self.makefile = None
         self.destination = None
         self.gateway = None
Index: Source/Python/_config.py
===================================================================
--- Source/Python/_config.py	(revision 026b3592e0f0e4124d157e7b5b2d5dbea02dba75)
+++ Source/Python/_config.py	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -57,11 +57,11 @@
 TEMPFILE_USER_ENVVARS = 'ECMWF_ENV.template'
 FILE_USER_ENVVARS = 'ECMWF_ENV'
-TEMPFILE_INSTALL_COMPILEJOB = 'compilejob.template'
+TEMPFILE_INSTALL_COMPILEJOB = 'installscript.template'
 FILE_INSTALL_COMPILEJOB = 'compilejob.ksh'
-TEMPFILE_INSTALL_JOB = 'job.template'
-TEMPFILE_JOB = 'job.temp'
+TEMPFILE_INSTALL_JOB = 'jobscript.template'
+TEMPFILE_JOB = 'submitscript.template'
 FILE_JOB_OD = 'job.ksh'
 FILE_JOB_OP = 'jopoper.ksh'
-TEMPFILE_NAMELIST = 'convert.nl'
+TEMPFILE_NAMELIST = 'calc_etadot_nml.template'
 FILE_NAMELIST = 'fort.4'
 FILE_GRIB_INDEX = 'date_time_stepRange.idx'
Index: Source/Python/install.py
===================================================================
--- Source/Python/install.py	(revision 026b3592e0f0e4124d157e7b5b2d5dbea02dba75)
+++ Source/Python/install.py	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -13,5 +13,5 @@
 #        - moved install_args_and_control in here
 #        - splitted code in smaller functions
-#        - delete convert build files in here instead of compile job script
+#        - delete fortran build files in here instead of compile job script
 #        - changed static path names to variables from config file
 #        - splitted install function into several smaller pieces
@@ -39,6 +39,6 @@
 #    mk_compilejob
 #    mk_job_template
-#    del_convert_build
-#    mk_convert_build
+#    del_fortran_build
+#    mk_fortran_build
 #
 #*******************************************************************************
@@ -243,11 +243,11 @@
                                   _config.PATH_REL_FORTRAN_SRC))
 
-    # Create Fortran executable - CONVERT2
+    # Create Fortran executable
     print('Install ' +  _config.FLEXEXTRACT_DIRNAME + ' software at ' +
           c.install_target + ' in directory ' +
           os.path.abspath(c.installdir) + '\n')
 
-    del_convert_build('.')
-    mk_convert_build('.', c.makefile)
+    del_fortran_build('.')
+    mk_fortran_build('.', c.makefile)
 
     os.chdir(_config.PATH_FLEXEXTRACT_DIR)
@@ -304,4 +304,19 @@
             c.installdir = _config.PATH_FLEXEXTRACT_DIR
 
+    if not c.makefile:
+        print('WARNING: no makefile was specified.')
+        if c.install_target == 'local':
+            c.makefile = 'makefile_local_gfortran'
+            print('WARNING: default makefile selected: makefile_local_gfortan')
+        elif c.install_target == 'ecgate':
+            c.makefile = 'makefile_ecgate'
+            print('WARNING: default makefile selected: makefile_ecgate')
+        elif c.install_target == 'cca' or \
+             c.install_target == 'ccb':
+            c.makefile = 'makefile_cray'
+            print('WARNING: default makefile selected: makefile_cray')
+        else:
+            pass
+        
     return
 
@@ -498,5 +513,5 @@
     makefile : str
         Name of the makefile which should be used to compile FORTRAN
-        CONVERT2 program.
+        program.
 
     ecuid : str
@@ -633,7 +648,7 @@
     return
 
-def del_convert_build(src_path):
+def del_fortran_build(src_path):
     '''Clean up the Fortran source directory and remove all
-    build files (e.g. \*.o, \*.mod and CONVERT2)
+    build files (e.g. \*.o, \*.mod and FORTRAN EXECUTABLE)
 
     Parameters
@@ -657,5 +672,5 @@
     return
 
-def mk_convert_build(src_path, makefile):
+def mk_fortran_build(src_path, makefile):
     '''Compiles the Fortran code and generates the executable.
 
@@ -686,12 +701,12 @@
             print(perr.decode())
             print('Please edit ' + makefile +
-                  ' or try another Makefile in the src directory.')
-            print('Most likely GRIB_API_INCLUDE_DIR, GRIB_API_LIB '
+                  ' or try another makefile in the src directory.')
+            print('Most likely ECCODES_INCLUDE_DIR, ECCODES_LIB '
                   'and EMOSLIB must be adapted.')
-            print('Available Makefiles:')
-            print(UioFiles(src_path, 'Makefile*'))
+            print('Available makefiles:')
+            print(UioFiles(src_path, 'makefile*'))
             sys.exit('Compilation failed!')
     except ValueError as e:
-        print('ERROR: Makefile call failed:')
+        print('ERROR: makefile call failed:')
         print(e)
     else:
Index: Source/Python/submit.py
===================================================================
--- Source/Python/submit.py	(revision 026b3592e0f0e4124d157e7b5b2d5dbea02dba75)
+++ Source/Python/submit.py	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -129,5 +129,5 @@
         module and variable settings for the ECMWF environment as well as
         the job call and mail report instructions.
-        Default is "job.temp".
+        Default is _config.TEMPFILE_JOB.
 
     c : ControlFile
@@ -218,5 +218,5 @@
         module and variable settings for the ECMWF environment as well as
         the job call and mail report instructions.
-        Default is "job.temp".
+        Default is _config.TEMPFILE_JOB.
 
     job_file : str
Index: Templates/calc_etadot_nml.template
===================================================================
--- Templates/calc_etadot_nml.template	(revision None)
+++ Templates/calc_etadot_nml.template	(revision None)
@@ -0,0 +1,19 @@
+&NAMGEN
+  maxl = $maxl,
+  maxb = $maxb,
+  mlevel = $mlevel,
+  mlevelist = "$mlevelist",
+  mnauf = $mnauf,
+  metapar = $metapar,
+  rlo0 = $rlo0,
+  rlo1 = $rlo1,
+  rla0 = $rla0,
+  rla1 = $rla1,
+  momega = $momega,
+  momegadiff = $momegadiff,
+  mgauss = $mgauss,
+  msmooth = $msmooth,
+  meta = $meta,
+  metadiff = $metadiff,
+  mdpdeta = $mdpdeta
+/
Index: mplates/compilejob.template
===================================================================
--- Templates/compilejob.template	(revision e44fdb9f7f3f128ce719e718a61ed6fcff46cdb9)
+++ 	(revision )
@@ -1,71 +1,0 @@
-#!/bin/ksh
-
-# ON ECGB:
-# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
-# start with sbatch NAME_OF_THIS_FILE directly on machine
-
-#SBATCH --workdir=/scratch/ms/$usergroup/$username
-#SBATCH --qos=normal
-#SBATCH --job-name=flex_ecmwf
-#SBATCH --output=flex_ecmwf.%j.out
-#SBATCH --error=flex_ecmwf.%j.out
-#SBATCH --mail-type=FAIL
-#SBATCH --time=12:00:00
-
-## CRAY specific batch requests
-##PBS -N flex_ecmwf
-##PBS -q ns
-##PBS -S /usr/bin/ksh
-##PBS -o /scratch/ms/$usergroup/$username/flex_ecmwf.$${Jobname}.$${Job_ID}.out
-# job output is in .ecaccess_DO_NOT_REMOVE
-##PBS -j oe
-##PBS -V
-##PBS -l EC_threads_per_task=1
-##PBS -l EC_memory_per_task=3200MB
-
-set -x
-export VERSION=$version_number
-case $${HOST} in
-  *ecg*)
-  module unload grib_api
-  module unload eccodes
-  module unload python
-  module unload emos
-  module load python3/3.6.8-01
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
-  export MAKEFILE=$makefile
-  ;;
-  *cca*)
-  module unload python
-  module switch PrgEnv-cray PrgEnv-intel
-  module load python3
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  echo $${GROUP}
-  echo $${HOME}
-  echo $${HOME} | awk -F / '{print $1, $2, $3, $4}'
-  export GROUP=`echo $${HOME} | awk -F / '{print $4}'`
-  export SCRATCH=/scratch/ms/$${GROUP}/$${USER}
-  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
-  export MAKEFILE=$makefile
-  ;;
-esac
-
-mkdir -p $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}
-cd $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}   # if FLEXPART_ROOT is not set this means cd to the home directory
-tar -xvf $${HOME}/flex_extract_v$${VERSION}.tar
-cd Source/Fortran
-\rm *.o *.mod $fortran_program 
-make -f $${MAKEFILE} >flexcompile 2>flexcompile
-
-ls -l $fortran_program >>flexcompile
-if [ $$? -eq 0 ]; then
-  echo 'SUCCESS!' >>flexcompile
-  mail -s flexcompile.$${HOST}.$$$$ $${USER} <flexcompile
-else
-  echo Environment: >>flexcompile
-  env >> flexcompile
-  mail -s "ERROR! flexcompile.$${HOST}.$$$$" $${USER} <flexcompile
-fi
Index: mplates/convert.nl
===================================================================
--- Templates/convert.nl	(revision None)
+++ 	(revision )
@@ -1,19 +1,0 @@
-&NAMGEN
-  maxl = $maxl,
-  maxb = $maxb,
-  mlevel = $mlevel,
-  mlevelist = "$mlevelist",
-  mnauf = $mnauf,
-  metapar = $metapar,
-  rlo0 = $rlo0,
-  rlo1 = $rlo1,
-  rla0 = $rla0,
-  rla1 = $rla1,
-  momega = $momega,
-  momegadiff = $momegadiff,
-  mgauss = $mgauss,
-  msmooth = $msmooth,
-  meta = $meta,
-  metadiff = $metadiff,
-  mdpdeta = $mdpdeta
-/
Index: Templates/installscript.template
===================================================================
--- Templates/installscript.template	(revision None)
+++ Templates/installscript.template	(revision None)
@@ -0,0 +1,71 @@
+#!/bin/ksh
+
+# ON ECGB:
+# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
+# start with sbatch NAME_OF_THIS_FILE directly on machine
+
+#SBATCH --workdir=/scratch/ms/$usergroup/$username
+#SBATCH --qos=normal
+#SBATCH --job-name=flex_ecmwf
+#SBATCH --output=flex_ecmwf.%j.out
+#SBATCH --error=flex_ecmwf.%j.out
+#SBATCH --mail-type=FAIL
+#SBATCH --time=12:00:00
+
+## CRAY specific batch requests
+##PBS -N flex_ecmwf
+##PBS -q ns
+##PBS -S /usr/bin/ksh
+##PBS -o /scratch/ms/$usergroup/$username/flex_ecmwf.$${Jobname}.$${Job_ID}.out
+# job output is in .ecaccess_DO_NOT_REMOVE
+##PBS -j oe
+##PBS -V
+##PBS -l EC_threads_per_task=1
+##PBS -l EC_memory_per_task=3200MB
+
+set -x
+export VERSION=$version_number
+case $${HOST} in
+  *ecg*)
+  module unload grib_api
+  module unload eccodes
+  module unload python
+  module unload emos
+  module load python3/3.6.8-01
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
+  export MAKEFILE=$makefile
+  ;;
+  *cca*)
+  module unload python
+  module switch PrgEnv-cray PrgEnv-intel
+  module load python3
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  echo $${GROUP}
+  echo $${HOME}
+  echo $${HOME} | awk -F / '{print $1, $2, $3, $4}'
+  export GROUP=`echo $${HOME} | awk -F / '{print $4}'`
+  export SCRATCH=/scratch/ms/$${GROUP}/$${USER}
+  export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
+  export MAKEFILE=$makefile
+  ;;
+esac
+
+mkdir -p $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}
+cd $${FLEXPART_ROOT_SCRIPTS}/flex_extract_v$${VERSION}   # if FLEXPART_ROOT is not set this means cd to the home directory
+tar -xvf $${HOME}/flex_extract_v$${VERSION}.tar
+cd Source/Fortran
+\rm *.o *.mod $fortran_program 
+make -f $${MAKEFILE} >flexcompile 2>flexcompile
+
+ls -l $fortran_program >>flexcompile
+if [ $$? -eq 0 ]; then
+  echo 'SUCCESS!' >>flexcompile
+  mail -s flexcompile.$${HOST}.$$$$ $${USER} <flexcompile
+else
+  echo Environment: >>flexcompile
+  env >> flexcompile
+  mail -s "ERROR! flexcompile.$${HOST}.$$$$" $${USER} <flexcompile
+fi
Index: mplates/job.temp
===================================================================
--- Templates/job.temp	(revision e44fdb9f7f3f128ce719e718a61ed6fcff46cdb9)
+++ 	(revision )
@@ -1,80 +1,0 @@
-#!/bin/ksh
-
-# ON ECGB:
-# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
-# start with sbatch NAME_OF_THIS_FILE directly on machine
-
-#SBATCH --workdir=/scratch/ms/at/km4a
-#SBATCH --qos=normal
-#SBATCH --job-name=flex_ecmwf
-#SBATCH --output=flex_ecmwf.%j.out
-#SBATCH --error=flex_ecmwf.%j.out
-#SBATCH --mail-type=FAIL
-#SBATCH --time=12:00:00
-
-## CRAY specific batch requests
-##PBS -N flex_ecmwf
-##PBS -q np
-##PBS -S /usr/bin/ksh
-## -o /scratch/ms/at/km4a/flex_ecmwf.$${PBS_JOBID}.out
-## job output is in .ecaccess_DO_NOT_REMOVE
-##PBS -j oe
-##PBS -V
-##PBS -l EC_threads_per_task=24
-##PBS -l EC_memory_per_task=32000MB
-
-set -x
-export VERSION=7.1
-case $${HOST} in
-  *ecg*)
-  module unload grib_api
-  module unload eccodes
-  module unload python
-  module unload emos
-  module load python3/3.6.8-01
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1/Source/Python
-  ;;
-  *cca*)
-  module unload python
-  module switch PrgEnv-cray PrgEnv-intel
-  module load python3
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  export SCRATCH=$${TMPDIR}
-  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1/Source/Python
-  ;;
-esac
-
-cd $${SCRATCH}
-mkdir -p python$$$$
-cd python$$$$
-
-export CONTROL=CONTROL
-
-cat >$${CONTROL}<<EOF
-$control_content
-EOF
-
-
-submit.py --controlfile=$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
-
-if [ $? -eq 0 ] ; then
-  l=0
-  for muser in `grep -i MAILOPS $${CONTROL}`; do
-      if [ $${l} -gt 0 ] ; then 
-         mail -s flex.$${HOST}.$$$$ $${muser} <prot
-      fi
-      l=$(($${l}+1))
-  done
-else
-  l=0
-  for muser in `grep -i MAILFAIL $${CONTROL}`; do
-      if [ $${l} -gt 0 ] ; then 
-         mail -s "ERROR! flex.$${HOST}.$$$$" $${muser} <prot
-      fi
-      l=$(($${l}+1))
-  done
-fi
-
Index: mplates/job.template
===================================================================
--- Templates/job.template	(revision e44fdb9f7f3f128ce719e718a61ed6fcff46cdb9)
+++ 	(revision )
@@ -1,80 +1,0 @@
-#!/bin/ksh
-
-# ON ECGB:
-# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
-# start with sbatch NAME_OF_THIS_FILE directly on machine
-
-#SBATCH --workdir=/scratch/ms/$usergroup/$username
-#SBATCH --qos=normal
-#SBATCH --job-name=flex_ecmwf
-#SBATCH --output=flex_ecmwf.%j.out
-#SBATCH --error=flex_ecmwf.%j.out
-#SBATCH --mail-type=FAIL
-#SBATCH --time=12:00:00
-
-## CRAY specific batch requests
-##PBS -N flex_ecmwf
-##PBS -q np
-##PBS -S /usr/bin/ksh
-## -o /scratch/ms/$usergroup/$username/flex_ecmwf.$$$${PBS_JOBID}.out
-## job output is in .ecaccess_DO_NOT_REMOVE
-##PBS -j oe
-##PBS -V
-##PBS -l EC_threads_per_task=24
-##PBS -l EC_memory_per_task=32000MB
-
-set -x
-export VERSION=$version_number
-case $$$${HOST} in
-  *ecg*)
-  module unload grib_api
-  module unload eccodes
-  module unload python
-  module unload emos
-  module load python3/3.6.8-01
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  export PATH=$$$${PATH}:$fp_root_path
-  ;;
-  *cca*)
-  module unload python
-  module switch PrgEnv-cray PrgEnv-intel
-  module load python3
-  module load eccodes/2.13.0
-  module load emos/455-r64
-  export SCRATCH=$$$${TMPDIR}
-  export PATH=$$$${PATH}:$fp_root_path
-  ;;
-esac
-
-cd $$$${SCRATCH}
-mkdir -p python$$$$$$$$
-cd python$$$$$$$$
-
-export CONTROL=CONTROL
-
-cat >$$$${CONTROL}<<EOF
-$$control_content
-EOF
-
-
-submit.py --controlfile=$$$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
-
-if [ $? -eq 0 ] ; then
-  l=0
-  for muser in `grep -i MAILOPS $$$${CONTROL}`; do
-      if [ $$$${l} -gt 0 ] ; then 
-         mail -s flex.$$$${HOST}.$$$$$$$$ $$$${muser} <prot
-      fi
-      l=$(($$$${l}+1))
-  done
-else
-  l=0
-  for muser in `grep -i MAILFAIL $$$${CONTROL}`; do
-      if [ $$$${l} -gt 0 ] ; then 
-         mail -s "ERROR! flex.$$$${HOST}.$$$$$$$$" $$$${muser} <prot
-      fi
-      l=$(($$$${l}+1))
-  done
-fi
-
Index: Templates/jobscript.template
===================================================================
--- Templates/jobscript.template	(revision None)
+++ Templates/jobscript.template	(revision None)
@@ -0,0 +1,80 @@
+#!/bin/ksh
+
+# ON ECGB:
+# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
+# start with sbatch NAME_OF_THIS_FILE directly on machine
+
+#SBATCH --workdir=/scratch/ms/$usergroup/$username
+#SBATCH --qos=normal
+#SBATCH --job-name=flex_ecmwf
+#SBATCH --output=flex_ecmwf.%j.out
+#SBATCH --error=flex_ecmwf.%j.out
+#SBATCH --mail-type=FAIL
+#SBATCH --time=12:00:00
+
+## CRAY specific batch requests
+##PBS -N flex_ecmwf
+##PBS -q np
+##PBS -S /usr/bin/ksh
+## -o /scratch/ms/$usergroup/$username/flex_ecmwf.$$$${PBS_JOBID}.out
+## job output is in .ecaccess_DO_NOT_REMOVE
+##PBS -j oe
+##PBS -V
+##PBS -l EC_threads_per_task=24
+##PBS -l EC_memory_per_task=32000MB
+
+set -x
+export VERSION=$version_number
+case $$$${HOST} in
+  *ecg*)
+  module unload grib_api
+  module unload eccodes
+  module unload python
+  module unload emos
+  module load python3/3.6.8-01
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  export PATH=$$$${PATH}:$fp_root_path
+  ;;
+  *cca*)
+  module unload python
+  module switch PrgEnv-cray PrgEnv-intel
+  module load python3
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  export SCRATCH=$$$${TMPDIR}
+  export PATH=$$$${PATH}:$fp_root_path
+  ;;
+esac
+
+cd $$$${SCRATCH}
+mkdir -p python$$$$$$$$
+cd python$$$$$$$$
+
+export CONTROL=CONTROL
+
+cat >$$$${CONTROL}<<EOF
+$$control_content
+EOF
+
+
+submit.py --controlfile=$$$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
+
+if [ $? -eq 0 ] ; then
+  l=0
+  for muser in `grep -i MAILOPS $$$${CONTROL}`; do
+      if [ $$$${l} -gt 0 ] ; then 
+         mail -s flex.$$$${HOST}.$$$$$$$$ $$$${muser} <prot
+      fi
+      l=$(($$$${l}+1))
+  done
+else
+  l=0
+  for muser in `grep -i MAILFAIL $$$${CONTROL}`; do
+      if [ $$$${l} -gt 0 ] ; then 
+         mail -s "ERROR! flex.$$$${HOST}.$$$$$$$$" $$$${muser} <prot
+      fi
+      l=$(($$$${l}+1))
+  done
+fi
+
Index: Templates/submitscript.template
===================================================================
--- Templates/submitscript.template	(revision None)
+++ Templates/submitscript.template	(revision None)
@@ -0,0 +1,80 @@
+#!/bin/ksh
+
+# ON ECGB:
+# start with ecaccess-job-submit -queueName ecgb NAME_OF_THIS_FILE  on gateway server
+# start with sbatch NAME_OF_THIS_FILE directly on machine
+
+#SBATCH --workdir=/scratch/ms/at/km4a
+#SBATCH --qos=normal
+#SBATCH --job-name=flex_ecmwf
+#SBATCH --output=flex_ecmwf.%j.out
+#SBATCH --error=flex_ecmwf.%j.out
+#SBATCH --mail-type=FAIL
+#SBATCH --time=12:00:00
+
+## CRAY specific batch requests
+##PBS -N flex_ecmwf
+##PBS -q np
+##PBS -S /usr/bin/ksh
+## -o /scratch/ms/at/km4a/flex_ecmwf.$${PBS_JOBID}.out
+## job output is in .ecaccess_DO_NOT_REMOVE
+##PBS -j oe
+##PBS -V
+##PBS -l EC_threads_per_task=24
+##PBS -l EC_memory_per_task=32000MB
+
+set -x
+export VERSION=7.1.1
+case $${HOST} in
+  *ecg*)
+  module unload grib_api
+  module unload eccodes
+  module unload python
+  module unload emos
+  module load python3/3.6.8-01
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1.1/Source/Python
+  ;;
+  *cca*)
+  module unload python
+  module switch PrgEnv-cray PrgEnv-intel
+  module load python3
+  module load eccodes/2.13.0
+  module load emos/455-r64
+  export SCRATCH=$${TMPDIR}
+  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1.1/Source/Python
+  ;;
+esac
+
+cd $${SCRATCH}
+mkdir -p python$$$$
+cd python$$$$
+
+export CONTROL=CONTROL
+
+cat >$${CONTROL}<<EOF
+$control_content
+EOF
+
+
+submit.py --controlfile=$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
+
+if [ $? -eq 0 ] ; then
+  l=0
+  for muser in `grep -i MAILOPS $${CONTROL}`; do
+      if [ $${l} -gt 0 ] ; then 
+         mail -s flex.$${HOST}.$$$$ $${muser} <prot
+      fi
+      l=$(($${l}+1))
+  done
+else
+  l=0
+  for muser in `grep -i MAILFAIL $${CONTROL}`; do
+      if [ $${l} -gt 0 ] ; then 
+         mail -s "ERROR! flex.$${HOST}.$$$$" $${muser} <prot
+      fi
+      l=$(($${l}+1))
+  done
+fi
+
Index: setup.sh
===================================================================
--- setup.sh	(revision 50f9ca6e376be74ed4abbd6f5f83e66c5dd69951)
+++ setup.sh	(revision 5f678830f81aa67f5f7f986a9ce4b1c1f5a029ea)
@@ -12,5 +12,5 @@
 #
 # @Licence:
-#    (C) Copyright 2014-2019.
+#    (C) Copyright 2014-2020.
 #
 #    SPDX-License-Identifier: CC-BY-4.0
