Index: /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM3
===================================================================
--- /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM3	(revision 1464)
+++ /trunk/NVTK/INSTALL/CONFIG_FILES/BB_make.ldef_ORCA2_LIM3	(revision 1464)
@@ -0,0 +1,51 @@
+# $Id$
+#----------------------------------------------------------------------
+#- NEMO SYSTEM : Ocean model + Sea Ice Model   (BB_make.ldef in scripts)
+#----------------------------------------------------------------------
+SHELL = /bin/sh
+#-
+#-Q- t3e     #--- Please use gmake instead of make
+#-Q- fjvpp   #--- Please use gmake instead of make
+
+#-
+#- Define the libraries ---
+LIBDIR = ../../../lib
+NEMOLIB := $(shell awk '{ print $$1 }' .config)
+COMP=
+EXPER=
+MODDIR = $(LIBDIR)
+MODEL_LIB = $(LIBDIR)/oce_$(NEMOLIB)/$(COMP)
+IOIPSL_LIB = $(LIBDIR)/libioipsl.a
+#-Q- sxdkrz IOIPSL_LIB = $(LIBDIR)/libsxioipsl.a
+AGRIF_LIB = $(LIBDIR)/libagrif.a
+#-Q- sxdkrz AGRIF_LIB = $(LIBDIR)/libsxagrif.a
+SXMODEL_LIB = $(MODEL_LIB)
+#-Q- sxdkrz SXMODEL_LIB = $(LIBDIR)/oce/libsxopa.a
+OASISMPI2_LIB = 
+LIBMPI  =
+LIBMP   =
+EXEC_BIN = ../../../bin/opa_$(NEMOLIB)_$(COMP)_$(EXPER)
+NBPRC = 6
+USE_IOMPUT = 
+
+#-
+#- Key options for OPA ocean model + LIM sea ice model : ORCA_R2 - FORCED (CLIO)
+#  Keys have to be written on one single line (does NOT accept "\")
+
+P_P = key_trabbl_dif key_vectopt_loop key_vectopt_memory key_orca_r2 key_lim3 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_trabbc key_zdftke key_zdfddm
+
+#-
+#- Prefix for preprocessing ---
+#-Q- sx8mercure prefix = -D
+#-Q- sx8brodie prefix = -D
+#-Q- eshpux prefix = -D
+#-Q- sxdkrz prefix = -D
+#-Q- linux  prefix = -D
+#-Q- lxiv7  prefix = -D
+#-Q- lxiv8  prefix = -D
+#-Q- g95    prefix = -D
+#-Q- gfortran  prefix = -D
+#-Q- aix6    prefix = -WF,-D
+#-Q- babel  prefix = -WF,-D
+#-Q- osxxlf prefix = -WF,-D
+
Index: /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh
===================================================================
--- /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh	(revision 1464)
+++ /trunk/NVTK/INSTALL/JOBS/job_ORCA2_LIM3.ksh	(revision 1464)
@@ -0,0 +1,328 @@
+# $Id$
+set -xv
+
+CONF=ORCA2_LIM3
+# Variables changed by lance_batch.ksh script
+RUN=xxx
+NB_PROCS=xxx
+LAUNCH=xxx
+LEXE=xxx
+CPERF=xxx
+D_INPUT=xxx
+D_GET=xxx
+REF_TAG=xxx
+MYO_EXP=xxx
+TSYMB=xxx
+USE_IOMPUT=xxx
+USE_IOSERVER=xxx
+NB_PROCS_IOSERVER=xxx
+#
+# Variables changed by ins_valid.ksh script
+MAINDIR=/workdir/rech/eee/reee534/AUTRE
+WORK=/workdir/rech/eee/reee534/AUTRE/modipsl/config/
+REF_OD=/u/rech/eee/reee831/NEMO_VALIDATION
+
+# Arguments
+# type = 'long' or '1_short' or '2_short'
+type=$1
+
+case ${type} in
+        'long' ) 
+             DIROUT='LONG'
+             ITERATIONS=300 ;;
+              
+        '1_short' ) 
+             DIROUT='1_SHORT'
+             ITERATIONS=150 ;;
+              
+        '2_short' ) 
+             DIROUT='2_SHORT'
+             ITERATIONS=150 ;;
+
+        'gtime' ) 
+             DIROUT='GTIME'
+             ITERATIONS=5475 ;;
+esac
+
+# Working directory
+cd ${TMPDIR}
+#-T- osxxlf mkdir -p ${WORK}/NEMO_VALID/W${CONF}/${RUN}/${DIROUT}/${MYO_EXP}/RUN
+#-T- osxxlf cd ${WORK}/NEMO_VALID/W${CONF}/${RUN}/${DIROUT}/${MYO_EXP}/RUN
+#-T- osxxlf zback=$?
+#-T- osxxlf if [ ${zback} = 0 ] ; then rm -rf namelist* *.nc memory* solver.stat ocean.output* mpp.output* mono.output* ; fi
+
+##############################################################
+##############################################################
+##############################################################
+###             Input files
+##############################################################
+##############################################################
+##############################################################
+# Local function to copy namelists files
+get_namelist () {
+    if [ -a $1/$2_$3 ] ; then
+        cp $1/$2_$3 $4
+    else
+        echo '                ###############################################################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ###############################################################'
+        echo "              $2_$3 file doesn't exist, we use the standard $2"
+        echo '                ###############################################################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ######################## W A R N I N G ########################'
+        echo '                ###############################################################'
+        cp $1/$2 $4
+    fi
+}
+
+# Local function to find namelists parameters
+supergrep () {
+    grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+}
+
+# Ocean namelist
+LOC_NAM=${MAINDIR}/modipsl/config/${CONF}/EXP00
+get_namelist ${LOC_NAM} namelist ${MYO_EXP} namelist
+
+# Sea-Ice namelist
+get_namelist ${LOC_NAM} namelist_ice_lim3 ${MYO_EXP} namelist_ice
+
+# iom_put xml file
+if [ "${USE_IOMPUT}" = "true" ]
+then
+    get_namelist ${LOC_NAM} xmlio_server.def ${MYO_EXP} xmlio_server.def
+    get_namelist ${LOC_NAM} iodef.xml ${MYO_EXP} iodef.xml
+    sed -e "s/^ *using_server *=.*$/  using_server = .${USE_IOSERVER}./" xmlio_server.def > tmp$$
+    mv tmp$$ xmlio_server.def
+fi
+
+# Local function to find namelists parameters
+supergrep () {
+    grep "^ *$1 *=" $2 | sed -e "s% *\!.*%%"
+}
+
+# namelist modifications
+PAT_NIT000=$( supergrep nit000             namelist )
+PAT_NITEND=$( supergrep nitend             namelist )
+PAT_NSTOCK=$( supergrep nstock             namelist )
+PAT_NWRITE=$( supergrep nwrite             namelist )
+PAT_NRSTDT=$( supergrep nrstdt             namelist )
+PAT_NBITCM=$( supergrep nbit_cmp           namelist )
+PAT_TRACEN=$( supergrep ln_traadv_cen2     namelist )
+PAT_TRATVD=$( supergrep ln_traadv_tvd      namelist )
+PAT_N_CLAA=$( supergrep n_cla              namelist )
+PAT_NSOLVV=$( supergrep nsolv              namelist )
+PAT_RESTAR=$( supergrep ln_rstart          namelist )
+PAT_RESMLD=$( supergrep ln_trdmld_restart  namelist )
+
+sed -e "s%$PAT_RESTAR%   ln_rstart   =  .false.%"          \
+    -e "s%$PAT_NIT000%   nit000     =     1   %"           \
+    -e "s%$PAT_NITEND%   nitend     =     ${ITERATIONS} %" \
+    -e "s%$PAT_NSTOCK%   nstock     =     ${ITERATIONS} %" \
+    -e "s%$PAT_NWRITE%   nwrite     =     75  %"           \
+    -e "s%$PAT_NRSTDT%   nrstdt     =     0   %"           \
+    -e "s%$PAT_NBITCM%   nbit_cmp   =     1%"              \
+    -e "s%$PAT_TRACEN%   ln_traadv_cen2   =  .false.%"     \
+    -e "s%$PAT_TRATVD%   ln_traadv_tvd    =  .true.%"      \
+    -e "s%$PAT_N_CLAA%   n_cla   = 0%"                     \
+    -e "s%$PAT_NSOLVV%   nsolv     =      2%"              \
+    -e "s%$PAT_RESMLD%   ln_trdmld_restart =  .false.%" namelist > nam.tmp
+
+mv nam.tmp namelist
+
+# Get forcing files
+${D_GET} ${D_INPUT}/ORCA2_LIM_nemo_v3.1.tar ORCA2_LIM_nemo_v3.1.tar
+tar xvf ORCA2_LIM_nemo_v3.1.tar
+rm -rf ORCA2_LIM_nemo_v3.1.tar
+
+# Get restarts files if needed
+if [ $type = '2_short' ]
+then
+    if [ ${RUN} = 'mon' -o ${RUN} = 'omp' ] ; then 
+        cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*_restart.nc restart.nc
+        cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*restart_ice.nc restart_ice_in.nc
+        cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*_restart_mld.nc restart_mld.nc
+    fi
+
+    if [ ${RUN} = 'mpi' ] ; then
+        typeset -Z4 i=0
+        while [ $i -lt $NB_PROCS ]
+        do
+           cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*_restart_${i}.nc restart_${i}.nc
+           cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*restart_ice_${i}.nc restart_ice_in_${i}.nc
+           cp ${WORK}/NEMO_VALID/W${CONF}/${RUN}/1_SHORT/${MYO_EXP}/*_restart_mld_${i}.nc restart_mld_${i}.nc
+           let i=$i+1
+        done
+    fi
+
+    # Ocean namelist modifications
+    PAT_NIT000=$( supergrep nit000             namelist )
+    PAT_NITEND=$( supergrep nitend             namelist )
+    PAT_NRSTDT=$( supergrep nrstdt             namelist )
+    PAT_RESTAR=$( supergrep ln_rstart          namelist )
+    PAT_RESMLD=$( supergrep ln_trdmld_restart  namelist )
+    ORCA_NIT000=$(( $ITERATIONS + 1 ))
+    ORCA_NITEND=$(( $ITERATIONS*2 ))
+    
+    sed  -e "s%$PAT_RESTAR%   ln_rstart   =  .true.%"          \
+         -e "s%$PAT_NIT000%   nit000     =     $ORCA_NIT000 %" \
+         -e "s%$PAT_NITEND%   nitend     =     $ORCA_NITEND %" \
+         -e "s%$PAT_NRSTDT%   nrstdt     =     2%"             \
+         -e "s%$PAT_RESMLD%   ln_trdmld_restart =  .true.%" namelist > nam.tmp
+    
+    mv nam.tmp namelist
+
+fi
+
+##############################################################
+##############################################################
+##############################################################
+###             Launch run
+##############################################################
+##############################################################
+##############################################################
+
+cp ${WORK}/NEMO_VALID/W${CONF}/opa_${CONF}_${RUN}_${MYO_EXP} opa_${CONF}_${RUN}_${MYO_EXP}
+cp ${WORK}/NEMO_VALID/W${CONF}/opa_${CONF}_memo_${MYO_EXP} opa_${CONF}_memo_${MYO_EXP}
+chmod 777 opa_${CONF}_${RUN}_${MYO_EXP}
+chmod 777 opa_${CONF}_memo_${MYO_EXP}
+if [ "${USE_IOSERVER}" = "true" ]
+then
+    cp ${WORK}/../bin/ioserver ioserver
+    chmod 777 ioserver
+fi
+#
+# Profiling & Executable memory size
+####################################
+touch memory_size.txt
+
+case ${RUN} in
+        'mon' ) 
+#-T- sx8brodie export F_PROGINF=detail
+#-T- sx8brodie echo "Stack memory: $( (size opa_${CONF}_${RUN}_${MYO_EXP}) )"    >> memory_size.txt 
+#-T- sx8brodie echo "Static memory: $( (size opa_${CONF}_memo_${MYO_EXP}) )"   >> memory_size.txt  ;;
+#-T- sx8mercure  export F_PROGINF=detail
+#-T- sx8mercure echo "Stack memory: $( (size opa_${CONF}_${RUN}_${MYO_EXP}) )"    >> memory_size.txt 
+#-T- sx8mercure echo "Static memory: $( (size opa_${CONF}_memo_${MYO_EXP}) )"   >> memory_size.txt  ;;
+#-T- aix6 echo "Stack memory: $( (size opa_${CONF}_memo_${MYO_EXP}) )"    >> memory_size.txt 
+#-T- aix6 echo "Static memory: $( (size opa_${CONF}_${RUN}_${MYO_EXP}) )"   >> memory_size.txt ;;
+#-T- osxxlf echo "Stack memory: $( (size opa_${CONF}_memo_${MYO_EXP}) )"    >> memory_size.txt 
+#-T- osxxlf echo "Static memory: $( (size opa_${CONF}_${RUN}_${MYO_EXP}) )"   >> memory_size.txt ;; 
+        'mpi' ) 
+#-T- sx8brodie export MPIPROGINF=detail ;;
+#-T- sx8mercure export MPIPROGINF=detail ;;
+#-T- aix6     ;;
+#-T- osxxlf   ;;
+        'omp' ) 
+#-T- sx8brodie export F_PROGINF=detail
+#-T- sx8brodie export OMP_NUM_THREADS=${NB_PROCS} ;;
+#-T- sx8mercure export F_PROGINF=detail
+#-T- sx8mercure export OMP_NUM_THREADS=${NB_PROCS} ;;
+#-T- aix6     ;;
+#-T- osxxlf   ;;
+esac
+#
+# >>>>>> EXECUTION < < < <
+##########################
+
+
+if [ "${USE_IOSERVER}" = "true" ]
+then
+#-T- aix6        rm -f cmdfile
+#-T- aix6        cnt=1
+#-T- aix6        while [ $cnt -le ${NB_PROCS_IOSERVER} ]
+#-T- aix6        do
+#-T- aix6          echo "${CPERF#poe} ./ioserver" >> cmdfile
+#-T- aix6          cnt=$(( $cnt + 1 ))
+#-T- aix6        done
+#-T- aix6        cnt=1
+#-T- aix6        while [ $cnt -le ${NB_PROCS} ]
+#-T- aix6        do
+#-T- aix6          echo "${CPERF#poe} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- aix6          cnt=$(( $cnt + 1 ))
+#-T- aix6        done
+#-T- aix6        poe -pgmmodel MPMD -cmdfile ./cmdfile
+#-T- sx8brodie   echo "-h 0 -p ${NB_PROCS_IOSERVER} ./ioserver" > cmdfile
+#-T- sx8brodie   echo "-h 0 -p ${NB_PROCS} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- sx8brodie   ${CPERF} ${LEXE} -f cmdfile 
+#-T- sx8mercure  echo "-h 0 -p ${NB_PROCS_IOSERVER} ./ioserver" > cmdfile
+#-T- sx8mercure  echo "-h 0 -p ${NB_PROCS} ./opa_${CONF}_${RUN}_${MYO_EXP}" >> cmdfile
+#-T- sx8mercure  ${CPERF} ${LEXE} -f cmdfile 
+else
+    case ${RUN} in
+        'mon' | 'omp' ) 
+              ${CPERF} ./opa_${CONF}_${RUN}_${MYO_EXP} ;;
+        'mpi' ) 
+#-T- sx8brodie         ${CPERF} ${LEXE} ./opa_${CONF}_${RUN}_${MYO_EXP} ;;
+#-T- sx8mercure        ${CPERF} ${LEXE} ./opa_${CONF}_${RUN}_${MYO_EXP} ;;
+#-T- aix6              ${CPERF} ${LEXE} ./opa_${CONF}_${RUN}_${MYO_EXP} ;;
+#-T- osxxlf   mpd&
+#-T- osxxlf   sleep 5
+#-T- osxxlf   ${CPERF} ${LEXE} ./opa_${CONF}_${RUN}_${MYO_EXP}
+#-T- osxxlf   mpdallexit ;;
+    esac
+    
+fi
+
+ls -l
+#
+
+##############################################################
+##############################################################
+##############################################################
+###             Save output files
+##############################################################
+##############################################################
+##############################################################
+case ${RUN} in
+	'mon' | 'omp' )
+               liste_files='*abort* memory* namelist* *xml* perfs* cmdfile solver.stat ocean.output layout* ORCA2* restart* mono*' ;;
+	'mpi' )
+               liste_files='*abort* namelist* *xml* solver.stat perfs* cmdfile ocean.output* layout* ORCA2* restart* mpp*' ;;
+esac
+
+# Ensure that all files saved are coming from the current run
+ind=1
+for k in $liste_files
+do
+   echo $k > temp
+   var=$( ( awk '{printf("%-.4s", varin ) } ' varin=$k temp ) )
+   if [ ${ind} = 1 -a ${var} = 'perf' ] ; then
+       kc='perf*'
+       rm -f ${WORK}/NEMO_VALID/W${CONF}/${RUN}/${DIROUT}/${MYO_EXP}/${kc}
+       ind=0
+   fi
+   cp $k ${WORK}/NEMO_VALID/W${CONF}/${RUN}/${DIROUT}/${MYO_EXP}/$k
+done
+
+##############################################################
+##############################################################
+##############################################################
+###             Retrieve some reference run files
+##############################################################
+##############################################################
+##############################################################
+if [ ${REF_TAG} ]
+then
+   STORE_DATA=${REF_OD}/${CONF}/${REF_TAG}/${RUN}/${DIROUT}
+   LFILES="solver.stat memory_size.txt ocean.output ${RUN}${CONF}_err"
+   for ref_file in ${LFILES}
+   do
+       ${D_GET} ${STORE_DATA}/${TSYMB}${ref_file} ${WORK}/NEMO_VALID/W${CONF}/${RUN}/${DIROUT}/REF/${ref_file}
+   done
+fi
+
+##############################################################
+##############################################################
+##############################################################
+###             Launch restart job
+##############################################################
+##############################################################
+##############################################################
+if [ $type = '1_short' ] ; then
+    cd ${WORK}/NEMO_VALID/W${CONF}/${RUN}/2_SHORT/${MYO_EXP}
+    ${LAUNCH}job_${RUN}_2_short_${MYO_EXP}.ksh
+fi
Index: /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh
===================================================================
--- /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh	(revision 1463)
+++ /trunk/NVTK/INSTALL/JOBS/lance_batch.ksh	(revision 1464)
@@ -150,4 +150,6 @@
 if [ ${CONF} == 'ORCA2_LIM' ] ; then
     CONFS=ORCA2
+elif [ ${CONF} == 'ORCA2_LIM3' ] ; then
+    CONFS=OR2L3
 elif [ ${CONF} == 'GYRE' ] ; then
     CONFS=GYREO
Index: /trunk/NVTK/INSTALL/ins_nvtk.ksh
===================================================================
--- /trunk/NVTK/INSTALL/ins_nvtk.ksh	(revision 1463)
+++ /trunk/NVTK/INSTALL/ins_nvtk.ksh	(revision 1464)
@@ -62,11 +62,12 @@
 
 # Standard configurations
-NBCFG=6
+NBCFG=7
 CONF[0]=ORCA2_LIM
-CONF[1]=GYRE
-CONF[2]=GYRE_LOBSTER
-CONF[3]=ORCA2_LIM_PISCES
-CONF[4]=ORCA2_OFF_PISCES
-CONF[5]=ZAGRIF
+CONF[1]=ORCA2_LIM3
+CONF[2]=GYRE
+CONF[3]=GYRE_LOBSTER
+CONF[4]=ORCA2_LIM_PISCES
+CONF[5]=ORCA2_OFF_PISCES
+CONF[6]=ZAGRIF
 LCLDIR=`pwd`
 
Index: /trunk/NVTK/Makefile
===================================================================
--- /trunk/NVTK/Makefile	(revision 1463)
+++ /trunk/NVTK/Makefile	(revision 1464)
@@ -31,5 +31,5 @@
 #-
 #- Configurations list which must be tested
-LISTE_CONF = GYRE GYRE_LOBSTER ORCA2_LIM ORCA2_LIM_PISCES ORCA2_OFF_PISCES
+LISTE_CONF = GYRE GYRE_LOBSTER ORCA2_LIM ORCA2_LIM3 ORCA2_LIM_PISCES ORCA2_OFF_PISCES
 #-
 #- Jobs to launch use keyword: nojob, all, long, short or gtime
Index: /trunk/NVTK/cfg.txt
===================================================================
--- /trunk/NVTK/cfg.txt	(revision 1463)
+++ /trunk/NVTK/cfg.txt	(revision 1464)
@@ -1,3 +1,4 @@
 ORCA2_LIM OPA_SRC LIM_SRC_2 C1D_SRC NST_SRC
+ORCA2_LIM3 OPA_SRC LIM_SRC_3 C1D_SRC NST_SRC
 GYRE OPA_SRC LIM_SRC_2 C1D_SRC
 ZAGRIF OPA_SRC LIM_SRC_2 C1D_SRC NST_SRC
