Index: CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.card
===================================================================
--- CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.card	(revision 776)
+++ CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.card	(revision 854)
@@ -9,9 +9,10 @@
 [InitialStateFiles]
 List=	(${R_INIT}/ATM/${config_UserChoices_TagName}/Albedo.nc, .), \
-	(${R_INIT}/ATM/${config_UserChoices_TagName}/ECDYN.nc, .), \
+	(${R_INIT}/ATM/${config_UserChoices_TagName}/ECDYN.nc.20020101, ECDYN.nc), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/ECPHY.nc, .), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/Relief.nc, .), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/Rugos.nc, .), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/landiceref.nc, .) \
+	(${R_INIT}/ATM/${config_UserChoices_TagName}/climO3_LMDZORINCAREPRO_1995.nc, climoz.nc), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/AMIP/sst_bc_clim.nc, amipbc_sst_1x1.nc), \
 	(${R_INIT}/ATM/${config_UserChoices_TagName}/AMIP/sic_bc_clim.nc, amipbc_sic_1x1.nc)
@@ -24,4 +25,5 @@
 List=	(${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}, physiq.def), \
 	(${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D},    gcm.def), \
+	(${SUBMIT_DIR}/PARAM/orchidee.def, .), \
 	(${SUBMIT_DIR}/PARAM/run.def, .), \
 	(${SUBMIT_DIR}/PARAM/traceur.def, .) 
@@ -34,5 +36,6 @@
 
 [OutputFiles]
-List=	( limit.nc,     ${R_OUT_ATM_O}/Boundary/${config_UserChoices_JobName}_clim_limit.nc,   NONE), \
-	( start.nc,     ${R_OUT_ATM_O}/Restart/${config_UserChoices_JobName}_clim_start.nc,    NONE), \
-	( startphy.nc,  ${R_OUT_ATM_O}/Restart/${config_UserChoices_JobName}_clim_startphy.nc, NONE)
+List=	( limit.nc,       ${R_OUT_ATM_O}/Boundary/${config_UserChoices_JobName}_clim_limit.nc,   NONE), \
+	( climoz_LMDZ.nc, ${R_OUT_ATM_O}/Boundary/${config_UserChoices_JobName}_climoz_LMDZ.nc,  NONE), \
+	( start.nc,       ${R_OUT_ATM_O}/Restart/${config_UserChoices_JobName}_clim_start.nc,    NONE), \
+	( startphy.nc,    ${R_OUT_ATM_O}/Restart/${config_UserChoices_JobName}_clim_startphy.nc, NONE)
Index: CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.driver
===================================================================
--- CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.driver	(revision 776)
+++ CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/COMP/lmdz.driver	(revision 854)
@@ -9,5 +9,58 @@
     [ -f ${SUBMIT_DIR}/../.resol ] && eval $(grep RESOL_ATM_3D ${SUBMIT_DIR}/../.resol) || RESOL_ATM_3D=96x95x19
 
