Index: CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/opa9.driver
===================================================================
--- CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/opa9.driver	(revision 2270)
+++ CONFIG/UNIFORM/v6/IPSLCM6/GENERAL/DRIVER/opa9.driver	(revision 2379)
@@ -23,9 +23,9 @@
     RESOL_OCE=$( echo ${RESOL_OCE_ICE} | sed "s/${SEAICE_MODEL}//" )
 
-    echo "RESOL          : ${RESOL}"
-    echo "RESOL_OCE_ICE  : ${RESOL_OCE_ICE}"
-    echo "SEAICE_MODEL   : ${SEAICE_MODEL}"
-    echo "LIM_VERSION    : ${LIM_VERSION}"
-    echo "RESOL_OCE      : ${RESOL_OCE}"
+    IGCM_debug_Print 1 "RESOL          : ${RESOL}"
+    IGCM_debug_Print 1 "RESOL_OCE_ICE  : ${RESOL_OCE_ICE}"
+    IGCM_debug_Print 1 "SEAICE_MODEL   : ${SEAICE_MODEL}"
+    IGCM_debug_Print 1 "LIM_VERSION    : ${LIM_VERSION}"
+    IGCM_debug_Print 1 "RESOL_OCE      : ${RESOL_OCE}"
 
     # Local function to find namelists parameters
@@ -54,9 +54,9 @@
     NAMELIST_OPA_CFG=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_cfg
     NAMELIST_OPA_REF=${SUBMIT_DIR}/PARAM/namelist_${RESOL_OCE}_ref
-    echo "namelist_ref : ${NAMELIST_OPA_REF}"
+    IGCM_debug_Print 1 "namelist_ref : ${NAMELIST_OPA_REF}"
     if [ ! -r ${NAMELIST_OPA_REF} ] ; then
 	echo "${NAMELIST_OPA_REF} non trouve"
     fi
-    echo "namelist_cfg : ${NAMELIST_OPA_CFG}"
+    IGCM_debug_Print 1 "namelist_cfg : ${NAMELIST_OPA_CFG}"
     if [ ! -r ${NAMELIST_OPA_CFG} ] ; then
 	echo "${NAMELIST_OPA_CFG} non trouve"
@@ -85,5 +85,6 @@
     ORCA_NN_FSBC=$(   supergrep nn_fsbc       ${NAMELIST_OPA_CFG} | sed 's/ *nn_fsbc *=//' | sed 's/\. *//' )
     (( ORCA_NPDT_JOUR  = 86400 / ORCA_RDT     ))
-    (( ORCA_NPDT_SBC   = ORCA_NPDT_JOUR / ORCA_NN_FSBC ))
+    #(( ORCA_NPDT_SBC   = ORCA_NPDT_JOUR / ORCA_NN_FSBC ))
+    (( ORCA_RDT_SBC =  ORCA_RDT * ORCA_NN_FSBC ))
  
 
@@ -92,29 +93,31 @@
     (( DaysSinceJC = $( IGCM_date_DaysSinceJC ${DateBegin} ) + 1 ))
 
-    echo "PAT_CEXPER   $PAT_CEXPER "
-    echo "PAT_NIT000   $PAT_NIT000"
-    echo "PAT_NITEND   $PAT_NITEND"
-    echo "PAT_NDATE0   $PAT_NDATE0"
-    echo "PAT_NLEAPY   $PAT_NLEAPY"
-    echo "PAT_NSTOCK   $PAT_NSTOCK"
-    echo "PAT_NWRITE   $PAT_NWRITE"
-    echo "PAT_RESTAR   $PAT_RESTAR"
-    echo "PAT_NRSTAR   $PAT_NRSTAR"
-    echo "PAT_NMSH     $PAT_NMSH"
-    echo "PAT_NN_WRITE $PAT_NN_WRITE"
-    echo "PAT_NN_FWRI  $PAT_NN_FWRI"
-    echo "PAT_ICE_EMBD $PAT_ICE_EMBD"
-    echo "PAT_ICEFLX   $PAT_ICEFLX"
-    echo "PAT_JPNI     $PAT_JPNI"
-    echo "PAT_JPNJ     $PAT_JPNJ"
-    echo "PAT_JPNIJ    $PAT_JPNIJ"
-    echo "PAT_NN_FSBC  $PAT_NN_FSBC"
-    echo " "
-    echo "ORCA_RDT     $ORCA_RDT"
-    echo "DaysSinceJC  $DaysSinceJC"
+    IGCM_debug_Print 1 "PAT_CEXPER   $PAT_CEXPER "
+    IGCM_debug_Print 1 "PAT_NIT000   $PAT_NIT000"
+    IGCM_debug_Print 1 "PAT_NITEND   $PAT_NITEND"
+    IGCM_debug_Print 1 "PAT_NDATE0   $PAT_NDATE0"
+    IGCM_debug_Print 1 "PAT_NLEAPY   $PAT_NLEAPY"
+    IGCM_debug_Print 1 "PAT_NSTOCK   $PAT_NSTOCK"
+    IGCM_debug_Print 1 "PAT_NWRITE   $PAT_NWRITE"
+    IGCM_debug_Print 1 "PAT_RESTAR   $PAT_RESTAR"
+    IGCM_debug_Print 1 "PAT_NRSTAR   $PAT_NRSTAR"
+    IGCM_debug_Print 1 "PAT_NMSH     $PAT_NMSH"
+    IGCM_debug_Print 1 "PAT_NN_WRITE $PAT_NN_WRITE"
+    IGCM_debug_Print 1 "PAT_NN_FWRI  $PAT_NN_FWRI"
+    IGCM_debug_Print 1 "PAT_ICE_EMBD $PAT_ICE_EMBD"
+    IGCM_debug_Print 1 "PAT_ICEFLX   $PAT_ICEFLX"
+    IGCM_debug_Print 1 "PAT_JPNI     $PAT_JPNI"
+    IGCM_debug_Print 1 "PAT_JPNJ     $PAT_JPNJ"
+    IGCM_debug_Print 1 "PAT_JPNIJ    $PAT_JPNIJ"
+    IGCM_debug_Print 1 "PAT_NN_FSBC  $PAT_NN_FSBC"
+    IGCM_debug_Print 1 " "
+    IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT"
+    IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC"
+    IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC"
+    IGCM_debug_Print 1 "ORCA_NPDT_JOUR  $ORCA_NPDT_JOUR"
+    IGCM_debug_Print 1 "DaysSinceJC     $DaysSinceJC"
     
     IGCM_debug_PopStack "OCE_Initialize"
