Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_cfg
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_cfg	(revision 9457)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/EXP00/namelist_cfg	(revision 9458)
@@ -128,5 +128,4 @@
 &namagrif      !  AGRIF zoom                                            ("key_agrif")
 !-----------------------------------------------------------------------
-   nn_cln_update =    1    !  baroclinic update frequency
 /
 !-----------------------------------------------------------------------
Index: /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/MY_SRC/usrdef_nam.F90
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/MY_SRC/usrdef_nam.F90	(revision 9457)
+++ /branches/2017/dev_merge_2017/NEMOGCM/CONFIG/TEST_CASES/SAS_BIPER/MY_SRC/usrdef_nam.F90	(revision 9458)
@@ -73,7 +73,13 @@
       kk_cfg = INT( rn_dx )
       !
-      ! Global Domain size:  SAS_BIPER domain is  300 km x 300 Km x 2000 m
+      ! Global Domain size:  SAS_BIPER domain is  300 km x 300 Km x 10 m
       kpi = INT( 300.e3 / rn_dx ) -1
       kpj = INT( 300.e3 / rn_dy ) -1
+#if defined key_agrif
+      IF( .NOT. Agrif_Root() ) THEN
+         kpi = nbcellsx + 2 + 2*nbghostcells
+         kpj = nbcellsy + 2 + 2*nbghostcells
+      ENDIF
+#endif
       kpk = 1
       !
Index: /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_test-cases.sh
===================================================================
--- /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_test-cases.sh	(revision 9457)
+++ /branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette_test-cases.sh	(revision 9458)
@@ -146,5 +146,5 @@
 
 
-for config in 1 2 3 
+for config in 5 
 do
 
@@ -421,166 +421,165 @@
 fi
 