-    RESOL_ATM_Z=$( echo $RESOL_ATM_3D | awk "-Fx" '{print $3}' )
+    RESOL_ATM_Z=$( echo ${RESOL_ATM_3D} | awk "-Fx" '{print $3}' )
+
+    ##-- Calendar type for LMDZ
+    case ${config_UserChoices_CalendarType} in
+        leap|gregorian)
+            CalendarTypeForLmdz=earth_366d;;
+        noleap)
+            CalendarTypeForLmdz=earth_365d;;
+        360d)
+            CalendarTypeForLmdz=earth_360d;;
+        *)
+            CalendarTypeForLmdz=earth_360d
+    esac
+
+    ##--Frequency purpose ....
+    ##--  Initialisation  ....
+    OK_instan=n
+    OK_journe=n
+    OK_mensuel=n
+    ok_hf=n
+
+    case ${config_UserChoices_PeriodLength} in
+	1Y|1y|1M|1m) OK_mensuel=y ;;
+	5D|5d|1D|1d) OK_journe=y ;;
+    esac
+
+    for frequency in ${config_ATM_WriteFrequency} ; do
+	case ${frequency} in
+	    5D|5d|1D|1d) OK_journe=y ;;
+	esac
+	case ${frequency} in
+	    HF|hf) ok_hf=y ;;
+	esac
+    done
+
+    ##--Variables used by LMDZ in physiq.def --
+    PAT_INST=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_instan='   )
+    PAT_JOUR=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_journe='   )
+    PAT_MOIS=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'OK_mensuel='  )
+    PAT_HFRE=$(        grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ok_hf='       )
+    PAT_ecrit_mth=$(   grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ecrit_mth='   )
+    PAT_ecrit_ISCCP=$( grep -v ^# ${SUBMIT_DIR}/PARAM/physiq.def_L${RESOL_ATM_Z}  | grep 'ecrit_ISCCP=' )
+    ##--Variables used by LMDZ in gcm.def --
+    PAT_iphysiq=$(   grep -v ^# ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D} | grep iphysiq  )
+    PAT_iperiod=$(   grep -v ^# ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D} | grep iperiod  )
+    PAT_day_step=$(  grep -v ^# ${SUBMIT_DIR}/PARAM/gcm.def_${RESOL_ATM_3D} | grep day_step )
+
+    ##-- This could be define in lmdz.card, inside section [UserChoices]
+    ##-- Otherwise we get the value in *.def
+    iperiod=$( echo ${PAT_iperiod} | awk -F= '{print $2}' )
+    iphysiq=$( echo ${PAT_iphysiq} | awk -F= '{print $2}' )
+    # day_step : number of steps per day (multiple of iperiod)
+    #(( day_step = 48 * iphysiq ))
+    day_step=$( echo ${PAT_day_step} | awk -F= '{print $2}' )
 
     IGCM_debug_PopStack "ATM_Initialize"
@@ -19,4 +72,21 @@
     IGCM_debug_PushStack "ATM_Update"
 
+    case ${config_UserChoices_PeriodLength} in
+        *Y|*y) 
+               LMDZ_ecrit_mth=30. 
+               LMDZ_ecrit_ISCCP=30.
+               LMDZ_periodav=30.
+               if [ "${config_UserChoices_CalendarType}" != "360d" ] ; then
+                  echo Change calendartype in config.card. PeriodLength=1Y allowed only for CalendarType=360d 
+                  exit
+               fi
+               ;;
+        *)
+               LMDZ_ecrit_mth=${PeriodLengthInDays}.
+               LMDZ_ecrit_ISCCP=${PeriodLengthInDays}.
+               LMDZ_periodav=${PeriodLengthInDays}.
+               ;;
+    esac
+
     ##-- Remise ou non a zero de la date initiale de LMDZ pour le fichier run.def
     if [ ${CumulPeriod} -eq 1 ] ; then
@@ -26,11 +96,40 @@
     fi
 
+    ## Mise en forme du fichier physiq.def
+    sed -e "s/${PAT_INST}/OK_instan=${OK_instan}/"                 \
+	-e "s/${PAT_JOUR}/OK_journe=${OK_journe}/"                 \
+	-e "s/${PAT_MOIS}/OK_mensuel=${OK_mensuel}/"               \
+	-e "s/${PAT_HFRE}/ok_hf=${ok_hf}/"                         \
+        -e "s/${PAT_ecrit_mth}/ecrit_mth=${LMDZ_ecrit_mth}/"       \
+        -e "s/${PAT_ecrit_ISCCP}/ecrit_ISCCP=${LMDZ_ecrit_ISCCP}/" \
+	physiq.def > physiq.def.tmp
+    IGCM_sys_Mv physiq.def.tmp physiq.def
+
+    echo cat
+    cat physiq.def
+
+    ## Mise en forme du fichier gcm.def
+    sed -e "s/${PAT_day_step}/day_step=${day_step}/"    \
+	-e "s/${PAT_iperiod}/iperiod=${iperiod}/"       \
+	-e "s/${PAT_iphysiq}/iphysiq=${iphysiq}/"       \
+	gcm.def > gcm.def.tmp
+    IGCM_sys_Mv gcm.def.tmp gcm.def
+
+    echo cat
+    cat gcm.def
+
     ## Mise en forme du fichier run.def
-    sed -e "s/_dayref_/${InitDay}/" \
-	-e "s/_anneeref_/${InitYear}/" \
-	-e "s/_nday_/${PeriodLengthInDays}/" \
-	-e "s/_raz_date_/${RAZ_DATE}/" \
+    sed -e "s/_dayref_/${InitDay}/"                    \
+	-e "s/_anneeref_/${InitYear}/"                 \
+        -e "s/_calend_/${CalendarTypeForLmdz}/"        \
+	-e "s/_nday_/${PeriodLengthInDays}/"           \
+	-e "s/_raz_date_/${RAZ_DATE}/"                 \
+        -e "s/_periodav_/${LMDZ_periodav}/"            \
+	-e "s/_adjust_/${LMDZ_adjust}/"                \
 	run.def > run.def.tmp
     IGCM_sys_Mv run.def.tmp run.def
+
+    echo cat run
+    cat run.def
 
     IGCM_debug_PopStack "ATM_Update"
Index: CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/config.card
===================================================================
--- CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/config.card	(revision 776)
+++ CONFIG/LMDZOR/branches/LMDZ4OR_v3/CREATE/config.card	(revision 854)
@@ -69,6 +69,6 @@
 #D-- NO Post -
 [Post]
-RebuildFrequency=
-TimeSeriesFrequency=
-SeasonalFrequency=
+RebuildFrequency=NONE
+TimeSeriesFrequency=NONE
+SeasonalFrequency=NONE
 #========================================================================
