Index: branches/2017/dev_merge_2017/NEMOGCM/SETTE/input_AGRIF.cfg
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/SETTE/input_AGRIF.cfg	(revision 9483)
+++ branches/2017/dev_merge_2017/NEMOGCM/SETTE/input_AGRIF.cfg	(revision 9483)
@@ -0,0 +1,2 @@
+ORCA2_LIM_nemo_v3.7.tar ORCA2_LIM_nemo_v3.7
+AGRIF_NORDIC_v4.0.tar AGRIF_NORDIC_v4.0
Index: branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh
===================================================================
--- branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh	(revision 9482)
+++ branches/2017/dev_merge_2017/NEMOGCM/SETTE/sette.sh	(revision 9483)
@@ -1389,3 +1389,223 @@
 fi
 
+### clem: TO BE TESTED !!!!
+# ------------
+# AGRIF NORDIC
+# -----------
+if [ ${config} -eq 11 ] ;  then
+## Restartability tests
+    export TEST_NAME="LONG"
+    cd ${CONFIG_DIR0}
+    . ./makenemo -m ${CMP_NAM} -n AGRIF_ST -r AGRIF_NORDIC -j 8 del_key "key_top"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg nn_stock 10
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 80
+    set_namelist 1_namelist_cfg nn_stock 40
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_LONG\"
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 240
+    set_namelist 2_namelist_cfg nn_stock 120
+#
+    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_AGRIF.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 \"AGRIF_SHORT\"
+    set_namelist namelist_cfg nn_it000 11
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg nn_stock 10
+    set_namelist namelist_cfg ln_rstart .true.
+    set_namelist namelist_cfg nn_rstctl 2
+    set_namelist 1_namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist 1_namelist_cfg nn_it000 41
+    set_namelist 1_namelist_cfg nn_itend 80
+    set_namelist 1_namelist_cfg nn_stock 40
+    set_namelist 1_namelist_cfg ln_rstart .true.
+    set_namelist 1_namelist_cfg nn_rstctl 2
+    set_namelist 2_namelist_cfg cn_exp \"AGRIF_SHORT\"
+    set_namelist 2_namelist_cfg nn_it000 121
+    set_namelist 2_namelist_cfg nn_itend 240
+    set_namelist 2_namelist_cfg nn_stock 120
+    set_namelist 2_namelist_cfg ln_rstart .true.
+    set_namelist 2_namelist_cfg nn_rstctl 2
+    set_namelist namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000010_restart\"
+    set_namelist namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000010_restart_ice\"
+    set_namelist 1_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000040_restart\"
+    set_namelist 1_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000040_restart_ice\"
+    set_namelist 2_namelist_cfg cn_ocerst_in \"AGRIF_LONG_00000120_restart\"
+    set_namelist 2_namelist_ice_cfg cn_icerst_in \"AGRIF_LONG_00000120_restart_ice\"
+
+    for (( i=1; i<=$NPROC; i++)) ; do
+        L_NPROC=$(( $i - 1 ))
+        L_NPROC=`printf "%04d\n" ${L_NPROC}`
+        ln -sf ../LONG/AGRIF_LONG_00000010_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/AGRIF_LONG_00000010_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/1_AGRIF_LONG_00000040_restart_ice_${L_NPROC}.nc .
+        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_${L_NPROC}.nc .
+        ln -sf ../LONG/2_AGRIF_LONG_00000120_restart_ice_${L_NPROC}.nc .
+    done
+    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_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+
+## Reproducibility tests
+    export TEST_NAME="REPRO_4_8"
+    cd ${CONFIG_DIR0}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_48\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg jpni 4
+    set_namelist namelist_cfg jpnj 8
+    set_namelist namelist_cfg jpnij 32
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 80
+    set_namelist 1_namelist_cfg jpni 4
+    set_namelist 1_namelist_cfg jpnj 8
+    set_namelist 1_namelist_cfg jpnij 32
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 240
+    set_namelist 2_namelist_cfg jpni 4
+    set_namelist 2_namelist_cfg jpnj 8
+    set_namelist 2_namelist_cfg jpnij 32
+
+    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_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+    cd ${SETTE_DIR}
+    export TEST_NAME="REPRO_8_4"
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_84\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 20
+    set_namelist namelist_cfg jpni 8
+    set_namelist namelist_cfg jpnj 4
+    set_namelist namelist_cfg jpnij 32
+    set_namelist 1_namelist_cfg nn_it000 1
+    set_namelist 1_namelist_cfg nn_itend 80
+    set_namelist 1_namelist_cfg jpni 8
+    set_namelist 1_namelist_cfg jpnj 4
+    set_namelist 1_namelist_cfg jpnij 32
+    set_namelist 2_namelist_cfg nn_it000 1
+    set_namelist 2_namelist_cfg nn_itend 240
+    set_namelist 2_namelist_cfg jpni 8
+    set_namelist 2_namelist_cfg jpnj 4
+    set_namelist 2_namelist_cfg jpnij 32
+
+    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_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+# test code corruption with AGRIF
+# Compile with AGRIF but run with no zoom
+    export TEST_NAME="AGRIF_NOZOOM"
+    cd ${CONFIG_DIR0}
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_NOZOOM\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 150
+# 
+#   Set the number of fine grids to zero:    
+    sed -i "1s/.*/0/" ${EXE_DIR}/AGRIF_FixedGrids.in
+
+    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_AGRIF.cfg $NPROC ${TEST_NAME} ${MPIRUN_FLAG} ${JOB_FILE} ${NUM_XIOSERVERS}
+    cd ${SETTE_DIR}
+    . ./fcm_job.sh $NPROC ${JOB_FILE} ${INTERACT_FLAG} ${MPIRUN_FLAG}
+
+fi
+
+if [ ${config} -eq 12 ] ;  then
+# Compile with same option as AGRIF_NOZOOM, except no key_agrif to check AGRIF does not hurt...
+    export TEST_NAME="AGRIF_NOAGRIF"
+    cd ${CONFIG_DIR0}
+    . ./makenemo -m ${CMP_NAM} -n AGRIF_NOAGRIF -r AGRIF_NORDIC -j 8 del_key "key_top key_agrif"
+    cd ${SETTE_DIR}
+    . ./param.cfg
+    . ./all_functions.sh
+    . ./prepare_exe_dir.sh
+    JOB_FILE=${EXE_DIR}/run_job.sh
+    NPROC=32
+    if [ -f ${JOB_FILE} ] ; then \rm ${JOB_FILE} ; fi
+    cd ${EXE_DIR}
+    set_namelist namelist_cfg cn_exp \"AGRIF_NOAGRIF\"
+    set_namelist namelist_cfg nn_it000 1
+    set_namelist namelist_cfg nn_itend 150
+#
+    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_AGRIF.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
