Index: /utils/CI/sette_ticket2304/all_functions.sh
===================================================================
--- /utils/CI/sette_ticket2304/all_functions.sh	(revision 12288)
+++ /utils/CI/sette_ticket2304/all_functions.sh	(revision 12289)
@@ -90,4 +90,36 @@
 usage=" Usage : set_namelist input_namelist variable_name value"
 usage=" if value is a string ths is neede syntax : ./set_namelist namelist_name var_name \"new_value\" "
+
+# sync MYSRC files
+sync_mysrc() {
+lREF=cfgs/$1    # reference 
+lCFG=cfgs/$2    # target
+if [ -d $lREF/MY_SRC ] ; then
+   cp $lREF/MY_SRC/* $lCFG/MY_SRC/*
+fi
+}
+
+# sync namelist files and xios related files
+sync_expcfg() {
+set -x
+lREF=cfgs/$1
+lCFG=cfgs/$2
+if [ -d $lREF/EXPREF ] ; then
+   cp $lREF/EXPREF/*namelist*_cfg  $lCFG/EXP00/.
+   cp $lREF/EXPREF/iodef.xml       $lCFG/EXP00/.
+   cp $lREF/EXPREF/context_*.xml   $lCFG/EXP00/.
+   cp $lREF/EXPREF/file_def_*.xml  $lCFG/EXP00/.
+fi
+set +x
+}
+
+# sync cppkey file
+sync_cppcfg() {
+lREF=cfgs/$1
+lCFG=cfgs/$2
+if [ -f $lREF/cpp_$1.fcm ] ; then
+   cp $lREF/cpp_$1.fcm $lCFG/cpp_$2.fcm
+fi
+}
 
 # define validation dir
@@ -156,20 +188,27 @@
                 LINEVAR=$( grep -s -n "$VAR_NAME" ${EXE_DIR}/$NAMREF | awk -F: '{ { print $1} }' )
                 echo " $VAR_NAME found in ${EXE_DIR}/$NAMREF at line $LINEVAR " >> ${SETTE_DIR}/output.sette
+
 #   search for namelist group name
                 NAMGRP=$( head -n$LINEVAR ${EXE_DIR}/$NAMREF | grep --line-buffered "^&nam" | tail -1 | awk -F" " '{ { print $1} }' ) 
                 echo " variable $VAR_NAME will be added in $NAMGRP namelist-group of namelist file ${EXE_DIR}/$1 " >> ${SETTE_DIR}/output.sette
+
+# check if namelist group present in namelist_cfg
+# if missing group is added at the end of namelist_cfg
+                NGRP=$(grep ${NAMGRP} ${EXE_DIR}/$1 | wc -l )
+                if [ ${NGRP} -eq 0 ]; then
+                   echo ''
+                   echo "+++++ Group ${NAMGRP} containing ${2} is missing in ${EXE_DIR}/$1 +++++ "      
+                   echo "+++++ Group ${NAMGRP}                 is added   in ${EXE_DIR}/$1 +++++ "      
+                   echo ''
+                   echo "&${NAMGRP}" >> ${EXE_DIR}/$1
+                   echo "/"          >> ${EXE_DIR}/$1
+                fi
+
 # Add $VARNAME in namelist file ${EXE_DIR}/$1 in namelist group $NAMGRP
 # on mac osx, replace sed --posix by gsed (available with mac port)
                 sed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp || gsed --posix "/${NAMGRP} /a\ ${VAR_NAME} " ${EXE_DIR}/$1 > ${EXE_DIR}/$1.tmp
+
 # if file not empty replace ${EXE_DIR}/$1
-                # check if namelist group present in namelist_cfg
-                NGRP=$(grep ${NAMGRP} ${EXE_DIR}/$1 | wc -l )
-                if [ ${NGRP} -eq 0 ]; then
-                   echo ''
-                   echo "+++++ Cannot update ${2} because group ${NAMGRP} is missing in ${EXE_DIR}/$1  +++++ "      
-                   echo ''
-                   exit 42
-                fi
-                if [ -s ${EXE_DIR}/$1.tmp ] ; then
+               if [ -s ${EXE_DIR}/$1.tmp ] ; then
                    mv ${EXE_DIR}/$1.tmp ${EXE_DIR}/$1 
                 else
Index: /utils/CI/sette_ticket2304/sette_list_avail_rev.sh
===================================================================
--- /utils/CI/sette_ticket2304/sette_list_avail_rev.sh	(revision 12288)
+++ /utils/CI/sette_ticket2304/sette_list_avail_rev.sh	(revision 12289)
@@ -39,5 +39,4 @@
   . ./param.cfg
 
-  mach=${COMPILER}
   NEMO_VALID=${NEMO_VALIDATION_DIR}/
  
Index: /utils/CI/sette_ticket2304/sette_reference-configurations.sh
===================================================================
--- /utils/CI/sette_ticket2304/sette_reference-configurations.sh	(revision 12288)
+++ /utils/CI/sette_ticket2304/sette_reference-configurations.sh	(revision 12289)
@@ -162,4 +162,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  GYRE_PISCES GYRE_PISCES_ST
+    sync_expcfg GYRE_PISCES GYRE_PISCES_ST
+    sync_cppcfg GYRE_PISCES GYRE_PISCES_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n GYRE_PISCES_ST -r GYRE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -302,4 +309,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST
+    sync_expcfg ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST
+    sync_cppcfg ORCA2_ICE_PISCES ORCA2_ICE_PISCES_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_PISCES_ST -r ORCA2_ICE_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -543,4 +557,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST
+    sync_expcfg ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST
+    sync_cppcfg ORCA2_OFF_PISCES ORCA2_OFF_PISCES_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ORCA2_OFF_PISCES_ST -r ORCA2_OFF_PISCES -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -733,4 +754,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  AMM12 AMM12_ST
+    sync_expcfg AMM12 AMM12_ST
+    sync_cppcfg AMM12 AMM12_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n AMM12_ST -r AMM12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -860,4 +888,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ORCA2_SAS_ICE ORCA2_SAS_ICE_ST
+    sync_expcfg ORCA2_SAS_ICE ORCA2_SAS_ICE_ST
+    sync_cppcfg ORCA2_SAS_ICE ORCA2_SAS_ICE_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ORCA2_SAS_ICE_ST -r ORCA2_SAS_ICE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -994,4 +1029,11 @@
     export TEST_NAME="REPRO_4_8"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST
+    sync_expcfg ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST
+    sync_cppcfg ORCA2_ICE_PISCES ORCA2_ICE_OBS_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ORCA2_ICE_OBS_ST -r ORCA2_ICE_PISCES -d "OCE ICE"  -j 8 add_key "key_asminc ${ADD_KEYS}" del_key "key_top"
     cd ${SETTE_DIR}
@@ -1112,4 +1154,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  AGRIF_DEMO AGRIF_DEMO_ST
+    sync_expcfg AGRIF_DEMO AGRIF_DEMO_ST
+    sync_cppcfg AGRIF_DEMO AGRIF_DEMO_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -1381,4 +1430,11 @@
     export TEST_NAME="ORCA2"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST
+    sync_expcfg AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST
+    sync_cppcfg AGRIF_DEMO AGRIF_DEMO_NOAGRIF_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n AGRIF_DEMO_NOAGRIF_ST -r AGRIF_DEMO -j 8 add_key "${ADD_KEYS}" del_key "key_agrif"
     cd ${SETTE_DIR}
@@ -1418,4 +1474,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  SPITZ12 SPITZ12_ST
+    sync_expcfg SPITZ12 SPITZ12_ST
+    sync_cppcfg SPITZ12 SPITZ12_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n SPITZ12_ST -r SPITZ12 -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
Index: /utils/CI/sette_ticket2304/sette_test-cases.sh
===================================================================
--- /utils/CI/sette_ticket2304/sette_test-cases.sh	(revision 12288)
+++ /utils/CI/sette_ticket2304/sette_test-cases.sh	(revision 12289)
@@ -164,4 +164,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  OVERFLOW OVERFLOW_ST
+    sync_expcfg OVERFLOW OVERFLOW_ST
+    sync_cppcfg OVERFLOW OVERFLOW_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n OVERFLOW_ST -a OVERFLOW -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -261,4 +268,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  LOCK_EXCHANGE LOCK_EXCHANGE_ST
+    sync_expcfg LOCK_EXCHANGE LOCK_EXCHANGE_ST
+    sync_cppcfg LOCK_EXCHANGE LOCK_EXCHANGE_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n LOCK_EXCHANGE_ST -a LOCK_EXCHANGE -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -359,4 +373,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  VORTEX VORTEX_ST
+    sync_expcfg VORTEX VORTEX_ST
+    sync_cppcfg VORTEX VORTEX_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n VORTEX_ST -a VORTEX -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -536,4 +557,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ICE_AGRIF ICE_AGRIF_ST
+    sync_expcfg ICE_AGRIF ICE_AGRIF_ST
+    sync_cppcfg ICE_AGRIF ICE_AGRIF_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ICE_AGRIF_ST -a ICE_AGRIF -j 8  add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
@@ -721,4 +749,11 @@
     export TEST_NAME="LONG"
     cd ${MAIN_DIR}
+    #
+    # syncronisation if target directory/file exist (not done by makenemo)
+    . ${SETTE_DIR}/all_functions.sh
+    sync_mysrc  ISOMIP ISOMIP_ST
+    sync_expcfg ISOMIP ISOMIP_ST
+    sync_cppcfg ISOMIP ISOMIP_ST
+    #
     . ./makenemo -m ${CMP_NAM} -n ISOMIP_ST -a ISOMIP -j 8 add_key "${ADD_KEYS}" del_key "${DEL_KEYS}"
     cd ${SETTE_DIR}