-
-    
+   
 }
 
@@ -126,25 +129,14 @@
     ## Check that nn_fsbc is correct compare to coupling frequency
 
-    FreqCoupling=${oasis_UserChoices_FreqCoupling:-86400}
-    if [[ ${FreqCoupling} -gt 0 ]] ; then
-	(( ORCA_NPDT_COUP  = 86400 / FreqCoupling ))
-    else
-	ORCA_NPDT_COUP=${ORCA_NPDT_SBC}
-    fi 
+    IGCM_debug_Print 1 "FreqCoupling    $FreqCoupling"
+    IGCM_debug_Print 1 "ORCA_NN_FSBC    $ORCA_NN_FSBC"
+    IGCM_debug_Print 1 "ORCA_RDT        $ORCA_RDT"
+    IGCM_debug_Print 1 "ORCA_RDT_SBC    $ORCA_RDT_SBC"
+
+    if [[ ${ORCA_RDT_SBC} -gt ${FreqCoupling} ]] ; then
+	IGCM_debug_Exit "ORCA_RDT_SBC=${ORCA_RDT_SBC} is greater than FreqCoupling=${FreqCoupling}"
+     	IGCM_debug_Verif_Exit
+    fi
     
-    if [[ ${ORCA_NN_FSBC} -lt ${ORCA_NPDT_COUP} ]] ; then
-    	(( ORCA_NN_FSBC = ORCA_NPDT_JOUR / ORCA_NPDT_COUP ))
-    fi
-
-    ## This informations are used for diaptr, trends and diagap files
-    ## only the first frequency is used for this files
-   
-
-    echo "FreqCoupling    $FreqCoupling"
-    echo "ORCA_NN_FSBC    $ORCA_NN_FSBC"
-    echo "ORCA_NPDT_JOUR  $ORCA_NPDT_JOUR"
-    echo "ORCA_NPDT_COUP  $ORCA_NPDT_COUP"
-    echo "ORCA_NPDT_SBC   $ORCA_NPDT_SBC"
-
     ##--Write Frequency Purpose ....
     frequency=$( echo ${config_OCE_WriteFrequency} | awk "-F " '{print $1}' )
@@ -256,10 +248,10 @@
 	;;
 	( LIM3 ) 
-	NN_ICE_EMBD=1 
+	NN_ICE_EMBD=2
 	ICEFLX=${opa9_UserChoices_iceflx:-linear}
 	;;
     esac
 
-    echo "NUM_PROC_OCE : " ${NUM_PROC_OCE}
+    IGCM_debug_Print 1 "NUM_PROC_OCE : " ${NUM_PROC_OCE}
 
     sed -e "s/${PAT_CEXPER}/       cn_exp=\"${config_UserChoices_JobName}\"/"   \
@@ -285,11 +277,11 @@
     IGCM_sys_Mv namelist_cfg.tmp namelist_cfg
 
-    echo 'Variables automatically updated in ORCA namelist_cfg'
+    IGCM_debug_Print 1 'Variables automatically updated in ORCA namelist_cfg'
     grep AUTO namelist_cfg
 
     # update iodef.xml
 
-    echo 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL'
-    echo ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL}
+    IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V1M_ENABLE V1Y_ENABLE OUTPUT_LEVEL'
+    IGCM_debug_Print 1 ${V1D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE} ${OUTPUT_LEVEL}
 
     sed -e "s/_1D_ENABLE_/${V1D_ENABLE}/" \
@@ -334,5 +326,5 @@
     fi
 
-    echo FINALIZE OCE !!!
+    IGCM_debug_Print 1 FINALIZE OCE !!!
 
     IGCM_debug_PopStack "OCE_Finalize"
