Index: CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER/opa9.driver
===================================================================
--- CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER/opa9.driver	(revision 3306)
+++ CONFIG/UNIFORM/v6/NEMO_v6/GENERAL/DRIVER/opa9.driver	(revision 3408)
@@ -40,13 +40,33 @@
 
 
+    V1D_ENABLE=".FALSE."
+    V5D_ENABLE=".FALSE."
+    V1M_ENABLE=".FALSE."
+    V1Y_ENABLE=".FALSE."
+
+    for frequency in ${config_OCE_WriteFrequency} ; do
+        case ${frequency} in
+            ( 1D|1d ) V1D_ENABLE=".TRUE." ;;
+            ( 5D|5d ) V5D_ENABLE=".TRUE." ;;
+            ( 1M|1m ) V1M_ENABLE=".TRUE." ;;
+            ( *[yY] ) V1Y_ENABLE=".TRUE." ;;
+        esac
+    done
+
     if [ "${EXPTYPE}" = "ia"   ] ; then
        NbFileInter=${#opa9_UserChoices_ListForcing[*]}
-       if [ ${year} -ge ${opa9_UserChoices_YearForcingInit} ] ; then 
-          year_forcing=${year}
+       (( LengthForcing=${opa9_UserChoices_YearForcingEnd} - ${opa9_UserChoices_YearForcingInit} + 1 ))
+       (( DiffForcing=abs(${opa9_UserChoices_YearForcingEnd} - ${year} )))
+       (( ModuloForcing=${DiffForcing} % ${LengthForcing} ))
+      if [ ${ModuloForcing} -eq 0 ] ; then
+          (( year_forcing=${opa9_UserChoices_YearForcingEnd} ))
        else
-          (( LengthForcing=${opa9_UserChoices_YearForcingEnd} - ${opa9_UserChoices_YearForcingInit} + 1 ))
-          (( DiffForcing=${opa9_UserChoices_YearForcingEnd} - ${year} ))
-          (( ModuloForcing=${DiffForcing} % ${LengthForcing} ))
-          (( year_forcing=${opa9_UserChoices_YearForcingEnd} - ${ModuloForcing} ))
+          if [ ${year} -ge ${opa9_UserChoices_YearForcingInit} ] && [ ${year} -le ${opa9_UserChoices_YearForcingEnd} ] ; then
+             year_forcing=${year}
+          elif [ ${year} -lt ${opa9_UserChoices_YearForcingInit} ] ; then
+             (( year_forcing=${opa9_UserChoices_YearForcingEnd} - ${ModuloForcing} ))
+          else
+             (( year_forcing=${opa9_UserChoices_YearForcingInit} + ${ModuloForcing} - 1 ))
+          fi
        fi
        (( year_forcing_m1 = ${year_forcing} - 1))
@@ -55,40 +75,11 @@
         while [ $i -lt ${NbFileInter} ] ; do
            eval file=${opa9_UserChoices_ListForcing[$i]}
-           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_m1}.nc  ${file}_y${year_m1}.nc 
-           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing}.nc     ${file}_y${year}.nc 
-           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_p1}.nc  ${file}_y${year_p1}.nc 
+           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_m1}.nc  ${file}_y${year_m1}.nc
+           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing}.nc     ${file}_y${year}.nc
+           IGCM_sys_Get ${opa9_UserChoices_R_FORCING}/${file}_${year_forcing_p1}.nc  ${file}_y${year_p1}.nc
            (( i = i + 1 ))
         done
     fi
 
-    NbFreq=$( echo ${config_OCE_WriteFrequency} | wc -w )
-    ##--Write Frequency Purpose ....
-    typeset -Z1 i=1
-    while [ $i -le ${NbFreq} ]; do
-        frequency=$( echo ${config_OCE_WriteFrequency} | awk -v var="$i" "-F " '{print $var}' )
-    	factor=$( echo ${frequency} | sed -e "s/[yYmMdDhH]//" )
-
-    	case ${frequency} in
-    	    *Y|*y)
-    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}y_${DatesPeriod} ;
-    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_Y} ;
-    	        eval WF${i}=${factor}Y ;;
-    	    *M|*m)
-    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}m_${DatesPeriod} ;
-    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_M} ;
-    	        eval WF${i}=${factor}M ;;
-    	    *D|*d)
-    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}d_${DatesPeriod} ;
-    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_D} ;
-    	        eval WF${i}=${factor}D ;;
-    	    *H|*h)
-    	        eval PREFIX_WF${i}=${config_UserChoices_JobName}_${factor}h_${DatesPeriod} ;
-    	        eval R_OUT_OCE_WF${i}=${R_OUT_OCE_O_H} ;
-    	        eval WF${i}=${factor}H ;;
-    	    *)
-    	esac
-        let i=$i+1
-
-    done
     # Period Length In Days between DateBegin and first day of calendar 0001 01 01
     # Needed by OPA namelist to compute correct file names 
@@ -158,4 +149,16 @@
    IGCM_comp_modifyNamelist blocker    namelist_cfg nn_leapy  ${OPA_NLEAPY}  
 
+   IGCM_debug_Print 1 'Informations into iodef.xml : V1D_ENABLE V5D_ENABLE V1M_ENABLE V1Y_ENABLE '
+   IGCM_debug_Print 1 ${V1D_ENABLE}  ${V5D_ENABLE} ${V1M_ENABLE} ${V1Y_ENABLE}
+
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1d enabled ${V1D_ENABLE}
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 5d enabled ${V5D_ENABLE}
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1m enabled ${V1M_ENABLE}
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-opa.xml 1y enabled ${V1Y_ENABLE}
+	
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1d enabled ${V1D_ENABLE}
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1m enabled ${V1M_ENABLE}
+   IGCM_comp_modifyXmlFile nonblocker file_def_nemo-lim.xml 1y enabled ${V1Y_ENABLE}
+
 # update domain_def.xml file 
    case ${RESOL_OCE} in 
