Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/orchidee.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/orchidee.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/orchidee.driver	(revision 1038)
@@ -34,18 +34,32 @@
     typeset SECHIBA_WRITE_STEP
 
-    case ${config_SRF_WriteFrequency} in
+    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
+    case ${SRF_WriteFrequency} in
 	*Y|*y) 
-	    WriteInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_SRF_WriteFrequency}}" )
-	    PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+	    WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' )
+	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;;
-	*M|*m) 
-	    WriteInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_SRF_WriteFrequency}}" )
+	1M)
 	    case ${config_UserChoices_PeriodLength} in
 	    *Y|*y)
-		PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *)
+		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
+		;;
+	    esac
+	    ;;
+	*M|*m) 
+	    WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' )
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  ))
 		;;
 	    *M|*m)
-		PeriodLengthInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_UserChoices_PeriodLength}}" )
+		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  ))
 		;;
@@ -60,8 +74,8 @@
 	    (( SECHIBA_WRITE_STEP = 86400 )) ;;
 	*s)
-	    WriteInSeconds=$( echo ${1} | awk -F '[s]' "{print ${config_SRF_WriteFrequency}}" )
+	    WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;;
 	*) 
-	    IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
+	    IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
 	    IGCM_debug_Verif_Exit ;;
     esac
Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/stomate.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/stomate.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/stomate.driver	(revision 1038)
@@ -25,4 +25,16 @@
 	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) ;;
+	1M|1m) 
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *)
+		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
+	    esac
+	    ;;
 	*M|*m) 
 	    WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
@@ -30,8 +42,10 @@
 	    *Y|*y)
 		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = 30 )) ;;
+		(( STOMATE_WRITE_STEP = 30 ))
+		;;
 	    *M|*m)
 		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths )) ;;
+		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths ))
+		;;
 	    *)
 		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
Index: CONFIG/IPSLCM/IPSLCM5A/historical/COMP/orchidee.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/historical/COMP/orchidee.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/historical/COMP/orchidee.driver	(revision 1038)
@@ -34,18 +34,32 @@
     typeset SECHIBA_WRITE_STEP
 
-    case ${config_SRF_WriteFrequency} in
+    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
+    case ${SRF_WriteFrequency} in
 	*Y|*y) 
-	    WriteInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_SRF_WriteFrequency}}" )
-	    PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+	    WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' )
+	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;;
-	*M|*m) 
-	    WriteInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_SRF_WriteFrequency}}" )
+	1M)
 	    case ${config_UserChoices_PeriodLength} in
 	    *Y|*y)
-		PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *)
+		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
+		;;
+	    esac
+	    ;;
+	*M|*m) 
+	    WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' )
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  ))
 		;;
 	    *M|*m)
-		PeriodLengthInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_UserChoices_PeriodLength}}" )
+		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  ))
 		;;
@@ -60,8 +74,8 @@
 	    (( SECHIBA_WRITE_STEP = 86400 )) ;;
 	*s)
-	    WriteInSeconds=$( echo ${1} | awk -F '[s]' "{print ${config_SRF_WriteFrequency}}" )
+	    WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;;
 	*) 
-	    IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
+	    IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
 	    IGCM_debug_Verif_Exit ;;
     esac
Index: CONFIG/IPSLCM/IPSLCM5A/historical/COMP/stomate.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/historical/COMP/stomate.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/historical/COMP/stomate.driver	(revision 1038)
@@ -25,4 +25,16 @@
 	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) ;;
+	1M|1m) 
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *)
+		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
+	    esac
+	    ;;
 	*M|*m) 
 	    WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
@@ -30,8 +42,10 @@
 	    *Y|*y)
 		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = 30 )) ;;
+		(( STOMATE_WRITE_STEP = 30 ))
+		;;
 	    *M|*m)
 		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths )) ;;
+		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths ))
+		;;
 	    *)
 		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
Index: CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/orchidee.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/orchidee.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/orchidee.driver	(revision 1038)
@@ -34,18 +34,32 @@
     typeset SECHIBA_WRITE_STEP
 
