Index: templates/compilejob.temp
===================================================================
--- templates/compilejob.temp	(revision 25b14bea5de21f28364c210382513c1c9b792d61)
+++ 	(revision )
@@ -1,77 +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/spatlh00/lh0
-#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
-# -o /scratch/ms/no/sbc/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=7.1
-case $HOST in
-  *ecg*)
-  module load python
-  module unload grib_api
-  module unload emos
-  module load grib_api/1.14.5
-  module load emos/437-r64
-  export FLEXPART_ROOT_SCRIPTS=
-  export MAKEFILE=Makefile.gfortran
-  ;;
-  *cca*)
-  module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
-  module load emos
-  module load python
-  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=
-  export MAKEFILE=Makefile.CRAY
-  ;;
-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 src
-\rm *.o *.mod CONVERT2
-make -f $MAKEFILE >flexcompile 2>flexcompile
-
-ls -l CONVERT2 >>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: templates/compilejob.template
===================================================================
--- templates/compilejob.template	(revision 0aaeb04b941d4c298b7dbc0b1c0f5407e88aad4a)
+++ templates/compilejob.template	(revision c5074d295840f29091c45f8333ce650ad2a25ccd)
@@ -17,5 +17,5 @@
 ##PBS -q ns
 ##PBS -S /usr/bin/ksh
-##PBS -o /scratch/ms/$usergroup/$username/flex_ecmwf.$Jobname.$Job_ID.out
+##PBS -o /scratch/ms/$usergroup/$username/flex_ecmwf.$${Jobname}.$${Job_ID}.out
 # job output is in .ecaccess_DO_NOT_REMOVE
 ##PBS -j oe
@@ -26,5 +26,5 @@
 set -x
 export VERSION=$version_number
-case $HOST in
+case $${HOST} in
   *ecg*)
   module load python
@@ -41,9 +41,9 @@
   module load emos
   module load python
-  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}
+  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
@@ -51,18 +51,18 @@
 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
+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 src
 \rm *.o *.mod $fortran_program 
-make -f $MAKEFILE >flexcompile 2>flexcompile
+make -f $${MAKEFILE} >flexcompile 2>flexcompile
 
 ls -l $fortran_program >>flexcompile
-if [ $? -eq 0 ]; then
+if [ $$? -eq 0 ]; then
   echo 'SUCCESS!' >>flexcompile
-  mail -s flexcompile.$HOST.$$ $USER <flexcompile
+  mail -s flexcompile.$${HOST}.$$$$ $${USER} <flexcompile
 else
   echo Environment: >>flexcompile
   env >> flexcompile
-  mail -s "ERROR! flexcompile.$HOST.$$" $USER <flexcompile
+  mail -s "ERROR! flexcompile.$${HOST}.$$$$" $${USER} <flexcompile
 fi
Index: templates/convert.nl
===================================================================
--- templates/convert.nl	(revision c5074d295840f29091c45f8333ce650ad2a25ccd)
+++ templates/convert.nl	(revision c5074d295840f29091c45f8333ce650ad2a25ccd)
@@ -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: templates/job.temp
===================================================================
--- templates/job.temp	(revision 25b14bea5de21f28364c210382513c1c9b792d61)
+++ 	(revision )
@@ -1,76 +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/spatlh00/lh0/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 load python
-  module unload grib_api
-  module unload emos
-  module load grib_api/1.14.5
-  module load emos/437-r64
-  export PATH=${PATH}:${HOME}/flex_extract_v7.1/source/python
-  ;;
-  *cca*)
-  module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
-  module load emos
-  module load python
-  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
-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/job.temp.o
===================================================================
--- templates/job.temp.o	(revision 82b624afff7d2b0e10c090910f1c6c57c1c3e50b)
+++ 	(revision )
@@ -1,75 +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/spatlh00/lh0
-#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/spatlh00/lh0/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 load python
-  module unload grib_api
-  module unload emos
-  module load grib_api/1.14.5
-  module load emos/437-r64
-  export PATH=${PATH}:
-  ;;
-  *cca*)
-  module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
-  module load emos
-  module load python
-  export SCRATCH=$TMPDIR
-  export PATH=${PATH}:
-  ;;
-esac
-
-cd $SCRATCH
-mkdir -p python$$
-cd python$$
-
-export CONTROL=CONTROL
-
-cat >$CONTROL<<EOF
-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/job.template
===================================================================
--- templates/job.template	(revision None)
+++ templates/job.template	(revision None)
@@ -0,0 +1,76 @@
+#!/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 load python
+  module unload grib_api
+  module unload emos
+  module load grib_api/1.14.5
+  module load emos/437-r64
+  export PATH=$${PATH}:$fp_root_path
+  ;;
+  *cca*)
+  module switch PrgEnv-cray PrgEnv-intel
+  module load grib_api
+  module load emos
+  module load python
+  export SCRATCH=$${TMPDIR}
+  export PATH=$${PATH}:$fp_root_path
+  ;;
+esac
+
+cd $${SCRATCH}
+mkdir -p python$$$$
+cd python$$$$
+
+export CONTROL=CONTROL
+
+cat >$${CONTROL}<<EOF
+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
+
