Index: templates/compilejob.template
===================================================================
--- templates/compilejob.template	(revision e585e1bf84d6025c3e972a17537553d592ecbbf7)
+++ templates/compilejob.template	(revision b02a07e92bd322edac5c617854791e5cc0e14990)
@@ -28,10 +28,10 @@
 case $${HOST} in
   *ecg*)
+  module unload grib_api
   module unload eccodes
-#  module load python
-  module unload grib_api
+  module load eccodes
+  module load python
   module unload emos
-  module load grib_api/1.26.1
-  module load emos/457-r64
+  module load emos/455-r64
   export FLEXPART_ROOT_SCRIPTS=$fp_root_scripts
   export MAKEFILE=$makefile
@@ -39,5 +39,5 @@
   *cca*)
   module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
+  module load eccodes
   module load emos
   module load python
Index: templates/job.temp
===================================================================
--- templates/job.temp	(revision e585e1bf84d6025c3e972a17537553d592ecbbf7)
+++ templates/job.temp	(revision b02a07e92bd322edac5c617854791e5cc0e14990)
@@ -17,5 +17,5 @@
 ##PBS -q np
 ##PBS -S /usr/bin/ksh
-## -o /scratch/ms/at/km4a/flex_ecmwf.${PBS_JOBID}.out
+## -o /scratch/ms/at/km4a/flex_ecmwf.$${PBS_JOBID}.out
 ## job output is in .ecaccess_DO_NOT_REMOVE
 ##PBS -j oe
@@ -26,51 +26,52 @@
 set -x
 export VERSION=7.1
-case ${HOST} in
+case $${HOST} in
   *ecg*)
   module load python
   module unload grib_api
   module unload eccodes
+  module load eccodes
   module unload emos
-  module load grib_api/1.26.1
-  module load emos/457-r64
-  export PATH=${PATH}:${HOME}/flex_extract_v7.1/source/python
+  module load emos/455-r64
+  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1/source/python
   ;;
   *cca*)
   module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
+  module load eccodes
   module load emos
   module load python
-  export SCRATCH=${TMPDIR}
-  export PATH=${PATH}:${HOME}/flex_extract_v7.1/source/python
+  export SCRATCH=$${TMPDIR}
+  export PATH=$${PATH}:$${HOME}/flex_extract_v7.1/source/python
   ;;
 esac
 
-cd ${SCRATCH}
-mkdir -p python$$
-cd python$$
+cd $${SCRATCH}
+mkdir -p python$$$$
+cd python$$$$
 
 export CONTROL=CONTROL
 
-cat >${CONTROL}<<EOF
+cat >$${CONTROL}<<EOF
+$control_content
 EOF
 
 
-submit.py --controlfile=${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
+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
+  for muser in `grep -i MAILOPS $${CONTROL}`; do
+      if [ $${l} -gt 0 ] ; then 
+         mail -s flex.$${HOST}.$$$$ $${muser} <prot
       fi
-      l=$((${l}+1))
+      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
+  for muser in `grep -i MAILFAIL $${CONTROL}`; do
+      if [ $${l} -gt 0 ] ; then 
+         mail -s "ERROR! flex.$${HOST}.$$$$" $${muser} <prot
       fi
-      l=$((${l}+1))
+      l=$(($${l}+1))
   done
 fi
Index: templates/job.template
===================================================================
--- templates/job.template	(revision e585e1bf84d6025c3e972a17537553d592ecbbf7)
+++ templates/job.template	(revision b02a07e92bd322edac5c617854791e5cc0e14990)
@@ -17,5 +17,5 @@
 ##PBS -q np
 ##PBS -S /usr/bin/ksh
-## -o /scratch/ms/$usergroup/$username/flex_ecmwf.$${PBS_JOBID}.out
+## -o /scratch/ms/$usergroup/$username/flex_ecmwf.$$$${PBS_JOBID}.out
 ## job output is in .ecaccess_DO_NOT_REMOVE
 ##PBS -j oe
@@ -26,51 +26,52 @@
 set -x
 export VERSION=$version_number
-case $${HOST} in
+case $$$${HOST} in
   *ecg*)
   module load python
   module unload grib_api
   module unload eccodes
+  module load eccodes
   module unload emos
-  module load grib_api/1.26.1
-  module load emos/457-r64
-  export PATH=$${PATH}:$fp_root_path
+  module load emos/455-r64
+  export PATH=$$$${PATH}:$fp_root_path
   ;;
   *cca*)
   module switch PrgEnv-cray PrgEnv-intel
-  module load grib_api
+  module load eccodes
   module load emos
   module load python
-  export SCRATCH=$${TMPDIR}
-  export PATH=$${PATH}:$fp_root_path
+  export SCRATCH=$$$${TMPDIR}
+  export PATH=$$$${PATH}:$fp_root_path
   ;;
 esac
 
-cd $${SCRATCH}
-mkdir -p python$$$$
-cd python$$$$
+cd $$$${SCRATCH}
+mkdir -p python$$$$$$$$
+cd python$$$$$$$$
 
 export CONTROL=CONTROL
 
-cat >$${CONTROL}<<EOF
+cat >$$$${CONTROL}<<EOF
+$$control_content
 EOF
 
 
-submit.py --controlfile=$${CONTROL} --inputdir=./work --outputdir=./work 1> prot 2>&1
+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
+  for muser in `grep -i MAILOPS $$$${CONTROL}`; do
+      if [ $$$${l} -gt 0 ] ; then 
+         mail -s flex.$$$${HOST}.$$$$$$$$ $$$${muser} <prot
       fi
-      l=$(($${l}+1))
+      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
+  for muser in `grep -i MAILFAIL $$$${CONTROL}`; do
+      if [ $$$${l} -gt 0 ] ; then 
+         mail -s "ERROR! flex.$$$${HOST}.$$$$$$$$" $$$${muser} <prot
       fi
-      l=$(($${l}+1))
+      l=$(($$$${l}+1))
   done
 fi
