Index: branches/2012/dev_NOC_2012_rev3555/ADM/DOC_SCRIPTS/sphinx/conf.py
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/ADM/DOC_SCRIPTS/sphinx/conf.py	(revision 3608)
+++ branches/2012/dev_NOC_2012_rev3555/ADM/DOC_SCRIPTS/sphinx/conf.py	(revision 3608)
@@ -0,0 +1,202 @@
+# -*- coding: utf-8 -*-
+#
+# superbib documentation build configuration file, created by
+# sphinx-quickstart on Wed Mar 10 16:19:33 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+#sys.path.append(os.path.abspath('/usr/home/fplod/src/superbib_ws/adm/sphinx_tmpdir/source/'))
+
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo']
+todo_include_todos = True
+
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+source_encoding = 'iso-8859-15'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'NEMO FCM'
+copyright = u'2010, CNRS'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '1.0.1'
+# The full version, including alpha/beta/rc tags.
+release = '1.0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+language = 'en'
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+today_fmt = '%Y%m%d'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = []
+
+exclude_dirnames = ['.svn']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+html_use_modindex = True
+
+# If false, no index is generated.
+html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = False
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'SETTE validation tool'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+  ('index', 'sette_tools.tex', u'NEMO validation tools Documentation',
+   u'C. Levy', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
+
+keep_warnings = 'True'
Index: branches/2012/dev_NOC_2012_rev3555/ADM/README
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/ADM/README	(revision 3608)
+++ branches/2012/dev_NOC_2012_rev3555/ADM/README	(revision 3608)
@@ -0,0 +1,9 @@
+Generates automatic documentation: in ADM/DOC_SCRIPTS 
+Pre requisite: to have sphinx installed
+Input file is in ADM/DOC_SCRIPTS/sphinx/conf.py to be checked/modifies by user
+
+Once the input file is set up, run:
+cd ADM/DOC_SCRIPTS
+gmake -f makefile_compile before
+gmake -f makefile_compile man_pdf
+to generate documentation in pdf in ADM/DOC_SCRIPTS/doc/manuals/pdf/sphinx
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/NEMO/OPA_SRC/IOM/prtctl.F90	(revision 3608)
@@ -118,6 +118,6 @@
       IF( PRESENT(tab2d_1) )   ztab2d_1(:,:)        = tab2d_1(:,:)
       IF( PRESENT(tab2d_2) )   ztab2d_2(:,:)        = tab2d_2(:,:)
-      IF( PRESENT(tab3d_1) )   ztab3d_1(:,:,1:kdir) = tab3d_1(:,:,:)
-      IF( PRESENT(tab3d_2) )   ztab3d_2(:,:,1:kdir) = tab3d_2(:,:,:)
+      IF( PRESENT(tab3d_1) )   ztab3d_1(:,:,1:kdir) = tab3d_1(:,:,1:kdir)
+      IF( PRESENT(tab3d_2) )   ztab3d_2(:,:,1:kdir) = tab3d_2(:,:,1:kdir)
       IF( PRESENT(mask1)   )   zmask1  (:,:,:)      = mask1  (:,:,:)
       IF( PRESENT(mask2)   )   zmask2  (:,:,:)      = mask2  (:,:,:)
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-PW6_VARGAS	(revision 3608)
@@ -60,11 +60,11 @@
   echo Directory is `pwd`
 # 
-#  Run the parallel MPI executable 
-#
-  echo "Running time ${MPIRUN} ./opa"
+#  Run the executable 
 #
   if [ MPI_FLAG == "yes" ]; then
+  echo "Running time ${MPIRUN} ./opa"
      time ${MPIRUN} ./opa
   else
+  echo "Running time ./opa"
      time ./opa
   fi
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-X64_TITANE	(revision 3608)
@@ -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_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/batch-ifort_MERCATOR_CLUSTER	(revision 3608)
@@ -57,9 +57,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_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/BATCH_TEMPLATE/sette_batch_template	(revision 3608)
@@ -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_NOC_2012_rev3555/NEMOGCM/SETTE/README
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/README	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/README	(revision 3608)
@@ -32,5 +32,8 @@
 				    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
+               prepare_job.sh generates the script to be executed 
+			input: INPUT_FILE_CONFIG_NAME NB_PROCS TEST_NAME MPI_FLAG JOB_FILE_NAME
+
+               fcm_job.sh needs input: TOTAL_NUMBER_OF_PROCS_used JOB_FILE_NAME INTERACT_FLAG MPI_FLAG 
 			(for example if you compile ORCA2_LIM with key_mpp_mpi 
 			and only run short test ===> ./fcm_job input_ORCA2_LIM.cfg 4 SHORT)
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/fcm_job.sh	(revision 3608)
@@ -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 MPI_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,7 @@
 # ::
 #
-#  $ ./fcm_job.sh INPUT_FILE_CONFIG_NAME NUMBER_PROC TEST_NAME MPI_INTERACT MPI_FLAG
+#  $ ./fcm_job.sh NUMBER_OF_PROCS JOB_FILE 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
+#  run a 
 #
 #
@@ -74,12 +63,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 MPI_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 +83,18 @@
 export NB_PROCS=$1
 export JOB_FILE=$2
+export INTERACT=$3
+export MPI_FLAG=$4
 ################################################################
 # RUN OPA
 cd ${EXE_DIR}
-
+if [ "$INTERACT" == "yes" ]; then
+        eval $JOB_FILE
+else if [ "$INTERACT" == "no" ]; then
 # submit job to batch system 
-        if [ ${NB_PROC} -eq 1 ]; then
-	   eval ${BATCH_COMMAND_SEQ} $JOB_FILE 
+        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_NOC_2012_rev3555/NEMOGCM/SETTE/prepare_job.sh
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/prepare_job.sh	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/prepare_job.sh	(revision 3608)
@@ -6,9 +6,9 @@
 # prepare_job.sh   : create the job script for running job 
 ######################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
 #set -e
-#
+#+
 #
 # ================
@@ -25,5 +25,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 +31,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 +40,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 +54,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 +63,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 +70,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 +154,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)
@@ -239,5 +205,5 @@
 	fi
 	
