Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3570)
@@ -11,5 +11,5 @@
 # @ total_tasks = NPROCS
 # time
-# @ wall_clock_limit = 0:30:00
+# @ wall_clock_limit = 1:30:00
 # @ queue
 
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3570)
@@ -54,9 +54,9 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3570)
@@ -57,10 +57,10 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
 #cbr     mpirun -np $OCEANCORES ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3570)
@@ -64,10 +64,9 @@
 #  Run the parallel MPI executable 
 #
+  if [ MPI_FLAG == "yes" ]; then
   echo "Running time ${MPIRUN} ./opa"
-#
-
-  if [ MPI_FLAG == "yes" ]; then
      time ${MPIRUN} ./opa
   else
+  echo "Running time./opa"
      time ./opa
   fi
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/README
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/README	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/README	(revision 3570)
@@ -11,8 +11,10 @@
                COMPILER    : compiler among those available in NEMOGCM/ARCH, needed for makenemo (see below)
                              can also be pass as an argument, e.g. ./sette.sh ifort_osx
-	       BATCH_COMMAND : command for job submission in batch mode
-	       MPI_INTERACT : "yes" if you want to run in interactive mode for MPI run
-	       		      "no" if you want to run in batch mode for MPI run
-			      NOTE : every job using only 1 proc is run in interactive mode
+	       BATCH_COMMAND_PAR : command for job submission in batch mode parallel (MMIÂ)
+	       BATCH_COMMAND_SEQ : command for job submission in batch mode sequential (NB_PROC = 1)
+	       INTERACT_FLAG : "yes" if you want to run in interactive mode 
+	       		       "no" if you want to run in batch mode
+	       MPIRUN_FLAG   : "yes" if you want to run in parallel (MPI)
+			       "no" if you want to run in sequential mode (NB_PROC = 1)
 
                makenemo -m : machine (compilator); see ./makenemo -m help (in NEMOGCM/CONFIG directory)
@@ -32,7 +34,10 @@
 				    IT is mandatory to have different TEST_NAME for each job run if not existing files are re-written (for example namelist)
 
-               fcm_job.sh needs input: input_CONFIG_NAME TOTAL_NUMBER_OF_PROCS_used TEST_NAME
-			(for example if you compile ORCA2_LIM with key_mpp_mpi 
-			and only run short test ===> ./fcm_job input_ORCA2_LIM.cfg 4 SHORT)
+               prepare_job.sh generates the script to be executed 
+			input: INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPIRUN_FLAG JOB_FILE
+
+               fcm_job.sh needs input: TOTAL_NUMBER_OF_PROCS_used JOB_FILE_NAME INTERACT_FLAG MPIRUN_FLAG 
+			(for example if you run with 4 procs JOB_FILE batch parallel 
+			and only run short test ===> ./fcm_job 4 SHORT no    yes   )
 
  in param.cfg :
@@ -46,6 +51,6 @@
                is the same of that in input_REF_CONFIG.cfg, if not change one.
 
-               change in "RUN OPA" if [ ${MPI_INTERACT} == "yes" ] mpirun command line (some examples are already written)
-	       NOTE: if MPI_INTERACT="no" it is neede a batch_file (see below to create a new one)
+               change in "RUN OPA" if [ ${INTERACT_FLAG} == "yes" ] mpirun command line (some examples are already written)
+	       NOTE: if INTERACT_FLAG="no" it is needed a batch_file (see below to create a new one)
 
 NOTE:
@@ -74,3 +79,3 @@
 1. see in SETTE/BATCH_TEMPLATE directory existing examples
 2. create you own batch file like: batch-${COMPILER}
-(note: sette.sh will copy it in job_batch_template if you run tests in MPI_INTERACT="no")
+(note: sette.sh will copy it in job_batch_template if you run tests in INTERACT_FLAG="no")
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/fcm_job.sh
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/fcm_job.sh	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/fcm_job.sh	(revision 3570)
@@ -6,5 +6,5 @@
 # fcm_job.sh   : simple job to run NEMO with fcm 
 ######################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
@@ -23,7 +23,7 @@
 # ========
 #
-# ::
+# :: lauches the script $JOB_FILE interactive or batch, one task or MPI
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
 #
 #
@@ -33,12 +33,5 @@
 # Simple job for SET TESTS for NEMO (SETTE)
 # 
-#   get input files (if needed) : tar file  
-#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name)
-#
-#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
-#
-#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
-#
-#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output)
+#  
 #
 # EXAMPLES
@@ -47,11 +40,10 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG
 #
-#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun
-#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no
+#  run a job with 1 processor SHORT test ( 5 days ) 
+#  using an interactive run without mpirun 
 #
-#  run a job of config ORCA2_LIM_PISCES	with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun
-#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes
+#  ./fcm_job.sh        1           SHORT        yes          no 
 #
 #
@@ -65,5 +57,5 @@
 # ==========
 #
-# $Id$
+# $Id: $
 #
 #
@@ -74,12 +66,12 @@
 #
 
-usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG"
-usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes"
+usage=" Usage : ./fcm_job.sh  NUMBER_OF_PROCS JOB_FILE INTERACT_FLAG MPIRUN_FLAG"
+usage=" example : ./fcm_job.sh       8          SHORT      no/yes       no/yes"
 
 
-minargcount=2
+minargcount=4
         if [ ${#} -lt ${minargcount} ]
         then
-                echo "not enought arguments for fcm_job.sh script"
+                echo "not enough arguments for fcm_job.sh script"
                 echo "control number of argument of fcm_job.sh in sette.sh"
                 echo "${usage}"
@@ -94,13 +86,18 @@
 export NB_PROCS=$1
 export JOB_FILE=$2
+export INTERACT_FLAG=$3
+export MPIRUN_FLAG=$4
 ################################################################
 # RUN OPA
 cd ${EXE_DIR}
-
-# submit job to batch system 
-        if [ ${NB_PROC} -eq 1 ]; then
-	   eval ${BATCH_COMMAND_SEQ} $JOB_FILE 
+if [ "${INTERACT_FLAG}" == "yes" ]; then
+	eval ${JOB_FILE}
+else if [ "${INTERACT_FLAG}" == "no" ]; then
+	# submit job to batch system 
+        if [ "${NB_PROC}" == "1" ]; then
+		eval ${BATCH_COMMAND_SEQ} ${JOB_FILE} ; echo  ${BATCH_COMMAND_SEQ} ${JOB_FILE}
         else
-	   eval ${BATCH_COMMAND_PAR} $JOB_FILE
+		eval ${BATCH_COMMAND_PAR} ${JOB_FILE} ; echo ${BATCH_COMMAND_PAR} ${JOB_FILE}
         fi
-
+fi
+fi
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM.cfg
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM.cfg	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM.cfg	(revision 3570)
@@ -1,1 +1,1 @@
-ORCA2_LIM_nemo_v3.3.tar
+ORCA2_LIM_nemo_v3.4.tar
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_ORCA2_LIM_AGRIF.cfg	(revision 3570)
@@ -1,1 +1,1 @@
-ORCA2_LIM_AGRIF_nemo_v3.3.tar
+ORCA2_LIM_nemo_v3.4.tar
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_POMME.cfg
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/input_POMME.cfg	(revision 3493)
+++ 	(revision )
@@ -1,1 +1,0 @@
-POMME_nemo_v3_3.tar
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/iodef_sette.xml
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/iodef_sette.xml	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/iodef_sette.xml	(revision 3570)
@@ -209,35 +209,28 @@
 
      <group id="ptrc_T" axis_ref="deptht" grid_ref="grid_T">  
-       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="molC/L"     />
-       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="eq/L"       />
-       <field id="O2"       description="Oxygen Concentration"                     unit="molO2/L"    />
-       <field id="CaCO3"    description="Calcite Concentration"                    unit="molC/L"     />
-       <field id="PO4"      description="Phosphate Concentration"                  unit="molC/L"     />
-       <field id="POC"      description="Small organic carbon Concentration"       unit="molC/L"     />
-       <field id="Si"       description="Silicate Concentration"                   unit="molSi/L"    />
-       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="molC/L"     />
-       <field id="ZOO"      description="Microzooplankton Concentration"           unit="molC/L"     />
-       <field id="DOC"      description="Dissolved organic Concentration"          unit="molC/L"     />
-       <field id="PHY2"     description="Diatoms Concentration"                    unit="molC/L"     />
-       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="molC/L"     />
-       <field id="BSi"      description="Diatoms Silicate Concentration"           unit="molC/L"     />
-       <field id="Fer"      description="Dissolved Iron Concentration"             unit="molFe/L"    />
-       <field id="BFe"      description="Big iron particles Concentration"         unit="molFe/L"    />
-       <field id="GOC"      description="Big organic carbon Concentration"         unit="molC/L"     />
-       <field id="SFe"      description="Small iron particles Concentration"       unit="molFe/L"    />
-       <field id="DFe"      description="Diatoms iron  Concentration"              unit="molFe/L"    />
-       <field id="DSi"      description="Sinking biogenic Silicate Concentration"  unit="molC/L"     />
-       <field id="NFe"      description="Nano iron Concentration"                  unit="molC/L"     />
-       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="gChl/L"     />
-       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="gChl/L"     />
-       <field id="NO3"      description="Nitrates Concentration"                   unit="molC/L"     />
-       <field id="NH4"      description="Ammonium Concentration"                   unit="molC/L"     />
-       <field id="DET"      description="Detritus"                                 unit="mmole-N/m3" />
-       <field id="ZOO"      description="Zooplankton Concentration"                unit="mmole-N/m3" />
-       <field id="PHY"      description="Phytoplankton Concentration"              unit="mmole-N/m3" />
-       <field id="NO3"      description="Nitrate Concentration"                    unit="mmole-N/m3" />
-       <field id="NH4"      description="Ammonium Concentration"                   unit="mmole-N/m3" />
-       <field id="DOM"      description="Dissolved Organic Matter"                 unit="mmole-N/m3" />
-
+       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="mmol/m3" />
+       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="mmol/m3"    />
+       <field id="O2"       description="Oxygen Concentration"                     unit="mmol/m3" />
+       <field id="CaCO3"    description="Calcite Concentration"                    unit="mmol/m3" />
+       <field id="PO4"      description="Phosphate Concentration"                  unit="mmol/m3" />
+       <field id="POC"      description="Small organic carbon Concentration"       unit="mmol/m3" />
+       <field id="Si"       description="Silicate Concentration"                   unit="mmol/m3" />
+       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="mmol/m3" />
+       <field id="ZOO"      description="Microzooplankton Concentration"           unit="mmol/m3" />
+       <field id="DOC"      description="Dissolved organic Concentration"          unit="mmol/m3" />
+       <field id="PHY2"     description="Diatoms Concentration"                    unit="mmol/m3" />
+       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="mmol/m3" />
+       <field id="DSi"      description="Diatoms Silicate Concentration"           unit="mmol/m3" />
+       <field id="Fer"      description="Dissolved Iron Concentration"             unit="mmol/m3" />
+       <field id="BFe"      description="Big iron particles Concentration"         unit="mmol/m3" />
+       <field id="GOC"      description="Big organic carbon Concentration"         unit="mmol/m3" />
+       <field id="SFe"      description="Small iron particles Concentration"       unit="mmol/m3" />
+       <field id="DFe"      description="Diatoms iron  Concentration"              unit="mmol/m3" />
+       <field id="GSi"      description="Sinking biogenic Silicate Concentration"  unit="mmol/m3" />
+       <field id="NFe"      description="Nano iron Concentration"                  unit="mmol/m3" />
+       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="mg/m3" />
+       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="mg/m3" />
+       <field id="NO3"      description="Nitrates Concentration"                   unit="mmol/m3" />
+       <field id="NH4"      description="Ammonium Concentration"                   unit="mmol/m3" />
      </group>
 
@@ -245,52 +238,57 @@
 
      <group id="diad_T" axis_ref="none" grid_ref="grid_T">
-       <field id="PH"          description="PH"                                       unit="-"           axis_ref="deptht" />
-       <field id="CO3"         description="Bicarbonates"                             unit="mol/L"       axis_ref="deptht" />
-       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/L"       axis_ref="deptht" />
-       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"        axis_ref="deptht" />
+       <field id="PH"          description="PH"                                       unit="-"          axis_ref="deptht" />
+       <field id="CO3"         description="Bicarbonates"                             unit="mol/m3"     axis_ref="deptht" />
+       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/m3"     axis_ref="deptht" />
+       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"       axis_ref="deptht" />
        <field id="PPPHY"       description="Primary production of nanophyto"          unit="molC/m3/s"   axis_ref="deptht" />
        <field id="PPPHY2"      description="Primary production of diatoms"            unit="molC/m3/s"   axis_ref="deptht" />
        <field id="PPNEWN"      description="New Primary production of nanophyto"      unit="molC/m3/s"   axis_ref="deptht" />
        <field id="PPNEWD"      description="New Primary production of diatoms"        unit="molC/m3/s"   axis_ref="deptht" />
-       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"  axis_ref="deptht" />
-       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"  axis_ref="deptht" />
-       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"  axis_ref="deptht" />
+       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"   axis_ref="deptht" />
+       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"   axis_ref="deptht" />
+       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"   axis_ref="deptht" />
+       <field id="xfracal"     description="Calcifying fraction"                      unit="-"          axis_ref="deptht" />
        <field id="PCAL"        description="Calcite production"                       unit="molC/m3/s"   axis_ref="deptht" />
        <field id="DCAL"        description="Calcite dissolution"                      unit="molC/m3/s"   axis_ref="deptht" />
-       <field id="GRAZ"        description="Grazing by zooplankton"                   unit="molC/m3/s"   axis_ref="deptht" />
-       <field id="Nfix"        description="Nitrogen fixation at surface"             unit="molN/m2/s"       />
-       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="molC/m2/s"       />
-       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="molFe/m2/s"      />
-       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="molSi/m2/s"      />
-       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="molC/m2/s"       />
-       <field id="Cflx"        description="DIC flux"                                 unit="molC/m2/s"       />
-       <field id="Oflx"        description="Oxygen flux"                              unit="molC/m2/s"       />
-       <field id="Kg"          description="Gas transfer"                             unit="molC/m2/s/uatm"  />
-       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"            />
-       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"            />
-       <field id="Heup"        description="Euphotic layer depth"                     unit="m"               />
-       <field id="Irondep"     description="Iron deposition"                          unit="molFe/m2/s"      />
-       <field id="FNO3PHY"     description="FNO3PHY"                                  unit="-"           axis_ref="deptht" /> 
-       <field id="FNH4PHY"     description="FNH4PHY"                                  unit="-"           axis_ref="deptht" /> 
-       <field id="FNH4NO3"     description="FNH4NO3"                                  unit="-"           axis_ref="deptht" /> 
-       <field id="TNO3PHY"     description="TNO3PHY"                                  unit="-"  /> 
-       <field id="TNH4PHY"     description="TNH4PHY"                                  unit="-"  /> 
-       <field id="TPHYDOM"     description="TPHYDOM"                                  unit="-"  /> 
-       <field id="TPHYNH4"     description="TPHYNH4"                                  unit="-"  /> 
-       <field id="TPHYZOO"     description="TPHYZOO"                                  unit="-"  /> 
-       <field id="TPHYDET"     description="TPHYDET"                                  unit="-"  /> 
-       <field id="TDETZOO"     description="TDETZOO"                                  unit="-"  /> 
-       <field id="TDETSED"     description="TDETSED"                                  unit="-"  /> 
-       <field id="TZOODET"     description="TZOODET"                                  unit="-"  /> 
-       <field id="TZOOBOD"     description="TZOOBOD"                                  unit="-"  /> 
-       <field id="TZOONH4"     description="TZOONH4"                                  unit="-"  /> 
-       <field id="TZOODOM"     description="TZOODOM"                                  unit="-"  /> 
-       <field id="TNH4NO3"     description="TNH4NO3"                                  unit="-"  /> 
-       <field id="TDOMNH4"     description="TDOMNH4"                                  unit="-"  /> 
-       <field id="TDETNH4"     description="TDETNH4"                                  unit="-"  /> 
-       <field id="TPHYTOT"     description="TPHYTOT"                                  unit="-"  /> 
-       <field id="TZOOTOT"     description="TZOOTOT"                                  unit="-"  /> 
-       <field id="TDETDOM"     description="TDETDOM"                                  unit="-"  /> 
-       <field id="SEDPOC"      description="SEDPOC"                                   unit="-"  /> 
+       <field id="GRAZ1"       description="Grazing by microzooplankton"              unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="GRAZ2"       description="Grazing by mesozooplankton"              unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="REMIN"       description="Oxic remineralization of OM"             unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="DENIT"       description="Anoxic remineralization of OM"           unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="Nfix"        description="Nitrogen fixation"                         unit="molN/m3/s"   axis_ref="deptht" />
+       <field id="Mumax"       description="Maximum growth rate"                      unit="s-1"        axis_ref="deptht" />
+       <field id="MuN"         description="Realized growth rate for nanophyto"       unit="s-1"        axis_ref="deptht" />
+       <field id="MuD"         description="Realized growth rate for diatomes"        unit="s-1"        axis_ref="deptht" />
+       <field id="LNnut"       description="Nutrient limitation term in Nanophyto"    unit="-"          axis_ref="deptht" />
+       <field id="LDnut"       description="Nutrient limitation term in Diatoms"      unit="-"          axis_ref="deptht" />
+       <field id="LNFe"        description="Iron limitation term in Nanophyto"        unit="-"          axis_ref="deptht" />
+       <field id="LDFe"        description="Iron limitation term in Diatoms"          unit="-"          axis_ref="deptht" />
+       <field id="LNlight"     description="Light limitation term in Nanophyto"       unit="-"          axis_ref="deptht" />
+       <field id="LDlight"     description="Light limitation term in Diatoms"         unit="-"          axis_ref="deptht" />
+       <field id="Fe2"        description="Iron II concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="Fe3"        description="Iron III concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeL1"        description="Complexed Iron concentration with L1"       unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeL2"        description="Complexed Iron concentration with L2"       unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeP"        description="Precipitated Iron III"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="TL1"        description="Total L1 concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="TL2"        description="Total L2 concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="pdust"        description="dust concentration"                      unit="g/L"    />
+       <field id="Totlig"        description="Total ligand concentation"                unit="nmol/L"   axis_ref="deptht" />
+       <field id="Biron"        description="Bioavailable iron"                       unit="nmol/L"   axis_ref="deptht" />
+       <field id="Sdenit"        description="Nitrate reduction in the sediments"     unit="molN/m2/s"      />
+       <field id="Ironice"     description="Iron input/uptake due to sea ice"             unit="molFe/m2/s"      />
+       <field id="HYDR"       description="Iron input from hydrothemal vents"          unit="molFe/m2/s"      />
+       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="mol/m2/s"                     />
+       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="mol/m2/s"                     />
+       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="mol/m2/s"                     />
+       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="mol/m2/s"                     />
+       <field id="Cflx"        description="DIC flux"                                 unit="mol/m2/s"                     />
+       <field id="Oflx"        description="Oxygen flux"                              unit="mol/m2/s"                     />
+       <field id="Kg"          description="Gas transfer"                             unit="mol/m2/s/uatm"                />
+       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"                         />
+       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"                         />
+       <field id="Heup"        description="Euphotic layer depth"                     unit="m"                            />
+       <field id="Irondep"     description="Iron deposition from dust"                 unit="mol/m2/s"                     />
+       <field id="Ironsed"     description="Iron deposition from sediment"             unit="mol/m2/s"  axis_ref="deptht"  />
      </group>
        
@@ -549,3 +547,549 @@
   </context>
   
+
+  <context id="1_nemo">
+    
+    <!-- $id$ -->
+
+    <!-- 
+============================================================================================================
+=                                  definition of all existing variables                                    =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    
+    <field_definition level="1" prec="4" operation="ave(X)" enabled=".TRUE."> <!-- time step automaticaly defined -->
+
+      <!-- T grid -->
+      
+      <group id="grid_T" axis_ref="none" grid_ref="grid_T">
+	<field id="toce"         description="temperature"                               unit="degC" axis_ref="deptht"   />
+       	<field id="soce"         description="salinity"                                  unit="psu"  axis_ref="deptht"   />
+	<field id="sst"          description="sea surface temperature"                   unit="degC"                     />
+	<field id="sst2"         description="square of sea surface temperature"         unit="degC2"                    />
+	<field id="sstgrad"      description="module of sst gradient"                    unit="degC/m"                   />
+	<field id="sstgrad2"     description="square of module of sst gradient"          unit="degC2/m2"                 />
+	<field id="sss"          description="sea surface salinity"                      unit="psu"                      />
+	<field id="sss2"         description="square of sea surface salinity"            unit="psu2"                     />
+	<field id="ssh"          description="sea surface height"                        unit="m"                        />
+	<field id="ssh2"         description="square of sea surface height"              unit="m2"                       />
+	<field id="mldkz5"       description="mixing layer depth (Turbocline)"           unit="m"                        />
+	<field id="mldr10_1"     description="Mixed Layer Depth 0.01 ref.10m"            unit="m"                        />
+       	<field id="rhop"         description="potential density (sigma0)"                unit="kg/m3" axis_ref="deptht"  />
+	<!-- next variables available with key_diahth -->
+	<field id="mlddzt"       description="Thermocline Depth (max dT/dz)"             unit="m"                        />
+	<field id="mldr10_3"     description="Mixed Layer Depth dr=0.03 (ref.10m)"       unit="m"                        />
+	<field id="mldr0_1"      description="Mixed Layer Depth dr=0.01 (ref.surf)"      unit="m"                        />
+	<field id="mldr0_3"      description="Mixed Layer Depth dr=0.03 (ref.surf)"      unit="m"                        />
+	<field id="mld_dt02"     description="Mixed Layer Depth |dt|=0.2 (ref.10m)"      unit="m"                        />
+	<field id="topthdep"     description="Top of the thermocline dt=-0.2 (ref.10m)"  unit="m"                        />
+	<field id="pycndep"      description="Pycnocline depth dr~dt=-0.2 (ref.10m)"     unit="m"                        />
+	<field id="BLT"          description="Barrier Layer Thickness"                   unit="m"                        />
+	<field id="tinv"         description="Max of vertical invertion of temperature"  unit="degC"                     />
+	<field id="depti"        description="Depth of max. vert. inv. of temperature"   unit="m"                        />
+        <field id="20d"          description="Depth of 20C isotherm"                     unit="m"                        />
+	<field id="28d"          description="Depth of 28C isotherm"                     unit="m"                        />
+	<field id="hc300"        description="Heat content 300 m"                        unit="W"                        />
+	<!-- variables available with key_diaar5 -->
+	<field id="botpres"      description="Pressure at sea floor"                     unit="dbar"                     />
+	<field id="cellthc"      description="Cell thickness"                            unit="m"     axis_ref="deptht"  />
+     </group>
+
+      <!-- SBC -->
+      
+      <group id="SBC" axis_ref="none" grid_ref="grid_T" > <!-- time step automaticaly defined based on nn_fsbc -->
+
+	<field id="empmr"        description="Net Upward Water Flux"                                        unit="kg/m2/s"  />
+	<field id="empsmr"       description="concentration/dilution water flux"                            unit="kg/m2/s"  />
+	<field id="snowpre"      description="Snow precipitation"                                           unit="kg/m2/s"  />
+	<field id="runoffs"      description="River Runoffs"                                                unit="Kg/m2/s"  />
+
+	<field id="qt"           description="Net Downward Heat Flux"                                       unit="W/m2"     />
+	<field id="qns"          description="non solar Downward Heat Flux"                                 unit="W/m2"     />
+	<field id="qsr"          description="Shortwave Radiation"                                          unit="W/m2"     />
+	<field id="qsr3d"        description="Shortwave Radiation 3D distribution"        axis_ref="deptht" unit="W/m2"     />
+	<field id="qrp"          description="Surface Heat Flux: Damping"                                   unit="W/m2"     />
+	<field id="erp"          description="Surface Water Flux: Damping"                                  unit="Kg/m2/s"  />
+	<field id="taum"         description="wind stress module"                                           unit="N/m2"     />
+	<field id="wspd"         description="Wind speed module at 10 m"                                    unit="m/s"      />
+
+        <!-- * variable relative to atmospheric pressure forcing : available with ln_apr_dyn -->
+        <field id="ssh_ib"       description="Inverse barometer sea surface height"                         unit="m"        />
+	
+	<!-- *_oce variables available with ln_blk_clio or ln_blk_core -->
+	<field id="qns_oce"      description="Non solar Downward Heat Flux over open ocean"                 unit="W/m2"     />
+	<field id="qlw_oce"      description="Longwave Downward Heat Flux over open ocean"                  unit="W/m2"     />
+	<field id="qsb_oce"      description="Sensible Downward Heat Flux over open ocean"                  unit="W/m2"     />
+	<field id="qla_oce"      description="Latent Downward Heat Flux over open ocean"                    unit="W/m2"     />
+	<field id="taum_oce"     description="wind stress module over open ocean"                           unit="N/m2"     />
+
+	<field id="ice_cover"    description="Ice fraction"                                                 unit="1"        />
+
+	<field id="ioceflxb"     description="Oceanic flux at the ice base"                                 unit="W/m2"     />
+	<field id="qsr_ai_cea"   description="Air-Ice downward solar heat flux (cell average)"              unit="W/m2"     />
+	<field id="qns_ai_cea"   description="Air-Ice downward non-solar heat flux (cell average)"          unit="W/m2"     />
+	<field id="qla_ai_cea"   description="Air-Ice downward Latent heat flux (cell average)"             unit="W/m2"     />
+	
+	<field id="qsr_io_cea"   description="Ice-Oce downward solar heat flux (cell average)"              unit="W/m2"     />
+	<field id="qns_io_cea"   description="Ice-Oce downward non-solar heat flux (cell average)"          unit="W/m2"     />
+	
+	<field id="snowthic_cea" description="Snow thickness (cell average)"                                unit="m"        />
+	<field id="icethic_cea"  description="Ice thickness (cell average)"                                 unit="m"        />
+	<field id="iceprod_cea"  description="Ice production (cell average)"                                unit="m/s"      />
+	
+	<field id="ice_pres"     description="Ice presence"                                                 unit="-"        />
+	<field id="ist_cea"      description="Ice surface temperature (cell average)"                       unit="degC"     />
+	<field id="ist_ipa"      description="Ice surface temperature (ice presence average)"               unit="degC"     />      
+	<field id="uice_ipa"     description="Ice velocity along i-axis at I-point (ice presence average)"  unit="m/s"      />      
+	<field id="vice_ipa"     description="Ice velocity along j-axis at I-point (ice presence average)"  unit="m/s"      />      
+	
+	<field id="utau_ice"     description="Wind stress along i-axis over the ice at i-point"             unit="N/m2"     />
+	<field id="vtau_ice"     description="Wind stress along j-axis over the ice at i-point"             unit="N/m2"     />
+	
+	<field id="u_imasstr"    description="Sea-ice mass transport along i-axis"                          unit="kg/s"     />
+	<field id="v_imasstr"    description="Sea-ice mass transport along j-axis"                          unit="kg/s"     />
+
+	<!-- available key_coupled -->
+	<field id="snow_ao_cea"  description="Snow over ice-free ocean (cell average)"                      unit="kg/m2/s"  />
+	<field id="snow_ai_cea"  description="Snow over sea-ice (cell average)"                             unit="kg/m2/s"  />
+	<field id="subl_ai_cea"  description="Sublimation over sea-ice (cell average)"                      unit="kg/m2/s"  />
+	<field id="icealb_cea"   description="Ice albedo (cell average)"                                    unit="1"        />
+	<field id="calving"      description="Calving"                                                      unit="kg/m2/s"  />
+	<!-- available if key_coupled + conservative method -->
+	<field id="rain"         description="Liquid precipitation"                                         unit="Kg/m2/s"  />
+	<field id="evap_ao_cea"  description="Evaporation over ice-free ocean (cell average)"               unit="kg/m2/s"  />
+	<!-- variables available with key_diaar5 -->
+	<field id="isnwmlt_cea"   description="Snow over Ice melting (cell average)"                        unit="kg/m2/s"  />
+	<field id="fsal_virt_cea" description="Virtual salt flux due to ice formation (cell average)"       unit="kg/m2/s"  />
+	<field id="fsal_real_cea" description="Real salt flux due to ice formation (cell average)"          unit="kg/m2/s"  />
+	<field id="hflx_rain_cea" description="heat flux due to rainfall"                                   unit="W/m2"     />
+	<field id="hflx_evap_cea" description="heat flux due to evaporation"                                unit="W/m2"     />
+	<field id="hflx_snow_cea" description="heat flux due to snow falling over ice-free ocean"           unit="W/m2"     />
+	<field id="hflx_ice_cea"  description="heat flux due to ice thermodynamics"                         unit="W/m2"     />
+	<field id="hflx_rnf_cea"  description="heat flux due to runoffs"                                    unit="W/m2"     />
+	<field id="hflx_cal_cea"  description="heat flux due to calving"                                    unit="W/m2"     />
+	<field id="bicemel_cea"  description="Rate of Melt at Sea Ice Base (cell average)"                  unit="kg/m2/s"  />
+	<field id="licepro_cea"  description="Lateral Sea Ice Growth Rate (cell average)"                   unit="kg/m2/s"  />
+	<field id="snowmel_cea"  description="Snow Melt Rate (cell average)"                                unit="kg/m2/s"  />
+	<field id="sntoice_cea"  description="Snow-Ice Formation Rate (cell average)"                       unit="kg/m2/s"  />
+	<field id="ticemel_cea"  description="Rate of Melt at Upper Surface of Sea Ice (cell average)"      unit="kg/m2/s"  />
+
+      </group>
+
+      <!-- U grid -->
+      
+      <group id="grid_U"  axis_ref="depthu" grid_ref="grid_U">
+	<field id="utau"         description="Wind Stress along i-axis"                    unit="N/m2" axis_ref="none" />
+	<field id="uoce"         description="ocean current along i-axis"                  unit="m/s"                  />
+	<field id="uocetr_eff"   description="Effective ocean transport along i-axis"      unit="m3/s"                  />
+	<!-- uoce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="uoce_eiv"     description="EIV ocean current along i-axis"              unit="m/s"                  />
+	<!-- uoce_eiv: available with key_trabbl -->
+	<field id="uoce_bbl"     description="BBL ocean current along i-axis"              unit="m/s"  axis_ref="none" />
+	<field id="ahu_bbl"      description="BBL diffusive flux along i-axis"             unit="m3/s" axis_ref="none" />
+ 	<!-- variables available with key_diaar5 -->
+	<field id="u_masstr"     description="ocean eulerian mass transport along i-axis"  unit="kg/s"                 />
+	<field id="u_heattr"     description="ocean eulerian heat transport along i-axis"  unit="W"    axis_ref="none" />
+	<field id="ueiv_heattr"  description="ocean bolus heat transport along i-axis"     unit="W"    axis_ref="none" />
+	<field id="udiff_heattr" description="ocean diffusion heat transport along i-axis" unit="W"    axis_ref="none" />
+     </group>
+      
+      <!-- V grid -->
+      
+      <group id="grid_V"  axis_ref="depthv" grid_ref="grid_V">
+	<field id="vtau"         description="Wind Stress along j-axis"                    unit="N/m2" axis_ref="none" />
+	<field id="voce"         description="ocean current along j-axis"                  unit="m/s"                  />
+	<field id="vocetr_eff"   description="Effective ocean transport along j-axis"      unit="m3/s"                  />
+	<!-- voce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="voce_eiv"     description="EIV ocean current along j-axis"              unit="m/s"                  />
+	<!-- voce_eiv: available with key_trabbl -->
+	<field id="voce_bbl"     description="BBL ocean current along j-axis"              unit="m/s" axis_ref="none"  />
+	<field id="ahv_bbl"      description="BBL diffusive flux along j-axis"             unit="m3/s" axis_ref="none" />
+	<!-- variables available with key_diaar5 -->
+	<field id="v_masstr"     description="ocean eulerian mass transport along j-axis"  unit="kg/s"                 />
+	<field id="v_heattr"     description="ocean eulerian heat transport along j-axis"  unit="W"    axis_ref="none" />
+	<field id="veiv_heattr"  description="ocean bolus heat transport along j-axis"     unit="W"    axis_ref="none" />
+	<field id="vdiff_heattr" description="ocean diffusion heat transport along j-axis" unit="W"    axis_ref="none" />
+      </group>
+      
+      <!-- W grid -->
+      
+      <group id="grid_W"  axis_ref="depthw" grid_ref="grid_W">
+	<field id="woce"         description="ocean vertical velocity"                     unit="m/s"                  />
+	<field id="wocetr_eff"   description="effective ocean vertical transport"          unit="m3/s"                 />
+	<!-- woce_eiv: available with key_traldf_eiv and key_diaeiv -->
+	<field id="woce_eiv"     description="EIV ocean vertical velocity"                 unit="m/s"                  />
+	<!-- woce_eiv: available with key_trabbl_adv -->
+	<field id="avt"          description="vertical eddy diffusivity"                   unit="m2/s"                 />
+	<field id="avm"          description="vertical eddy viscosity"                     unit="m2/s"                 />
+	<!-- avs: available with key_zdfddm -->
+	<field id="avs"          description="salt vertical eddy diffusivity"              unit="m2/s"                 />
+	<!-- avt_evd and avm_evd: available with ln_zdfevd -->
+	<field id="avt_evd"      description="enhanced vertical diffusivity"               unit="m2/s"                 />
+	<field id="avm_evd"      description="enhanced vertical viscosity"                 unit="m2/s"                 />
+	<!-- aht2d and  aht2d_eiv: available with key_traldf_eiv and key_traldf_c2d -->
+	<field id="aht2d"        description="lateral eddy diffusivity"                    unit="m2/s" axis_ref="none" />
+	<field id="aht2d_eiv"    description="EIV lateral eddy diffusivity"                unit="m2/s" axis_ref="none" />
+	<!-- avt_tide: available with key_zdftmx -->
+	<field id="av_tide"      description="tidal vertical diffusivity"                  unit="m2/s"                 />
+	<!-- variables available with key_diaar5 -->   
+	<field id="w_masstr"     description="vertical mass trasport"                      unit="kg/s"                 />
+	<field id="w_masstr2"    description="square of vertical mass trasport"            unit="kg2/s2"               />
+      </group>
+          
+      <!-- scalar -->
+      
+      <!-- variables available with key_diaar5 -->
+      <group id="scalar" axis_ref="none" grid_ref="scalarpoint" zoom_ref="1point" >
+	<field id="voltot"     description="global mean volume"                         unit="m3"   />
+	<field id="sshtot"     description="global mean ssh"                            unit="m"    />
+	<field id="sshsteric"  description="global mean ssh steric"                     unit="m"    />
+	<field id="sshthster"  description="global mean ssh thermosteric"               unit="m"    />
+	<field id="masstot"    description="global mean mass"                           unit="kg"   />
+	<field id="temptot"    description="global mean temperature"                    unit="degC" />
+	<field id="saltot"     description="global mean salinity"                       unit="psu"  />
+	<field id="fram_trans" description="Sea Ice Mass Transport Through Fram Strait" unit="kg/s" />
+      </group>
+         
+      <!-- ptrc on T grid -->
+
+     <group id="ptrc_T" axis_ref="deptht" grid_ref="grid_T">  
+       <field id="DIC"      description="Dissolved inorganic Concentration"        unit="mmol/m3" />
+       <field id="Alkalini" description="Total Alkalinity Concentration"           unit="mmol/m3"    />
+       <field id="O2"       description="Oxygen Concentration"                     unit="mmol/m3" />
+       <field id="CaCO3"    description="Calcite Concentration"                    unit="mmol/m3" />
+       <field id="PO4"      description="Phosphate Concentration"                  unit="mmol/m3" />
+       <field id="POC"      description="Small organic carbon Concentration"       unit="mmol/m3" />
+       <field id="Si"       description="Silicate Concentration"                   unit="mmol/m3" />
+       <field id="PHY"      description="Nanophytoplankton Concentration"          unit="mmol/m3" />
+       <field id="ZOO"      description="Microzooplankton Concentration"           unit="mmol/m3" />
+       <field id="DOC"      description="Dissolved organic Concentration"          unit="mmol/m3" />
+       <field id="PHY2"     description="Diatoms Concentration"                    unit="mmol/m3" />
+       <field id="ZOO2"     description="Mesozooplankton Concentration"            unit="mmol/m3" />
+       <field id="DSi"      description="Diatoms Silicate Concentration"           unit="mmol/m3" />
+       <field id="Fer"      description="Dissolved Iron Concentration"             unit="mmol/m3" />
+       <field id="BFe"      description="Big iron particles Concentration"         unit="mmol/m3" />
+       <field id="GOC"      description="Big organic carbon Concentration"         unit="mmol/m3" />
+       <field id="SFe"      description="Small iron particles Concentration"       unit="mmol/m3" />
+       <field id="DFe"      description="Diatoms iron  Concentration"              unit="mmol/m3" />
+       <field id="GSi"      description="Sinking biogenic Silicate Concentration"  unit="mmol/m3" />
+       <field id="NFe"      description="Nano iron Concentration"                  unit="mmol/m3" />
+       <field id="NCHL"     description="Nano chlorophyl Concentration"            unit="mg/m3" />
+       <field id="DCHL"     description="Diatoms chlorophyl Concentration"         unit="mg/m3" />
+       <field id="NO3"      description="Nitrates Concentration"                   unit="mmol/m3" />
+       <field id="NH4"      description="Ammonium Concentration"                   unit="mmol/m3" />
+     </group>
+
+      <!-- diad on T grid : variables available with key_diatrc -->
+
+     <group id="diad_T" axis_ref="none" grid_ref="grid_T">
+       <field id="PH"          description="PH"                                       unit="-"          axis_ref="deptht" />
+       <field id="CO3"         description="Bicarbonates"                             unit="mol/m3"     axis_ref="deptht" />
+       <field id="CO3sat"      description="CO3 saturation"                           unit="mol/m3"     axis_ref="deptht" />
+       <field id="PAR"         description="Photosynthetically Available Radiation"   unit="W/m2"       axis_ref="deptht" />
+       <field id="PPPHY"       description="Primary production of nanophyto"          unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPPHY2"      description="Primary production of diatoms"            unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPNEWN"      description="New Primary production of nanophyto"      unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PPNEWD"      description="New Primary production of diatoms"        unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="PBSi"        description="Primary production of Si diatoms"         unit="molSi/m3/s"   axis_ref="deptht" />
+       <field id="PFeN"        description="Primary production of nano iron"          unit="molFe/m3/s"   axis_ref="deptht" />
+       <field id="PFeD"        description="Primary production of diatoms iron"       unit="molFe/m3/s"   axis_ref="deptht" />
+       <field id="xfracal"     description="Calcifying fraction"                      unit="-"          axis_ref="deptht" />
+       <field id="PCAL"        description="Calcite production"                       unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="DCAL"        description="Calcite dissolution"                      unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="GRAZ1"       description="Grazing by microzooplankton"              unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="GRAZ2"       description="Grazing by mesozooplankton"              unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="REMIN"       description="Oxic remineralization of OM"             unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="DENIT"       description="Anoxic remineralization of OM"           unit="molC/m3/s"   axis_ref="deptht" />
+       <field id="Nfix"        description="Nitrogen fixation"                         unit="molN/m3/s"   axis_ref="deptht" />
+       <field id="Mumax"       description="Maximum growth rate"                      unit="s-1"        axis_ref="deptht" />
+       <field id="MuN"         description="Realized growth rate for nanophyto"       unit="s-1"        axis_ref="deptht" />
+       <field id="MuD"         description="Realized growth rate for diatomes"        unit="s-1"        axis_ref="deptht" />
+       <field id="LNnut"       description="Nutrient limitation term in Nanophyto"    unit="-"          axis_ref="deptht" />
+       <field id="LDnut"       description="Nutrient limitation term in Diatoms"      unit="-"          axis_ref="deptht" />
+       <field id="LNFe"        description="Iron limitation term in Nanophyto"        unit="-"          axis_ref="deptht" />
+       <field id="LDFe"        description="Iron limitation term in Diatoms"          unit="-"          axis_ref="deptht" />
+       <field id="LNlight"     description="Light limitation term in Nanophyto"       unit="-"          axis_ref="deptht" />
+       <field id="LDlight"     description="Light limitation term in Diatoms"         unit="-"          axis_ref="deptht" />
+       <field id="Fe2"        description="Iron II concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="Fe3"        description="Iron III concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeL1"        description="Complexed Iron concentration with L1"       unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeL2"        description="Complexed Iron concentration with L2"       unit="nmol/L"   axis_ref="deptht" />
+       <field id="FeP"        description="Precipitated Iron III"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="TL1"        description="Total L1 concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="TL2"        description="Total L2 concentration"                      unit="nmol/L"   axis_ref="deptht" />
+       <field id="pdust"        description="dust concentration"                      unit="g/L"    />
+       <field id="Totlig"        description="Total ligand concentation"                unit="nmol/L"   axis_ref="deptht" />
+       <field id="Biron"        description="Bioavailable iron"                       unit="nmol/L"   axis_ref="deptht" />
+       <field id="Sdenit"        description="Nitrate reduction in the sediments"     unit="molN/m2/s"      />
+       <field id="Ironice"     description="Iron input/uptake due to sea ice"             unit="molFe/m2/s"      />
+       <field id="HYDR"       description="Iron input from hydrothemal vents"          unit="molFe/m2/s"      />
+       <field id="EPC100"      description="Export of carbon particles at 100 m"      unit="mol/m2/s"                     />
+       <field id="EPFE100"     description="Export of biogenic iron at 100 m"         unit="mol/m2/s"                     />
+       <field id="EPSI100"     description="Export of Silicate at 100 m"              unit="mol/m2/s"                     />
+       <field id="EPCAL100"    description="Export of Calcite at 100 m"               unit="mol/m2/s"                     />
+       <field id="Cflx"        description="DIC flux"                                 unit="mol/m2/s"                     />
+       <field id="Oflx"        description="Oxygen flux"                              unit="mol/m2/s"                     />
+       <field id="Kg"          description="Gas transfer"                             unit="mol/m2/s/uatm"                />
+       <field id="Dpco2"       description="Delta CO2"                                unit="uatm"                         />
+       <field id="Dpo2"        description="Delta O2"                                 unit="uatm"                         />
+       <field id="Heup"        description="Euphotic layer depth"                     unit="m"                            />
+       <field id="Irondep"     description="Iron deposition from dust"                 unit="mol/m2/s"                     />
+       <field id="Ironsed"     description="Iron deposition from sediment"             unit="mol/m2/s"  axis_ref="deptht"  />
+     </group>
+       
+    </field_definition>
+    
+    <!-- 
+============================================================================================================
+=                                           output files definition                                        =
+=                                            Define your own files                                         =
+=                                         put the variables you want...                                    =
+============================================================================================================
+    -->
+    
+    <file_definition >
+
+      <group id="1h" output_freq="3600"   output_level="10" enabled=".TRUE.">                      <!-- 1h files -->
+      </group>
+      
+      <group id="2h" output_freq="7200"   output_level="10" enabled=".TRUE.">                      <!-- 2h files -->
+      </group>
+      
+      <group id="3h" output_freq="10800"  output_level="10" enabled=".TRUE.">                      <!-- 3h files -->
+      </group>
+      
+      <group id="4h" output_freq="14400"  output_level="10" enabled=".TRUE.">                      <!-- 4h files -->
+      </group>
+      
+      <group id="6h" output_freq="21600"  output_level="10" enabled=".TRUE.">                      <!-- 6h files -->
+      </group>
+      
+      <group id="1d" output_freq="86400"  output_level="10" enabled=".TRUE.">                      <!-- 1d files -->
+      </group>
+      
+      <group id="3d" output_freq="259200" output_level="10" enabled=".TRUE.">                      <!-- 3d files -->
+      </group>
+      
+      <group id="5d" output_freq="432000" output_level="10" enabled=".TRUE.">                      <!-- 5d files -->
+      </group>
+      
+      <group id="1m" output_freq="-1"     output_level="10" enabled=".TRUE.">                      <!-- real monthly files -->
+      </group>
+
+      <group id="2m" output_freq="-2"     output_level="10" enabled=".TRUE.">                      <!-- real 2m files -->
+      </group>
+
+      <group id="3m" output_freq="-3"     output_level="10" enabled=".TRUE.">                      <!-- real 3m files -->
+      </group>
+
+      <group id="4m" output_freq="-4"     output_level="10" enabled=".TRUE.">                      <!-- real 4m files -->
+      </group>
+
+      <group id="6m" output_freq="-6"     output_level="10" enabled=".TRUE.">                      <!-- real 6m files -->
+      </group>
+
+      <group id="1y" output_freq="-12"    output_level="10" enabled=".TRUE.">                      <!-- real yearly files -->
+      </group>
+
+      <group id="2y"  output_freq="-24"   output_level="10" enabled=".TRUE.">                      <!-- real 2y files -->
+      </group>
+
+      <group id="5y"  output_freq="-60"   output_level="10" enabled=".TRUE.">                      <!-- real 5y files -->
+      </group>
+
+      <group id="10y" output_freq="-120"  output_level="10" enabled=".TRUE.">                      <!-- real 10y files -->
+      </group>
+
+    </file_definition>
+    
+    <!-- 
+============================================================================================================
+=                                           grid definition                                                =
+=                                            DO NOT CHANGE                                                 =
+============================================================================================================
+    -->
+    
+    <axis_definition>  
+      <axis id="deptht" description="Vertical T levels" unit="m" positive=".false." />
+      <axis id="depthu" description="Vertical U levels" unit="m" positive=".false." />
+      <axis id="depthv" description="Vertical V levels" unit="m" positive=".false." />
+      <axis id="depthw" description="Vertical W levels" unit="m" positive=".false." />
+      <axis id="none" description="axe non defini" unit="none" size="1" />
+    </axis_definition> 
+    
+    <grid_definition>
+      <grid id="grid_T" description="grid T" >
+    <!--   Eq section   -->
+        <zoom id="EqT" ibegin="1" jbegin="0000" ni="0000" nj="1" />
+    <!--   TAO   -->
+      <!--   137e   -->
+        <zoom id="2n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n137eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   147e   -->
+        <zoom id="0n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n147eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   156e   -->
+        <zoom id="5s156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n156eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   165e   -->
+        <zoom id="8s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n165eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   180w   -->
+        <zoom id="8s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n180wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   170w   -->
+        <zoom id="8s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n170wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   155w   -->
+        <zoom id="8s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n155wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   140w   -->
+        <zoom id="8s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n140wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   125w   -->
+        <zoom id="8s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n125wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   110w   -->
+        <zoom id="8s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n110wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   95w   -->
+        <zoom id="8s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2s95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="2n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n95wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+    <!--   RAMA   -->
+      <!--   55e   -->
+        <zoom id="16s55eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12s55eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8s55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4s55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5s55eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5n55eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n55eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   65e   -->
+        <zoom id="15n65eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   67e   -->
+        <zoom id="16s67eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12s67eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8s67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4s67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5s67eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5n67eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n67eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   80.5e   -->
+        <zoom id="16s80.5eT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12s80.5eT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8s80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4s80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5s80.5eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5n80.5eT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n80.5eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   90e   -->
+        <zoom id="1.5s90eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="1.5n90eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n90eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12n90eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="15n90eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   95e   -->
+        <zoom id="16s95eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12s95eT"    ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8s95eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="5s95eT"     ibegin="0000" jbegin="0000" ni="1" nj="1" />
+    <!--   PIRATA   -->
+      <!--   38w-30w   -->
+        <zoom id="19s34wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="14s32wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8s30wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n35wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n38wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="8n38wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="15n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="20n38wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   23w   -->
+        <zoom id="0n23wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="4n23wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="12n23wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="21n23wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   10w   -->
+        <zoom id="10s10wT" ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="6s10wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+        <zoom id="0n10wT"  ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      <!--   0e   -->
+        <zoom id="0n0eT"   ibegin="0000" jbegin="0000" ni="1" nj="1" />
+      </grid>
+
+      <grid id="grid_U" description="grid U" >
+    <!--   Eq section   -->
+        <zoom id="EqU" ibegin="1" jbegin="0000" ni="0000" nj="1" />
+      </grid>
+
+      <grid id="grid_V" description="grid V" >
+      </grid>
+
+      <grid id="grid_W" description="grid W" >
+    <!--   Eq section   -->
+        <zoom id="EqW" ibegin="1" jbegin="0000" ni="0000" nj="1" />
+      </grid>
+
+      <grid id="scalarpoint" description="scalar" >
+        <zoom id="1point" ibegin="1" jbegin="1" ni="1" nj="1" />
+      </grid>
+
+
+    </grid_definition>    
+    
+</context>
+
 </simulation>
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/prepare_job.sh	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/prepare_job.sh	(revision 3570)
@@ -1,14 +1,19 @@
 #####################################################
-# Author : Italo Epicoco for NEMO
-# Contact : italo.epicoco@unisalento.it
-#
-# Some scripts called by sette.sh 
-# prepare_job.sh   : create the job script for running job 
+# Author : Simona Flavoni for NEMO
+# Contact : sflod@locean-ipsl.upmc.fr
+#
+# ----------------------------------------------------------------------
+# NEMO/SETTE , NEMO Consortium (2010)
+# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
+# ----------------------------------------------------------------------
+#
+# Some scripts called by sette.sh
+# prepare_job.sh   : creates the job script for running job 
 ######################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
 #set -e
-#
+#+
 #
 # ================
@@ -16,7 +21,7 @@
 # ================
 #
-# --------------------------
-# create the job script for NEMO tests 
-# --------------------------
+# -------------------------------------------------
+# script that creates the job script for NEMO tests 
+# -------------------------------------------------
 #
 # SYNOPSIS
@@ -25,5 +30,5 @@
 # ::
 #
-#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE
 #
 #
@@ -31,14 +36,7 @@
 # ===========
 #
-# Simple job for SET TESTS for NEMO (SETTE)
+# Part of the SETTE package to run tests for NEMO
 # 
-#   get input files (if needed) : tar file  
-#  (note this job needs to have an input_CONFIG.cfg in which can be found input tar file name)
-#
-#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
-#
-#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
-#
-#   and call post_test_tidyup function (that moves in NEMO_VALIDATION_DIR solver.stat, tracer.stat (for LOBSTER & PISCES) & ocean.output)
+# prepare the script $JOB_FILE to run the tests 
 #
 # EXAMPLES
@@ -47,11 +45,7 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
-#
-#  run a job of config GYRE with 1 processor SHORT test ( 5 days ) using an interactive run without mpirun
-#  $ ./fcm_job.sh input_GYRE.cfg 1 SHORT yes no
-#
-#  run a job of config ORCA2_LIM_PISCES	with 8 processors test RESTARTABILITY submitting the job to the batch queue system and using mpirun
-#  $ ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 LONG no yes
+#  $ ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG $JOB_FILE
+#
+# prepare the $JOB_FILE for execution 
 #
 #
@@ -65,5 +59,5 @@
 # ==========
 #
-# $Id: fcm_job.sh 3050 2011-11-07 14:11:34Z acc $
+# $Id: prepare_job.sh 3050 2011-11-07 14:11:34Z acc $
 #
 #
@@ -74,6 +68,6 @@
 #
 
-usage=" Usage : ./fcm_job.sh input_CONFIG_NAME.cfg  NUMBER_OF_PROCS TEST_NAME INTERACT MPI_FLAG"
-usage=" example : ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes no/yes"
+usage=" Usage : ./prepare_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_FLAG JOB_FILE"
+usage=" example : ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg 8 SHORT no/yes $JOB_FILE"
 
 
@@ -81,6 +75,6 @@
         if [ ${#} -lt ${minargcount} ]
         then
-                echo "not enought arguments for fcm_job.sh script"
-                echo "control number of argument of fcm_job.sh in sette.sh"
+                echo "not enough arguments for prepare_job.sh script"
+                echo "control number of argument of prepare_job.sh in sette.sh"
                 echo "${usage}"
         exit 1
@@ -165,31 +159,8 @@
     exit 1
 fi
-#if [ ${NB_PROC} == 1 ] ; then
-#    echo "running opa" >> ${SETTE_DIR}/output.sette
-#    echo "            " >> ${SETTE_DIR}/output.sette
-#    ./opa
-#
-# Tidy out output from this test and populate the NEMO_VALIDATION_DIR tree
-#
-#    post_test_tidyup
-#else
-#    echo "running opa in MPI" >> ${SETTE_DIR}/output.sette
-#    echo "            " >> ${SETTE_DIR}/output.sette
-
-#    if [ ${MPI_INTERACT} == "yes" ] ; then
-#	#
-#	# example for brodie (NEC SX8) machine
-#	#	mpirun -np ${NB_PROC} opa
-#	# example for dedale machine
-#	#	mpirun --mca btl self,tcp -np ${NB_PROC} opa
-#	# example for vargas (IBM Power6) machine
-#	mpiexec -n ${NB_PROC} opa
-#	#
-#	post_test_tidyup
-#    fi
-#
+
 # example for NOCS Altix system using PBS batch submission (requires ${SETTE_DIR}/sette_batch_template file)
 #
-  #  if [ ${MPI_INTERACT} == "no" ] ; then
+  #  if [ ${MPI_FLAG} == "no" ] ; then
 		case ${COMPILER} in 
 			ALTIX_NAUTILUS_MPT)
@@ -198,5 +169,5 @@
 					# number of processes required is an integer multiple of 4
 					#
-					NB_NODES=$( echo $NB_PROC | awk '{print $1  $1 / 4}')
+					NB_NODES=$( echo $NB_PROC | awk '{print $1 / 4}')
 				else
 					#
@@ -238,9 +209,5 @@
 # Pass settings into job file by using sed to edit predefined strings
 #
-         ((mem=5*NB_PROC))
-         echo NB_NODES NB_PROC QUEUE ${NB_NODES} ${NB_PROC} ${QUEUE}
-        cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCSNODE/${NB_PROC_NODE}/" \
-             -e"s/NPROCS/${NB_PROC}/" \
-             -e"s/QUEUE/${QUEUE}/" -e"s/MEM/${mem}/" \
+        cat ${SETTE_DIR}/job_batch_template | sed -e"s/NODES/${NB_NODES}/" -e"s/NPROCS/${NB_PROC}/" \
              -e"s:DEF_SETTE_DIR:${SETTE_DIR}:" -e"s:DEF_INPUT_DIR:${INPUT_DIR}:" \
              -e"s:DEF_EXE_DIR:${EXE_DIR}:" \
@@ -266,5 +233,5 @@
 	fi
 	
-	chmod a+x $JOB_FILE
+	chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready"
 
 #fi
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh	(revision 3570)
@@ -129,8 +129,9 @@
 #-
 # Compiler among those in NEMOGCM/ARCH
-COMPILER=ifort_MERCATOR_CLUSTER
-export BATCH_COMMAND_PAR="qsub "
+COMPILER=PW6_VARGAS
+export BATCH_COMMAND_PAR="llsubmit"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
-
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
 
 # Directory to run the tests
@@ -154,13 +155,12 @@
     export TEST_NAME="LONG"
     cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER -j 8  
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=1
-    rm $JOB_FILE
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER add_key "key_mpp_mpi"
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    \rm ${JOB_FILE}
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_LONG\"
@@ -171,6 +171,9 @@
     set_namelist namelist nn_solv 2
     set_namelist namelist_top ln_diatrc .false.
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
 
     cd ${SETTE_DIR}
@@ -186,30 +189,36 @@
     set_namelist namelist ln_clobber .true.
     set_namelist namelist nn_solv 2
-    ln -s -f ..\/LONG\/GYRELOB_LONG_00000060_restart.nc
-    ln -s -f ..\/LONG\/GYRELOB_LONG_00000060_restart_trc.nc
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
     set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\"
+    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
     set_namelist namelist_top ln_diatrc .false.
     set_namelist namelist_top ln_rsttr .true.
     set_namelist namelist_top nn_rsttr 2
-    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/GYRELOB_LONG_00000060_restart_trc_${L_NPROC}.nc .
+    done
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
 if [ ${config} -eq 2 ] ;  then
-    ## Reproducibility tests for GYRE_LOBSTER
+    ## Repropducibility tests for GYRE_LOBSTER
     export TEST_NAME="REPRO_1_4"
     cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER -j 8 add_key "key_mpp_rep key_mpp_mpi"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep"
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
     NPROC=4
-    rm $JOB_FILE
+    \rm ${JOB_FILE}
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_14\"
@@ -227,15 +236,11 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 
     cd ${SETTE_DIR}
     export TEST_NAME="REPRO_2_2"
     . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=4
-    rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_22\"
@@ -252,7 +257,8 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
 fi
 
@@ -262,13 +268,12 @@
     export TEST_NAME="LONG"
     cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=1
-    rm $JOB_FILE
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi" 
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    \rm ${JOB_FILE}
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"O2LP_LONG\"
@@ -277,4 +282,7 @@
     set_namelist namelist nn_stock 75
     set_namelist namelist ln_clobber .true.
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
     set_namelist namelist nn_solv 2
     set_namelist namelist_top ln_trcdta .false.
@@ -288,5 +296,5 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
     
     cd ${SETTE_DIR}
@@ -301,14 +309,14 @@
     set_namelist namelist nn_rstctl 2
     set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_solv 2
-    ln -s -f ../LONG/O2LP_LONG_00000075_restart.nc
-    ln -s -f ../LONG/O2LP_LONG_00000075_restart_ice.nc
-    ln -s -f ../LONG/O2LP_LONG_00000075_restart_trc.nc
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
+    set_namelist namelist nn_solv 2
     set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
     set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
+    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
     set_namelist namelist_top ln_diatrc .false.
     set_namelist namelist_top ln_rsttr .true.
     set_namelist namelist_top nn_rsttr 2
-    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust
     # if not you need input files, and for tests is not necessary
@@ -318,12 +326,19 @@
     set_namelist namelist_pisces ln_dust .false.
     set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/O2LP_LONG_00000075_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/O2LP_LONG_00000075_restart_trc_${L_NPROC}.nc .
+        ln -sf ../LONG/O2LP_LONG_00000075_restart_ice_${L_NPROC}.nc .
+    done
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
 if [ ${config} -eq 4 ] ;  then
-    ## Reproducibility tests for ORCA2_LIM_PISCES
+    ## Repropducibility tests for ORCA2_LIM_PISCES
     export TEST_NAME="REPRO_4_4"
     cd ${SETTE_DIR}
@@ -334,11 +349,11 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
     set_namelist namelist nn_itend 75
     set_namelist namelist nn_fwb 0
+    set_namelist namelist ln_ctl .false.
     set_namelist namelist ln_clobber .true.
     set_namelist namelist jpni 4
@@ -356,19 +371,16 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 
     cd ${SETTE_DIR}
     export TEST_NAME="REPRO_2_8"
     . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=16
-    rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
     set_namelist namelist nn_itend 75
     set_namelist namelist nn_fwb 0
+    set_namelist namelist ln_ctl .false.
     set_namelist namelist ln_clobber .true.
     set_namelist namelist jpni 2
@@ -386,7 +398,7 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
@@ -396,13 +408,12 @@
     export TEST_NAME="LONG"
     cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=1
-    rm $JOB_FILE
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"OFFP_LONG\"
@@ -411,4 +422,7 @@
     set_namelist namelist nn_stock 20
     set_namelist namelist ln_clobber .true.
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
     set_namelist namelist_top ln_trcdta .false.
     set_namelist namelist_top ln_diatrc .false.
@@ -421,9 +435,12 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
     
     cd ${SETTE_DIR}
     export TEST_NAME="SHORT"
     . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=4
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"OFFP_SHORT\"
@@ -432,9 +449,17 @@
     set_namelist namelist nn_stock 20
     set_namelist namelist ln_clobber .true.
-    ln -s ../LONG/OFFP_LONG_00000020_restart_trc.nc .
+    set_namelist namelist jpni 2
+    set_namelist namelist jpnj 2
+    set_namelist namelist jpnij 4
+    cp ../LONG/OFFP_LONG_00000020_restart*nc .
     set_namelist namelist_top ln_diatrc .false.
     set_namelist namelist_top ln_rsttr .true.
     set_namelist namelist_top nn_rsttr 2
     set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/OFFP_LONG_00000020_restart_trc_${L_NPROC}.nc .
+    done
     # put ln_ironsed, ln_river, ln_ndepo, ln_dust
     # if not you need input files, and for tests is not necessary
@@ -445,11 +470,11 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME}  ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
 if [ ${config} -eq 6 ] ;  then
-    ## Reproducibility tests for ORCA2_OFF_PISCES
+    ## Repropducibility tests for ORCA2_OFF_PISCES
     export TEST_NAME="REPRO_4_4"
     cd ${SETTE_DIR}
@@ -460,10 +485,10 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=16
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
     set_namelist namelist nn_itend 40
+    set_namelist namelist ln_ctl .false.
     set_namelist namelist ln_clobber .true.
     set_namelist namelist jpni 4
@@ -480,18 +505,15 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 
     cd ${SETTE_DIR}
     export TEST_NAME="REPRO_2_8"
     . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=16
-    rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
     set_namelist namelist nn_itend 40
+    set_namelist namelist ln_ctl .false.
     set_namelist namelist ln_clobber .true.
     set_namelist namelist jpni 2
@@ -508,26 +530,25 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
-fi
-
-# TESTS FOR AMM12 CONFIGURATION
+    . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC  ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
 if [ ${config} -eq 7 ] ;  then
-    ## Reproducibility tests for AMM12
-    export TEST_NAME="REPRO_8_4"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 -j 8 add_key "key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
+    ## Restartability tests for AMM12
+    export TEST_NAME="LONG"
+    cd ${SETTE_DIR}
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
     NPROC=32
-    rm $JOB_FILE
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 576
+    \rm $JOB_FILE
+    cd ${EXE_DIR}
+    set_namelist namelist nn_it000 1
+    set_namelist namelist nn_itend 12
+    set_namelist namelist nn_stock 6
     set_namelist namelist nn_fwb 0
     set_namelist namelist ln_ctl .false.
@@ -539,59 +560,5 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_4_8"
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=32
-    rm $JOB_FILE
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 576
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 4
-    set_namelist namelist jpnj 8
-    set_namelist namelist jpnij 32
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
-fi
-
-if [ ${config} -eq 8 ] ;  then
-    ## Restartability tests for AMM12
-    export TEST_NAME="LONG"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 -j 8 add_key "key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
-    NPROC=32
-    rm $JOB_FILE
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 12
-    set_namelist namelist nn_stock 6
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist jpni 8
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 32
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
 
     cd ${SETTE_DIR}
@@ -611,9 +578,62 @@
     set_namelist namelist ln_rstart .true.
     set_namelist namelist nn_rstctl 2
-    set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\"
-    cd ${SETTE_DIR}
-    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/AMM12_00000006_restart_${L_NPROC}.nc .
+    done
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+fi
+
+if [ ${config} -eq 8 ] ;  then
+    ## Reproducibility tests for AMM12
+    export TEST_NAME="REPO_8_4"
+    cd ${SETTE_DIR}
+    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
+    cd ${SETTE_DIR}
+    . param.cfg
+    . all_functions.sh
+    . prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    \rm ${JOB_FILE}
+    cd ${EXE_DIR}
+    set_namelist namelist nn_it000 1
+    set_namelist namelist nn_itend 576
+    set_namelist namelist nn_fwb 0
+    set_namelist namelist ln_ctl .false.
+    set_namelist namelist ln_clobber .true.
+    set_namelist namelist nn_dyn2d 2
+    set_namelist namelist nn_tra_dta 0
+    set_namelist namelist jpni 8
+    set_namelist namelist jpnj 4
+    set_namelist namelist jpnij 32
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPO_4_8"
+    . prepare_exe_dir.sh
+    cd ${EXE_DIR}
+    set_namelist namelist nn_it000 1
+    set_namelist namelist nn_itend 576
+    set_namelist namelist nn_fwb 0
+    set_namelist namelist ln_ctl .false.
+    set_namelist namelist nn_dyn2d 2
+    set_namelist namelist nn_tra_dta 0
+    set_namelist namelist ln_clobber .true.
+    set_namelist namelist jpni 4
+    set_namelist namelist jpnj 8
+    set_namelist namelist jpnij 32
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
@@ -629,7 +649,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=2
-    rm $JOB_FILE
+    \rm ${JOB_FILE}
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -645,7 +664,7 @@
     set_namelist 1_namelist ln_clobber .true.
     cd ${SETTE_DIR}
-    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
 fi
 
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh.vargas
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette.sh.vargas	(revision 3493)
+++ 	(revision )
@@ -1,593 +1,0 @@
-#!/bin/bash
-#############################################################
-# Author : Simona Flavoni for NEMO
-# Contact : sflod@locean-ipsl.upmc.fr
-#
-# sette.sh   : principal script of SET TEsts for NEMO (SETTE)
-# ----------------------------------------------------------------------
-# NEMO/SETTE , NEMO Consortium (2010)
-# Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt)
-# ----------------------------------------------------------------------
-#
-#############################################################
-#set -x
-set -o posix
-#set -u
-#set -e
-#+
-#
-# ================
-# sette.sh
-# ================
-#
-# ----------------------------------------------
-# Set of tests for NEMO
-# ----------------------------------------------
-#
-# SYNOPSIS
-# ========
-#
-# ::
-#
-#  $ ./sette.sh
-#
-# DESCRIPTION
-# ===========
-#
-# Variables to be checked by user:
-#
-# COMPILER : name of compiler as defined in NEMOGCM/ARCH directory 
-#
-# BATCH_COMMAND :  name of the command for batch submission
-#
-# MPI_INTERACT :  
-#
-#         for MPP tests, "no" for batch execution, "yes" for interactive execution 
-#
-#         NOTE: for run with 1 process tests are run always in MPI_INTERACT="yes"
-#
-# Principal script is sette.sh, that calls 
-#
-#  makenemo 
-#
-#   creates the exectuable in ${CONFIG_NAME}/BLD/bin/nemo.exe  (and its link opa in ${CONFIG_NAME}/EXP00)
-#
-#  param.cfg : sets and loads following directories:
-#
-#   FORCING_DIR : is the directory for forcing files (tarfile)
-#
-#   INPUT_DIR : is the directory for input files storing 
-#
-#   TMPDIR : is the temporary directory (if needed)
-# 
-#   NEMO_VALIDATION_DIR : is the validation directory
-#
-#   (NOTE: this file is the same for all configrations to be tested with sette)
-#
-#
-#  all_functions.sh : loads functions used by sette (note: new functions can be added here)
-#
-#   set_namelist : function declared in all_functions that set namelist parameters for tests
-#
-#   post_test_tidyup : creates validation storage directory and copy needed output files (solver.stat and ocean.output) in it after execution of test.
-#
-#   Tree of VALIDATION is:
-#
-#   NEMO_VALIDATION_DIR/WCONFIG_NAME/WCOMPILER_NAME/TEST_NAME/REVISION_NUMBER(or DATE)
-#
-#
-#  prepare_exe_dir.sh : defines and creates directory where the test is executed
-#
-#       execution directory takes name of TEST_NAME defined in every test in sette.sh
-#
-#       ( each test in executed in its own directory )
-#
-#
-#  fcm_job.sh 
-#
-#   runs job in interactive or batch mode : all jobs using 1 process are run interactive, and all MPP jobs are
-#
-#   run in batch (MPI_INTERACT="no") or interactive (MPI_INTERACT="yes") see sette.sh and BATCH_TEMPLATE directory
-#
-#   (note this job needs to have an input_CONFIG.cfg in which can be found input tar file)
-# 
-#  NOTE: if job is not launched for some problems you have executable ready in ${EXE_DIR} directory
-#
-#  NOTE: the changed namelists are leaved in ${EXE_DIR} directory whereas original namelist remains in ${NEW_CONF}/EXP00
-# 
-#  in ${SETTE_DIR} is created output.sette with the echo of executed commands
-#
-#  if sette.sh is stopped in output.sette there is written the last command executed by sette.sh
-#
-#  if you run: ./sette.sh 2>&1 | tee out.sette
-#
-#  in ${SETTE_DIR} out.sette is redirected standard error & standard output
-#
-#
-# EXAMPLES
-# ========
-#
-# ::
-#
-#  $ ./sette.sh 
-#
-#
-# TODO
-# ====
-#
-# option debug
-#
-# EVOLUTIONS
-# ==========
-#
-# $Id: sette.sh 2890 2011-10-06 11:03:48Z flavoni $
-#
-#   * creation
-#
-#-
-#
-#-
-# Compiler among those in NEMOGCM/ARCH
-COMPILER=PW6_VARGAS
-export BATCH_COMMAND=llsubmit
-export MPI_INTERACT="yes"
-
-# Directory to run the tests
-SETTE_DIR=$(cd $(dirname "$0"); pwd)
-MAIN_DIR=${SETTE_DIR%/SETTE}
-CONFIG_DIR=${MAIN_DIR}/CONFIG
-TOOLS_DIR=${MAIN_DIR}/TOOLS
-COMPIL_DIR=${TOOLS_DIR}/COMPILE
-
-CMP_NAM=${1:-$COMPILER}
-# Copy job_batch_COMPILER file for specific compiler into job_batch_template
-cd ${SETTE_DIR}
-cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
-
-for config in 1 2 3 4 5 6 7 8
-do
-
-# TESTS FOR GYRE_LOBSTER CONFIGURATION
-if [ ${config} -eq 1 ] ;  then
-    ## Restartability tests for GYRE_LOBSTER
-    export TEST_NAME="LONG"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_LONG -r GYRE_LOBSTER add_key "key_mpp_mpi key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"GYRELOB_LONG\"
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 120
-    set_namelist namelist nn_stock 60
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"GYRELOB_SHORT\"
-    set_namelist namelist nn_it000 61
-    set_namelist namelist nn_itend 120
-    set_namelist namelist nn_stock 60
-    set_namelist namelist ln_rstart .true.
-    set_namelist namelist nn_rstctl 2
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_solv 2
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    cp ..\/LONG\/GYRELOB_LONG_00000060_restart*.nc .
-    set_namelist namelist cn_ocerst_in \"GYRELOB_LONG_00000060_restart\"
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist_top ln_rsttr .true.
-    set_namelist namelist_top nn_rsttr 2
-    set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME}
-fi
-
-if [ ${config} -eq 2 ] ;  then
-    ## Repropducibility tests for GYRE_LOBSTER
-    export TEST_NAME="REPRO_1_4"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRELOB_4 -r GYRE_LOBSTER add_key "key_mpp_rep key_mpp_mpi"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"GYRELOB_14\"
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 60
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist nn_bench 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist jpni 1
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 4
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_2_2"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"GYRELOB_22\"
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 60
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_GYRE.cfg 4 ${TEST_NAME}
-fi
-
-# TESTS FOR ORCA2_LIM_PISCES CONFIGURATION
-if [ ${config} -eq 3 ] ;  then
-    ## Restartability tests for ORCA2_LIM_PISCES
-    export TEST_NAME="LONG"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_LONG -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep" 
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"O2LP_LONG\"
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 150
-    set_namelist namelist nn_stock 75
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 4 ${TEST_NAME}
-    
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"O2LP_SHORT\"
-    set_namelist namelist nn_it000 76
-    set_namelist namelist nn_itend 150
-    set_namelist namelist nn_stock 75
-    set_namelist namelist ln_rstart .true.
-    set_namelist namelist nn_rstctl 2
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    set_namelist namelist nn_solv 2
-    cp ../LONG/O2LP_LONG_00000075_restart*nc .
-    set_namelist namelist cn_ocerst_in \"O2LP_LONG_00000075_restart\"
-    set_namelist namelist_ice cn_icerst_in \"O2LP_LONG_00000075_restart_ice\"
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist_top ln_rsttr .true.
-    set_namelist namelist_top nn_rsttr 2
-    set_namelist namelist_top cn_trcrst_in \"O2LP_LONG_00000075_restart_trc\"
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 4 ${TEST_NAME}
-fi
-
-if [ ${config} -eq 4 ] ;  then
-    ## Repropducibility tests for ORCA2_LIM_PISCES
-    export TEST_NAME="REPRO_4_4"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2LIMPIS_16 -r ORCA2_LIM_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 75
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 4
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 16
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_2_8"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 75
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 8
-    set_namelist namelist jpnij 16
-    set_namelist namelist nn_solv 2
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_LIM_PISCES.cfg 16 ${TEST_NAME}
-fi
-
-# TESTS FOR ORCA2_OFF_PISCES CONFIGURATION
-if [ ${config} -eq 5 ] ;  then
-    ## Restartability tests for ORCA2_OFF_PISCES
-    export TEST_NAME="LONG"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_LONG -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_mpi key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"OFFP_LONG\"
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 40
-    set_namelist namelist nn_stock 20
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 4 ${TEST_NAME}
-    
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist cn_exp \"OFFP_SHORT\"
-    set_namelist namelist nn_it000 21
-    set_namelist namelist nn_itend 40
-    set_namelist namelist nn_stock 20
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 4
-    cp ../LONG/OFFP_LONG_00000020_restart*nc .
-    set_namelist namelist_top ln_diatrc .false.
-    set_namelist namelist_top ln_rsttr .true.
-    set_namelist namelist_top nn_rsttr 2
-    set_namelist namelist_top cn_trcrst_in \"OFFP_LONG_00000020_restart_trc\"
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 4 ${TEST_NAME}
-fi
-
-if [ ${config} -eq 6 ] ;  then
-    ## Repropducibility tests for ORCA2_OFF_PISCES
-    export TEST_NAME="REPRO_4_4"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2OFFPIS_16 -r ORCA2_OFF_PISCES -j 8 add_key "key_mpp_rep key_mpp_mpi"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 40
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 4
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 16
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 16 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPRO_2_8"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 40
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 2
-    set_namelist namelist jpnj 8
-    set_namelist namelist jpnij 16
-    set_namelist namelist_top ln_trcdta .false.
-    set_namelist namelist_top ln_diatrc .false.
-    # put ln_ironsed, ln_river, ln_ndepo, ln_dust to false
-    # if not you need input files, and for tests is not necessary
-    set_namelist namelist_pisces ln_ironsed .false.
-    set_namelist namelist_pisces ln_river .false.
-    set_namelist namelist_pisces ln_ndepo .false.
-    set_namelist namelist_pisces ln_dust .false.
-    set_namelist namelist_pisces ln_presatm .false.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_OFF_PISCES.cfg 16 ${TEST_NAME}
-fi
-
-# TESTS FOR AMM12 CONFIGURATION
-if [ ${config} -eq 7 ] ;  then
-    ## Reproducibility tests for AMM12
-    export TEST_NAME="REPO_8_4"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_32 -r AMM12 add_key "key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 576
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist jpni 8
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 32
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_AMM12.cfg 32 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="REPO_4_8"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 576
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 4
-    set_namelist namelist jpnj 8
-    set_namelist namelist jpnij 32
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_AMM12.cfg 32 ${TEST_NAME}
-fi
-
-if [ ${config} -eq 8 ] ;  then
-    ## Restartability tests for AMM12
-    export TEST_NAME="LONG"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n AMM12_LONG -r AMM12 add_key "key_mpp_rep"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 12
-    set_namelist namelist nn_stock 6
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist jpni 8
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 32
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_AMM12.cfg 32 ${TEST_NAME}
-
-    cd ${SETTE_DIR}
-    export TEST_NAME="SHORT"
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 7
-    set_namelist namelist nn_itend 12
-    set_namelist namelist nn_fwb 0
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist nn_dyn2d 2
-    set_namelist namelist nn_tra_dta 0
-    set_namelist namelist jpni 8
-    set_namelist namelist jpnj 4
-    set_namelist namelist jpnij 32
-    set_namelist namelist ln_rstart .true.
-    set_namelist namelist nn_rstctl 2
-    cp ../LONG/AMM12_00000006_restart*.nc .
-    set_namelist namelist cn_ocerst_in \"AMM12_00000006_restart\"
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_AMM12.cfg 32 ${TEST_NAME}
-fi
-
-# TEST FOR ORCA2_LIM_AGRIF : simple test of running AGRIF (no restartability neither reproducibility tests)
-if [ ${config} -eq 9 ] ;  then
-    ## ORCA2_LIM with Agulhas AGRIF zoom in MPI
-    export TEST_NAME="SHORT"
-    cd ${SETTE_DIR}
-    . ../CONFIG/makenemo -m ${CMP_NAM} -n ORCA2AGUL_1_2 -r ORCA2_LIM -j 8 add_key "key_mpp_rep key_mpp_mpi key_agrif" del_key "key_zdftmx"
-    cd ${SETTE_DIR}
-    . param.cfg
-    . all_functions.sh
-    . prepare_exe_dir.sh
-    cd ${EXE_DIR}
-    set_namelist namelist nn_it000 1
-    set_namelist namelist nn_itend 75
-    set_namelist namelist ln_ctl .false.
-    set_namelist namelist ln_clobber .true.
-    set_namelist namelist jpni 1
-    set_namelist namelist jpnj 2
-    set_namelist namelist jpnij 2
-    set_namelist 1_namelist nn_it000 1
-    set_namelist 1_namelist nn_itend 150
-    set_namelist 1_namelist ln_ctl .false.
-    set_namelist 1_namelist ln_clobber .true.
-    cd ${SETTE_DIR}
-    . ./fcm_job.sh input_ORCA2_LIM_AGRIF.cfg 2 ${TEST_NAME}
-fi
-
-done
Index: branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette_beginner.sh
===================================================================
--- branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette_beginner.sh	(revision 3493)
+++ branches/2012/dev_r3327_MERCATOR1_BDY/NEMOGCM/SETTE/sette_beginner.sh	(revision 3570)
@@ -11,5 +11,5 @@
 #
 #############################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
@@ -39,6 +39,8 @@
 # Compiler among those in NEMOGCM/ARCH
 COMPILER=PW6_VARGAS
-export BATCH_COMMAND=llsubmit
-export MPI_INTERACT="no"
+export BATCH_COMMAND_PAR="llsubmit"
+export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
 
 # Directory to run the tests
@@ -57,7 +59,7 @@
 # small test to start
 # compile GYRE configuration with gfortran_osx compiler run with 1 proc, by default in cpp_GYRE.fcm file : 
-export TEST_NAME="TEST01"
+export TEST_NAME="prova_beginner"
 cd ${SETTE_DIR}
-. ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE
+. ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE -j 10 add_key "key_mpp_mpi"
 cd ${SETTE_DIR}
 . param.cfg 
@@ -65,4 +67,7 @@
 # creation of execution directory
 . prepare_exe_dir.sh
+JOB_FILE=${EXE_DIR}/run_job.sh
+NPROC=4
+\rm $JOB_FILE
 cd ${EXE_DIR}
 # setting namelist parameters
@@ -75,5 +80,8 @@
 # frequency of creation of a restart file
 set_namelist namelist nn_stock 60
+
 cd ${SETTE_DIR}
+. ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE}
 # run job, with 1 processor, test named SHORT (= 60 time steps)
-. ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME}
+cd ${SETTE_DIR}   
+. ./fcm_job.sh 4 ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