-    case ${config_SRF_WriteFrequency} in
+    SRF_WriteFrequency=$( echo ${config_SRF_WriteFrequency} | sed -e 's/\([0-9]*[yYmMdDs]\).*/\1/' ) 
+    case ${SRF_WriteFrequency} in
 	*Y|*y) 
-	    WriteInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_SRF_WriteFrequency}}" )
-	    PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+	    WriteInYears=$( echo ${SRF_WriteFrequency} | awk -F '[yY]' '{print $1}' )
+	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears * 86400 )) ;;
-	*M|*m) 
-	    WriteInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_SRF_WriteFrequency}}" )
+	1M)
 	    case ${config_UserChoices_PeriodLength} in
 	    *Y|*y)
-		PeriodLengthInYears=$( echo ${1} | awk -F '[yY]' "{print ${config_UserChoices_PeriodLength}}" )
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		SECHIBA_WRITE_STEP=-1.
+		;;
+	    *)
+		(( SECHIBA_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) * 86400 ))
+		;;
+	    esac
+	    ;;
+	*M|*m) 
+	    WriteInMonths=$( echo ${SRF_WriteFrequency} | awk -F '[mM]' '{print $1}' )
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * 86400 / PeriodLengthInYears / 12  ))
 		;;
 	    *M|*m)
-		PeriodLengthInMonths=$( echo ${1} | awk -F '[mM]' "{print ${config_UserChoices_PeriodLength}}" )
+		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
 		(( SECHIBA_WRITE_STEP = PeriodLengthInDays * WriteInMonths  * 86400 / PeriodLengthInMonths  ))
 		;;
@@ -60,8 +74,8 @@
 	    (( SECHIBA_WRITE_STEP = 86400 )) ;;
 	*s)
-	    WriteInSeconds=$( echo ${1} | awk -F '[s]' "{print ${config_SRF_WriteFrequency}}" )
+	    WriteInSeconds=$( echo ${SRF_WriteFrequency} | awk -F '[s]' '{print $1}' )
 	    (( SECHIBA_WRITE_STEP = WriteInSeconds )) ;;
 	*) 
-	    IGCM_debug_Exit "SRF_Update " ${config_SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
+	    IGCM_debug_Exit "SRF_Update " ${SRF_WriteFrequency} " invalid WriteFrequency : choose in 1Y, 1M, 5D, 1D." 
 	    IGCM_debug_Verif_Exit ;;
     esac
Index: CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/stomate.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/stomate.driver	(revision 1037)
+++ CONFIG/IPSLCM/IPSLCM5A/piControl/COMP/stomate.driver	(revision 1038)
@@ -25,4 +25,16 @@
 	    PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
 	    (( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInYears / PeriodLengthInYears )) ;;
+	1M|1m) 
+	    case ${config_UserChoices_PeriodLength} in
+	    *Y|*y)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *M|*m)
+		STOMATE_WRITE_STEP=-1.
+		;;
+	    *)
+		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
+	    esac
+	    ;;
 	*M|*m) 
 	    WriteInMonths=$( echo ${config_SBG_WriteFrequency} | awk -F '[mM]' '{print $1}' )
@@ -30,8 +42,10 @@
 	    *Y|*y)
 		PeriodLengthInYears=$( echo ${config_UserChoices_PeriodLength} | awk -F '[yY]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = 30 )) ;;
+		(( STOMATE_WRITE_STEP = 30 ))
+		;;
 	    *M|*m)
 		PeriodLengthInMonths=$( echo ${config_UserChoices_PeriodLength} | awk -F '[mM]' '{print $1}' )
-		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths )) ;;
+		(( STOMATE_WRITE_STEP = PeriodLengthInDays * WriteInMonths / PeriodLengthInMonths ))
+		;;
 	    *)
 		(( STOMATE_WRITE_STEP = $( IGCM_date_DaysInMonth $year $month ) )) ;;