-	chmod a+x $JOB_FILE
+	chmod a+x $JOB_FILE ; echo "$JOB_FILE is ready"
 
 #fi
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette.sh	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette.sh	(revision 3608)
@@ -84,4 +84,8 @@
 #
 #
+#  prepare_job.sh
+#
+#  to generate the script run_job.sh
+#
 #  fcm_job.sh 
 #
@@ -129,7 +133,9 @@
 #-
 # Compiler among those in NEMOGCM/ARCH
-COMPILER=PW6_CALYPSO
-export BATCH_COMMAND_PAR="bsub < "
+COMPILER=PW6_VARGAS
+export BATCH_COMMAND_PAR="llsubmit"
 export BATCH_COMMAND_SEQ=$BATCH_COMMAND_PAR
+export INTERACT_FLAG="no"
+export MPIRUN_FLAG="yes"
 
 
@@ -160,7 +166,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_LONG\"
@@ -172,5 +177,8 @@
     set_namelist namelist_top ln_diatrc .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./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}
@@ -194,7 +202,8 @@
     set_namelist namelist_top cn_trcrst_in \"GYRELOB_LONG_00000060_restart_trc\"
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -209,7 +218,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=4
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_14\"
@@ -227,7 +235,8 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -235,7 +244,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=4
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"GYRELOB_22\"
@@ -252,7 +260,8 @@
     set_namelist namelist jpnij 4
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_GYRE.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -268,7 +277,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"O2LP_LONG\"
@@ -288,8 +296,11 @@
     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}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
+    . ./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
+#
     export TEST_NAME="SHORT"
+    cd ${SETTE_DIR}
     . prepare_exe_dir.sh
     cd ${EXE_DIR}