+
+#--clem:
+# TESTS FOR SAS_BIPER CONFIGURATION
+if [ ${config} -eq 5 ] ;  then 
+    ## Restartability tests for SAS_BIPER
+    export TEST_NAME="LONG"
+    cd ${CONFIG_DIR0}
+    . ./makenemo -m ${CMP_NAM} -n SAS_BIPER_ST -r SAS_BIPER -a TEST_CASES -j 8  del_key ${DEL_KEYS}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=1
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS_BIPER_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg nn_stock 100
+    set_namelist namelist_cfg ln_clobber .true.
+#    set_namelist namelist_cfg nn_fsbc 1       
+    set_namelist namelist_cfg jpni 1
+    set_namelist namelist_cfg jpnj 1
+    set_namelist namelist_cfg jpnij 1
+    
+    set_namelist namelist_ice_cfg ln_icethd .true.
+    set_namelist namelist_ice_cfg ln_icedyn .true.
+    set_namelist namelist_ice_cfg ln_dynFULL .true.
+    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
+    set_namelist namelist_ice_cfg ln_dynADV .false.
+    set_namelist namelist_ice_cfg ln_adv_Pra .false.
+    set_namelist namelist_ice_cfg ln_adv_UMx .true.
+    set_namelist namelist_ice_cfg ln_icediachk .true.
+    
+    set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_LONG\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg nn_stock 300
+    set_namelist 1_namelist_cfg ln_clobber .true.
+    set_namelist 1_namelist_cfg jpni 1
+    set_namelist 1_namelist_cfg jpnj 1
+    set_namelist 1_namelist_cfg jpnij 1
+    
+    set_namelist 1_namelist_ice_cfg ln_icethd .true.
+    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
+    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
+    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
+    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
+    set_namelist 1_namelist_ice_cfg ln_adv_Pra .false.
+    set_namelist 1_namelist_ice_cfg ln_adv_UMx .true.
+#    set_namelist 1_namelist_ice_cfg ln_icediachk .true.
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    
+    cd ${SETTE_DIR}
+    export TEST_NAME="SHORT"
+    . ./prepare_exe_dir.sh
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"SAS_BIPER_SHORT\"
+    set_namelist namelist_cfg nn_it000 101
+    set_namelist namelist_cfg nn_itend 200
+    set_namelist namelist_cfg nn_stock 100
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg ln_clobber .true.
+    set_namelist namelist_cfg jpni 1
+    set_namelist namelist_cfg jpnj 1
+    set_namelist namelist_cfg jpnij 1
+    
+    set_namelist namelist_ice_cfg ln_icethd .true.
+    set_namelist namelist_ice_cfg ln_icedyn .true.
+    set_namelist namelist_ice_cfg ln_dynFULL .true.
+    set_namelist namelist_ice_cfg ln_dynRHGADV .false.
+    set_namelist namelist_ice_cfg ln_dynADV .false.
+    set_namelist namelist_ice_cfg ln_adv_Pra .false.
+    set_namelist namelist_ice_cfg ln_adv_UMx .true.
+    set_namelist namelist_ice_cfg ln_icediachk .true.
+    set_namelist namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000100_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000100_restart_ice\"
+    
+    set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_SHORT\"
+    set_namelist 1_namelist_cfg nn_it000 301
+    set_namelist 1_namelist_cfg nn_itend 600
+    set_namelist 1_namelist_cfg nn_stock 300
+    set_namelist 1_namelist_cfg ln_rstart .true.
+    set_namelist 1_namelist_cfg nn_rstctl 2
+    set_namelist 1_namelist_cfg ln_clobber .true.
+    set_namelist 1_namelist_cfg jpni 1
+    set_namelist 1_namelist_cfg jpnj 1
+    set_namelist 1_namelist_cfg jpnij 1
+    
+    set_namelist 1_namelist_ice_cfg ln_icethd .true.
+    set_namelist 1_namelist_ice_cfg ln_icedyn .true.
+    set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
+    set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
+    set_namelist 1_namelist_ice_cfg ln_dynADV .false.
+    set_namelist 1_namelist_ice_cfg ln_adv_Pra .false.
+    set_namelist 1_namelist_ice_cfg ln_adv_UMx .true.
+#    set_namelist 1_namelist_ice_cfg ln_icediachk .true.
+    set_namelist 1_namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000300_restart\"
+    set_namelist 1_namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000300_restart_ice\"
+    
+    
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    if [ $NPROC -eq 1 ] ;  then
+        ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc .
+        ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc .
+        ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc .
+        ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc .
+    else
+        for (( i=1; i<=$NPROC; i++)) ; do
+            L_NPROC=$(( $i - 1 ))
+            L_NPROC=`printf "%04d\n" ${L_NPROC}`
+            ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc .
+            ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc .
+        done
+    fi
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    if [ $NPROC -eq 1 ] ;  then
+        ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart.nc .
+        ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice.nc .
+	ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart.nc .
+        ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice.nc .
+    else
+        for (( i=1; i<=$NPROC; i++)) ; do
+            L_NPROC=$(( $i - 1 ))
+            L_NPROC=`printf "%04d\n" ${L_NPROC}`
+            ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/SAS_BIPER_LONG_00000100_restart_ice_${L_NPROC}.nc .
+            ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_${L_NPROC}.nc .
+            ln -sf ../LONG/1_SAS_BIPER_LONG_00000300_restart_ice_${L_NPROC}.nc .
+        done
+    fi
+    if [ ${USING_MPMD} == "yes" ] ; then
+        set_xio_using_server iodef.xml true
+    else
+        set_xio_using_server iodef.xml false
+    fi
+    cd ${SETTE_DIR}
+    . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+    
+fi
+
+#----
 done