@@ -319,7 +330,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 fi
 
@@ -334,7 +346,6 @@
     . 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
@@ -356,7 +367,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -364,7 +376,6 @@
     . 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
@@ -386,7 +397,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+    cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -402,7 +414,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=1
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist cn_exp \"OFFP_LONG\"
@@ -421,4 +432,5 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     
@@ -445,7 +457,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -460,7 +473,6 @@
     . 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
@@ -480,7 +492,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 
     cd ${SETTE_DIR}
@@ -488,7 +501,6 @@
     . 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
@@ -508,7 +520,8 @@
     set_namelist namelist_pisces ln_presatm .false.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_OFF_PISCES.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -524,7 +537,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -539,7 +551,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 
     cd ${SETTE_DIR}
@@ -547,7 +560,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -562,7 +574,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
@@ -577,7 +590,6 @@
     . prepare_exe_dir.sh
     JOB_FILE=${EXE_DIR}/run_job.sh
-    MPIRUN_FLAG="yes"
     NPROC=32
-    rm $JOB_FILE
+    \rm $JOB_FILE
     cd ${EXE_DIR}
     set_namelist namelist nn_it000 1
@@ -593,5 +605,8 @@
     set_namelist namelist jpnij 32
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./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}
@@ -613,7 +628,8 @@
     set_namelist namelist cn_ocerst_in \"../LONG/AMM12_00000006_restart\"
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_AMM12.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE $INTERACT_FLAG $MPIRUN_FLAG 
 fi
 
@@ -629,7 +645,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 +660,8 @@
     set_namelist 1_namelist ln_clobber .true.
     cd ${SETTE_DIR}
+   cp BATCH_TEMPLATE/batch-${COMPILER} job_batch_template || exit
     . ./prepare_job.sh input_ORCA2_LIM_AGRIF.cfg $NPROC ${TEST_NAME} $MPIRUN_FLAG $JOB_FILE
     cd ${SETTE_DIR}
-    . ./fcm_job.sh $NPROC $JOB_FILE
+    . ./fcm_job.sh $NPROC $JOB_FILE  $INTERACT_FLAG $MPIRUN_FLAG
 fi
 
Index: branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette_beginner.sh
===================================================================
--- branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette_beginner.sh	(revision 3607)
+++ branches/2012/dev_NOC_2012_rev3555/NEMOGCM/SETTE/sette_beginner.sh	(revision 3608)
@@ -11,5 +11,5 @@
 #
 #############################################################
-#set -x
+#set -vx
 set -o posix
 #set -u
@@ -39,6 +39,7 @@
 # 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 MPI_INTERACT="no"
 
 # Directory to run the tests
@@ -57,5 +58,5 @@
 # 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="TEST02"
 cd ${SETTE_DIR}
 . ../CONFIG/makenemo -m ${CMP_NAM} -n GYRE_SHORT -r GYRE
@@ -65,4 +66,5 @@
 # creation of execution directory
 . prepare_exe_dir.sh
+JOB_FILE=${EXE_DIR}/run_job.sh
 cd ${EXE_DIR}
 # setting namelist parameters
@@ -75,5 +77,11 @@
 # frequency of creation of a restart file
 set_namelist namelist nn_stock 60
+
 cd ${SETTE_DIR}
+# . ./prepare_job.sh input_file_config_name NB_PROCS TEST_NAME MPI_FLAG JOB_FILE
+. ./prepare_job.sh input_GYRE.cfg 1 SHORT no $JOB_FILE
 # run job, with 1 processor, test named SHORT (= 60 time steps)
-. ./fcm_job.sh input_GYRE.cfg 1 ${TEST_NAME}
+#. ./fcm_job.sh NB_PROCS JOB_FILE INTERACT_FLAG MPI_FLAG
+    cd ${SETTE_DIR}   
+. ./fcm_job.sh 1 $JOB_FILE no no
+