-
-###### #--clem:
-###### # TESTS FOR SAS_BIPER CONFIGURATION
-###### if [ ${config} -eq 11 ] ;  then 
-######     ## Restartability tests for SAS_BIPER
-######     export TEST_NAME="LONG"
-######     cd ${CONFIG_DIR0}
-######     . ./makenemo -m ${CMP_NAM} -n SAS_BIPER_ST -r SAS_BIPER -a TEST_CASES -j 8  del_key ${DEL_KEYS}
-######     cd ${SETTE_DIR}
-######     . ./param.cfg
-######     . ./all_functions.sh
-######     . ./prepare_exe_dir.sh
-######     JOB_FILE=${EXE_DIR}/run_job.sh
-######     NPROC=1
-######     if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi 
-######     cd ${EXE_DIR}
-######     set_namelist namelist_cfg cn_exp \"SAS_BIPER_LONG\"
-######     set_namelist namelist_cfg nn_it000 1
-######     set_namelist namelist_cfg nn_itend 100
-######     set_namelist namelist_cfg nn_stock 50
-######     set_namelist namelist_cfg ln_clobber .true.
-###### #    set_namelist namelist_cfg ln_read_cfg .false.
-###### #    set_namelist namelist_cfg ln_linssh .true.
-###### #    set_namelist namelist_cfg ln_usr .true.
-###### #    set_namelist namelist_cfg ln_blk .false.
-###### #    set_namelist namelist_cfg nn_fsbc 1
-###### #    set_namelist namelist_cfg nn_ice 2
-###### #    set_namelist namelist_cfg l_sasread .false.
-###### #    set_namelist namelist_cfg rn_shlat 0.
-###### #    set_namelist namelist_cfg ln_NONE .true.
-###### #    set_namelist namelist_cfg ln_traadv_NONE .true.
-###### 
-######     set_namelist namelist_cfg jpni 1
-######     set_namelist namelist_cfg jpnj 1
-######     set_namelist namelist_cfg jpnij 1
-######     set_namelist namelist_ice_cfg ln_icethd .true.
-######     set_namelist namelist_ice_cfg ln_icedyn .true.
-######     set_namelist namelist_ice_cfg ln_dynFULL .true.
-######     set_namelist namelist_ice_cfg ln_dynRHGADV .false.
-######     set_namelist namelist_ice_cfg ln_dynADV .false.
-######     set_namelist namelist_ice_cfg ln_adv_Pra .false.
-######     set_namelist namelist_ice_cfg ln_adv_UMx .true.
-###### 
-######     set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_LONG\"
-######     set_namelist 1_namelist_cfg nn_it000 1
-######     set_namelist 1_namelist_cfg nn_itend 300
-######     set_namelist 1_namelist_cfg nn_stock 150
-######     set_namelist 1_namelist_cfg ln_clobber .true.
-######     set_namelist 1_namelist_cfg jpni 1
-######     set_namelist 1_namelist_cfg jpnj 1
-######     set_namelist 1_namelist_cfg jpnij 1
-######     set_namelist 1_namelist_ice_cfg ln_icethd .true.
-######     set_namelist 1_namelist_ice_cfg ln_icedyn .true.
-######     set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
-######     set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
-######     set_namelist 1_namelist_ice_cfg ln_dynADV .false.
-######     set_namelist 1_namelist_ice_cfg ln_adv_Pra .false.
-######     set_namelist 1_namelist_ice_cfg ln_adv_UMx .true.
-######     if [ ${USING_MPMD} == "yes" ] ; then
-######        set_xio_using_server iodef.xml true
-######     else
-######        set_xio_using_server iodef.xml false
-######     fi
-######     cd ${SETTE_DIR}
-######     . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-###### 
-######     cd ${SETTE_DIR}
-######     export TEST_NAME="SHORT"
-######     . ./prepare_exe_dir.sh
-######     cd ${EXE_DIR}
-######     set_namelist namelist_cfg cn_exp \"SAS_BIPER_SHORT\"
-######     set_namelist namelist_cfg nn_it000 51
-######     set_namelist namelist_cfg nn_itend 100
-######     set_namelist namelist_cfg nn_stock 50
-######     set_namelist namelist_cfg ln_rstart .true.
-######     set_namelist namelist_cfg nn_rstctl 2
-######     set_namelist namelist_cfg ln_clobber .true.
-######     set_namelist namelist_cfg jpni 1
-######     set_namelist namelist_cfg jpnj 1
-######     set_namelist namelist_cfg jpnij 1
-######     set_namelist namelist_ice_cfg ln_icethd .true.
-######     set_namelist namelist_ice_cfg ln_icedyn .true.
-######     set_namelist namelist_ice_cfg ln_dynFULL .true.
-######     set_namelist namelist_ice_cfg ln_dynRHGADV .false.
-######     set_namelist namelist_ice_cfg ln_dynADV .false.
-######     set_namelist namelist_ice_cfg ln_adv_Pra .false.
-######     set_namelist namelist_ice_cfg ln_adv_UMx .true.
-######     set_namelist namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000050_restart\"
-######     set_namelist namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000050_restart_ice\"
-###### 
-######     set_namelist 1_namelist_cfg cn_exp \"SAS_BIPER_SHORT\"
-######     set_namelist 1_namelist_cfg nn_it000 151
-######     set_namelist 1_namelist_cfg nn_itend 300
-######     set_namelist 1_namelist_cfg nn_stock 150
-######     set_namelist 1_namelist_cfg ln_rstart .true.
-######     set_namelist 1_namelist_cfg nn_rstctl 2
-######     set_namelist 1_namelist_cfg ln_clobber .true.
-######     set_namelist 1_namelist_cfg jpni 1
-######     set_namelist 1_namelist_cfg jpnj 1
-######     set_namelist 1_namelist_cfg jpnij 1
-######     set_namelist 1_namelist_ice_cfg ln_icethd .true.
-######     set_namelist 1_namelist_ice_cfg ln_icedyn .true.
-######     set_namelist 1_namelist_ice_cfg ln_dynFULL .true.
-######     set_namelist 1_namelist_ice_cfg ln_dynRHGADV .false.
-######     set_namelist 1_namelist_ice_cfg ln_dynADV .false.
-######     set_namelist 1_namelist_ice_cfg ln_adv_Pra .false.
-######     set_namelist 1_namelist_ice_cfg ln_adv_UMx .true.
-######     set_namelist 1_namelist_cfg cn_ocerst_in \"SAS_BIPER_LONG_00000150_restart\"
-######     set_namelist 1_namelist_ice_cfg cn_icerst_in \"SAS_BIPER_LONG_00000150_restart_ice\"
-###### 
-###### 
-######     if [ ${USING_MPMD} == "yes" ] ; then
-######        set_xio_using_server iodef.xml true
-######     else
-######        set_xio_using_server iodef.xml false
-######     fi
-######     if [ $NPROC -eq 1 ] ;  then
-######        ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart.nc .
-######        ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_ice.nc .
-######        ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart.nc .
-######        ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_ice.nc .
-######     else
-######        for (( i=1; i<=$NPROC; i++)) ; do
-######           L_NPROC=$(( $i - 1 ))
-######           L_NPROC=`printf "%04d\n" ${L_NPROC}`
-######           ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_${L_NPROC}.nc .
-######           ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_ice_${L_NPROC}.nc .
-######           ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_${L_NPROC}.nc .
-######           ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_ice_${L_NPROC}.nc .
-######        done
-######     fi
-######     if [ ${USING_MPMD} == "yes" ] ; then
-######        set_xio_using_server iodef.xml true
-######     else
-######        set_xio_using_server iodef.xml false
-######     fi
-######     if [ $NPROC -eq 1 ] ;  then
-######        ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart.nc .
-######        ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_ice.nc .######        ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart.nc .
-######        ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_ice.nc .
-######     else
-######        for (( i=1; i<=$NPROC; i++)) ; do
-######           L_NPROC=$(( $i - 1 ))
-######           L_NPROC=`printf "%04d\n" ${L_NPROC}`
-######           ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_${L_NPROC}.nc .
-######           ln -sf ../LONG/SAS_BIPER_LONG_00000050_restart_ice_${L_NPROC}.nc .
-######           ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_${L_NPROC}.nc .
-######           ln -sf ../LONG/1_SAS_BIPER_LONG_00000150_restart_ice_${L_NPROC}.nc .
-######        done
-######     fi
-######     if [ ${USING_MPMD} == "yes" ] ; then
-######        set_xio_using_server iodef.xml true
-######     else
-######        set_xio_using_server iodef.xml false
-######     fi
-######     cd ${SETTE_DIR}
-######     . ./prepare_job.sh input_SASBIPER.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
-######     cd ${SETTE_DIR}
-######     . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
-###### 
-###### fi
-###### 
-###### #----
