Index: /CMIP5/esmControl/CpiControl1/COMP/lmdz.card
===================================================================
--- /CMIP5/esmControl/CpiControl1/COMP/lmdz.card	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/COMP/lmdz.card	(revision 1353)
@@ -84,7 +84,7 @@
 Patches= ()
 GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds, aire)
-TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, ftime_con, iwp, lwp, LWdnSFC, LWdnSFCclr, LWupSFCclr, LWdn200, LWdn200clr, LWup200, LWup200clr, precip, prw, pluc, psol, q2m, rh2m, sens, sicf, slp, snow, soll0, soll, sols0, sols, SWdnSFC, SWupSFC, SWup200, SWdnTOA, SWupTOA, SWdn200, SWdnSFCclr, SWupSFCclr, SWupTOAclr, t2m, t2m_max, t2m_min, taux, taux_ter, taux_sic, taux_lic, taux_oce, tauy, tauy_ter, tauy_sic, tauy_lic, tauy_oce, lat_ter, lat_sic, lat_lic, lat_oce, nettop, pbase, ptop, topl0, topl, tops0, tops, topswad, topswai, tsol, tsol_ter, tsol_lic, tsol_oce, tsol_sic , u10m, u500, v10m, v500, w500, pourc_ter, pourc_oce, pourc_sic, pourc_lic, wind10m, od550aer, od550lt1aer, absvisaer, loadoa, loadbc, loadso4, loaddust, loadss, sconcoa, sconcbc, sconcso4, sconcdust, sconcss, reffclwtop, cldncl, swtoaas_ant, swtoacs_ant, swtoacf_ant, swsrfas_ant, swsrfcs_ant, swsrfcf_ant, swtoaas_nat, swtoacs_nat, swtoacf_nat, swsrfas_nat, swsrfcs_nat, swsrfcf_nat, solswai, swtoacf_zero, swsrfcf_zero)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, ftime_con, iwp, lwp, LWdnSFC, LWdnSFCclr, LWupSFCclr, LWdn200, LWdn200clr, LWup200, LWup200clr, precip, prw, pluc, psol, q2m, rh2m, sens, sicf, slp, snow, soll0, soll, sols0, sols, SWdnSFC, SWupSFC, SWup200, SWdnTOA, SWupTOA, SWdn200, SWdnSFCclr, SWupSFCclr, SWupTOAclr, t2m, t2m_max, t2m_min, taux, taux_ter, taux_sic, taux_lic, taux_oce, tauy, tauy_ter, tauy_sic, tauy_lic, tauy_oce, lat_ter, lat_sic, lat_lic, lat_oce, nettop, pbase, ptop, topl0, topl, tops0, tops, topswad, topswai, tsol, tsol_ter, tsol_lic, tsol_oce, tsol_sic , u10m, u500, v10m, v500, w500, pourc_ter, pourc_oce, pourc_sic, pourc_lic, wind10m, od550aer, od550lt1aer, absvisaer, loadoa, loadbc, loadso4, loaddust, loadss, sconcoa, sconcbc, sconcso4, sconcdust, sconcss, reffclwtop, cldncl)
 ChunckJob2D = NONE
-TimeSeriesVars3D = (upwd, lwcon, iwcon, lcc3dcon, lcc3dstra, temp, theta, ovap, ovapinit, geop, vitu, vitv, vitw, pres, rneb, rnebcon, rhum, mc, paprs, scdnc, ec550aer, concoa, concbc, concso4, concss, concdust, reffclws, reffclwc, Aga)
+TimeSeriesVars3D = (upwd, lwcon, iwcon, lcc3dcon, lcc3dstra, temp, theta, ovap, ovapinit, geop, vitu, vitv, vitw, pres, rneb, rnebcon, rhum, mc, paprs, ec550aer, concoa, concbc, concso4, concss, concdust, reffclws, reffclwc, Aga)
 ChunckJob3D = 100Y
 Seasonal=ON
@@ -120,7 +120,7 @@
 Patches= ()
 GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
-TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, precip, pluc, plul, prw, psol, q2m, sens, sicf, slp, soll, sols, snow, SWdnSFC, t2m, t2m_max, t2m_min, topl, tops, tsol, t700, u10m, v10m, wind10m, wind10max, w500)
+TimeSeriesVars2D = (bils, cldh, cldl, cldm, cldq, cldt, evap, flat, precip, pluc, plul, prw, psol, q2m, sens, sicf, slp, soll, sols, SWdnSFC, t2m, t2m_max, t2m_min, topl, tops, tsol, u10m, v10m, wind10m, wind10max)
 ChunckJob2D = 200Y
-TimeSeriesVars3D = (lwcon, iwcon, mc, rhum, rneb, temp, theta, ovap, geop, vitu, vitv, vitw, pres, paprs)
+TimeSeriesVars3D = (lwcon, iwcon, mc, rhum, temp, theta, ovap, geop, vitu, vitv, vitw, pres, paprs)
 ChunckJob3D = OFF
 Seasonal=OFF
@@ -183,5 +183,5 @@
 Patches= ()
 GatherWithInternal = (lon, lat, presnivs, time_counter, time_counter_bnds)
-TimeSeriesVars2D = (precip, flat, sens, LWdnSFC, LWupSFC, SWdnSFC, SWupSFC, pluc, snow, LWdnSFCclr, SWdnSFCclr, LWupSFCclr, SWupSFCclr, cldt)
+TimeSeriesVars2D = (precip, flat, sens, LWdnSFC, LWupSFC, SWdnSFC, SWupSFC, pluc, snow, LWdnSFCclr, SWdnSFCclr, LWupSFCclr, cldt)
 ChunckJob2D = OFF
 TimeSeriesVars3D = ()
Index: /CMIP5/esmControl/CpiControl1/COMP/lmdz.driver
===================================================================
--- /CMIP5/esmControl/CpiControl1/COMP/lmdz.driver	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/COMP/lmdz.driver	(revision 1353)
@@ -139,39 +139,63 @@
 
      ##-- GHG forcing for the current year
-
-    if ( ${FirstInitialize} ) ; then
-        ##--Initialization of fluxes to an undefined value at the first run
-        UndefinedValueCo2=-9999
-        InitPeriodCo2=0
+    if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"n" ]) ; then
+	UndefinedValueCo2=-9999
+        InitPeriodCo2=$(( ${CumulPeriod} - 1 ))
         InitDateBeginCo2=${UndefinedValueCo2}
-        InitYearCo2=$(( ${year} - 1 )) 
+        InitYearCo2=$(( ${year} - 1 ))
         InitDateEndCo2=${InitYearCo2}1231
-        fCO2_ff=${UndefinedValueCo2} 
+        fCO2_ff=${UndefinedValueCo2}
         CO2SBG=${UndefinedValueCo2}
         CO2LU=${UndefinedValueCo2}
         CO2MBG=${UndefinedValueCo2}
         CO2_ppm_prec=${UndefinedValueCo2}
-        # Get the initial value of atmosp. pco2 
         CO2_ppm=${lmdz_UserChoices_co2_init}
 
         IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log
         IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log
-    
-	# Save CO2 values in ExeCpuLog variable contents 5 fields
+
         echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \
              gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
                               $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
-    
-	# Get the path where the log file co2.log is
-        PathCO2log=${SUBMIT_DIR} 
-	# Get Previous line in co2.log
+
+        PathCO2log=${SUBMIT_DIR}
         PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log )
 
     else
+
         # Get restart line in co2.log
-        PathCO2log=${SUBMIT_DIR}
-        PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log ) 
-        # Get the value of atmosp. pco2 in co2.log
-        CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+
+        # NEW parameter in config.card (even for Overule all restarts, you must modify the line after this comment ):
+        # !! NEW for Carbone cycle !! Path where to find old co2.log file for restart CO2.
+        #SubmitRestartPath=
+        if ( ${FirstInitialize} && [ X"${config_ATM_Restart}" = X"y" ]) ; then
+            IGCM_card_DefineVariableFromOption ${SUBMIT_DIR}/config.card ATM SubmitRestartPath
+            PathCO2log=${config_ATM_SubmitRestartPath}
+            Date_r=$( IGCM_date_ConvertFormatToGregorian ${config_ATM_RestartDate} )
+            PreviousLinelog=$( grep ${Date_r} ${PathCO2log}/co2.log )
+
+            IGCM_sys_Cp ${SUBMIT_DIR}/co2.log.init ${SUBMIT_DIR}/co2.log
+            IGCM_sys_Chmod u+w ${SUBMIT_DIR}/co2.log
+
+            # Save Last Line of control in new co2.log file
+            InitPeriodCo2=0
+            InitDateBeginCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $2}' )
+            InitDateEndCo2=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $3}' )
+            fCO2_ff=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $6}' )
+            CO2SBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $8}' )
+            CO2LU=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $9}' )
+            CO2MBG=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $7}' )
+            CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $5}' )
+            CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+
+            echo "${InitPeriodCo2} ${InitDateBeginCo2} ${InitDateEndCo2} ${CO2_ppm} ${CO2_ppm_prec} ${fCO2_ff} ${CO2MBG} ${CO2SBG} ${CO2LU}" |   \
+                  gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
+                              $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
+
+        else
+            PathCO2log=${SUBMIT_DIR}
+            PreviousLinelog=$( tail -1 ${PathCO2log}/co2.log )
+            CO2_ppm=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
+        fi
 
     fi
@@ -190,5 +214,5 @@
     LMDZ_sed physiq.def ok_histNMC  "${LMDZ_NMC_monthly}, ${LMDZ_NMC_daily}, ${LMDZ_NMC_hf}"
 #   For Control, we won't modify ATM CO2 :
-#    LMDZ_sed physiq.def co2_ppm     ${CO2_ppm}
+    LMDZ_sed physiq.def co2_ppm     ${CO2_ppm}
 
     ## gcm.def parameters : no change since gcm.def_${RESOL_ATM_3D} is used and already modified
@@ -263,28 +287,26 @@
     [ ${CumulPeriod} -le ${LMDZ_NbPeriod_adjust} ] && IGCM_sys_Put_Out Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat ${R_OUT_ATM_D}/${config_UserChoices_JobName}_Bands_${RESOL_ATM_3D}_${NUM_PROC_ATM}prc.dat_${CumulPeriod}
 
+#   get the fossile fuel file :
+
     typeset CO2SBG_3V CO2SBG CO2MBG CO2SRF CO2LU CO2_ppm CO2_ppm_prec fCO2_ff
 
-    # For Control, no fossil fuel emission :
     fCO2_ff=0
-    echo "Fossil Fuel for control run  :" ${fCO2_ff}
-
-    # Get the value of ocean carbon flux
+
     CO2MBG=$( ${SUBMIT_DIR}/COMP/lmdz_analyse_pisces_out.awk ocean.output )
     CO2MBG=$( echo ${CO2MBG} | sed -e "s/ *//" )
     echo "Ocean carbon flux  :" ${CO2MBG}
 
-    # Get the value of land fluxes
     set +A CO2SBG_3V -- $( ${SUBMIT_DIR}/COMP/lmdz_analyse_stomate_out.awk out_orchidee_0000 )
     CO2SRF=$( echo ${CO2SBG_3V[0]} | sed -e "s/ *//" )
     CO2LU=$( echo ${CO2SBG_3V[1]} | sed -e "s/ *//" )
     CO2SBG=$( echo ${CO2SBG_3V[2]} | sed -e "s/ *//" )
-    echo "Land carbon flux (NEP)         :" ${CO2SRF}
-    echo "LU flux          (FLUC)        :" ${CO2LU}
-    echo "Total Land carbon flux (NBP)   :" ${CO2SBG}
+    echo "Land carbon flux  :" ${CO2SRF}
+    echo "LU flux           :" ${CO2LU}
+    echo "Total Land carbon flux  :" ${CO2SBG}
 
     # Previous CO2
     CO2_ppm_prec=$( echo "${PreviousLinelog[*]}" | gawk -F '|' '{gsub(" ",""); print $4}' )
     echo "Previous CO2  :" ${CO2_ppm_prec}
-    
+
     # Formula
     CO2_ppm=$( echo "${CO2_ppm_prec} + (${fCO2_ff} + ${CO2MBG} + ${CO2SBG}) / 2.12" | bc -l )
@@ -295,5 +317,4 @@
          gawk '{printf("  %11d | %15s | %15s | %22.15g | %20.15g | %11.8g | %11.8g | %12.8g | %12.8g \n", \
                            $1,$2,$3,$4,$5,$6,$7,$8,$9)}' >> ${SUBMIT_DIR}/co2.log
-
     echo FINALIZE ATM !
 
Index: /CMIP5/esmControl/CpiControl1/COMP/pisces.driver
===================================================================
--- /CMIP5/esmControl/CpiControl1/COMP/pisces.driver	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/COMP/pisces.driver	(revision 1353)
@@ -78,5 +78,5 @@
         namelist_pisces > namelist_pisces.tmp
 
-    IGCM_sys_Mv namelist_pisces.tmp namelist_pisces
+    IGCM_sys_Mv namelist_pisces.tmp  namelist_pisces
 
 
Index: /CMIP5/esmControl/CpiControl1/PARAM/iodef.xml
===================================================================
--- /CMIP5/esmControl/CpiControl1/PARAM/iodef.xml	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/PARAM/iodef.xml	(revision 1353)
@@ -349,8 +349,8 @@
 
          <!-- table 2.2 -->
-          <field ref="uice_ipa"     name="iicevelu"   description="Ice velocity along i-axis at I-point (ice presence average)"  level="3"    />
-          <field ref="vice_ipa"     name="iicevelv"   description="Ice velocity along j-axis at I-point (ice presence average)"  level="3"    />
-          <field ref="ice_cover"    name="ileadfra"   description="sea_ice_area_fraction"                                        level="3"    />
-	  <field ref="icethic_cea"  name="iicethic"   description="sea_ice_thickness"                                            level="3"    />
+          <field ref="uice_ipa"     name="iicevelu"   description="Ice velocity along i-axis at I-point (ice presence average)"  level="2"    />
+          <field ref="vice_ipa"     name="iicevelv"   description="Ice velocity along j-axis at I-point (ice presence average)"  level="2"    />
+          <field ref="ice_cover"    name="ileadfra"   description="sea_ice_area_fraction"                                        level="2"    />
+	  <field ref="icethic_cea"  name="iicethic"   description="sea_ice_thickness"                                            level="2"    />
 	</file>   
 
@@ -435,5 +435,5 @@
 	<field ref="ice_cover"         name="soicecov"    description="sea_ice_area_fraction"                                    />
 	<field ref="BLT"               name="blt"         description="Barrier Layer Thickness"                    level="3"     />
-	<field ref="mld|dt|"           name="mld_dt02"    description="Mixed Layer Depth |dt|=0.2 (ref.10m)"       level="3"     />
+	<field ref="mld|dt|"           name="mld_dt02"    description="Mixed Layer Depth |dt|=0.2 (ref.10m)"         level="3"     />
 
 	  </file>   
Index: /CMIP5/esmControl/CpiControl1/PARAM/physiq.def_L39
===================================================================
--- /CMIP5/esmControl/CpiControl1/PARAM/physiq.def_L39	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/PARAM/physiq.def_L39	(revision 1353)
@@ -49,10 +49,4 @@
 flag_pres         =  2, 3, 7, 6, 6
 name_pres         =  pres
-# w500 for histday
-flag_w500         =  1, 5, 3, 10, 10
-name_w500         =  w500
-# t700 for histday
-flag_t700         =  1, 5, 3, 10, 10
-name_t700         =  t700
 # Parametres niveau de sorties differents fichiers 
 #
@@ -69,5 +63,5 @@
 # - lev_histday=4 => + champs sous-surfaces
 # - lev_histday=5 => + champs F. Aires
-lev_histday=2
+lev_histday=5
 ### lev_histmth=0-4, niveau de sortie fichier "histmth.nc"
 # - lev_histmth=0 => pas de sorties lev_histmth.nc
Index: /CMIP5/esmControl/CpiControl1/README
===================================================================
--- /CMIP5/esmControl/CpiControl1/README	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/README	(revision 1353)
@@ -4,5 +4,7 @@
 
 Experiment Name comes from CMIP5 DRS. See: http://cmip-pcmdi.llnl.gov/cmip5/docs/cmip5_data_reference_syntax.pdf
-Output files are stored into : login/IGCM_OUT/IPSLCM5A/DEVT/pdControl/EXP00 directory
+Output files are stored into : login/IGCM_OUT/IPSLCM5A_C/PROD/CpiControl directory
+
+plot_co2.jnl is a ferret script to plot co2.log file - remove the | before running the script -
 
 
Index: /CMIP5/esmControl/CpiControl1/config.card
===================================================================
--- /CMIP5/esmControl/CpiControl1/config.card	(revision 1352)
+++ /CMIP5/esmControl/CpiControl1/config.card	(revision 1353)
@@ -9,10 +9,10 @@
 [UserChoices]
 #============================
-JobName=CpiControl00
+JobName=CpiControl01
 #----- Short Name of Experiment
 ExperimentName=CpiControl
 #----- DEVT TEST PROD
-SpaceName=DEVT
-LongName="IPSLCM5A CMIP5 DEVT phase CpiControl example with large outputs"
+SpaceName=PROD
+LongName="IPSLCM5A_C CMIP5 PROD phase CpiControl : Fossil fuel equal 0  and increasing interactive atmospheric pCO2"
 TagName=IPSLCM5A_C
 #============================
@@ -21,6 +21,6 @@
 #-- Experiment dates : Beginning and ending
 #-- "YYYY-MM-DD"
-DateBegin=1850-01-01
-DateEnd=1899-12-31
+DateBegin=1800-01-01
+DateEnd=2099-12-31
 #============================
 #-- 1Y, 1M, 5D, 1D Period Length of one trunk of simulation
@@ -54,11 +54,11 @@
 #D- If you want to restart all components from the same simulation,
 #D-      put OveRule flag to 'y' and set the next 3 parameters
-OverRule=n
+OverRule=y
 #D- Last day of the experience used as restart for all components
-RestartDate=1899-12-31
+RestartDate=1850-12-31
 #D- Define restart simulation name for all components
-RestartJobName=EXP00
+RestartJobName=CpiControl00
 #D- Path Server Group Login
-RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A_C/PROD/CpiControl
 
 #========================================================================
@@ -74,4 +74,6 @@
 RestartJobName=EXP00
 RestartPath=${ARCHIVE}/IGCM_OUT/IPSLCM5A/DEVT/piControl
+# !! NEW for Carbone cycle !! Path where to find old co2.log file for restart CO2.
+SubmitRestartPath=${SUBMIT_DIR}/../CpiControl0
 # Old component name for restart (if empty, use new name)
 OldName=
@@ -193,11 +195,11 @@
 RebuildFrequency=5Y
 #D- Do we rebuild parallel output from archive (use NONE to use SCRATCHDIR as buffer)
-RebuildFromArchive=true
+RebuildFromArchive=none
 #D- If you want to produce time series, this flag determines
 #D- frequency of post-processing submission (NONE if you don't want)
-TimeSeriesFrequency=10Y
+TimeSeriesFrequency=5Y
 #D- If you want to produce seasonal average, this flag determines
 #D- the period of this average (NONE if you don't want)
-SeasonalFrequency=10Y
+SeasonalFrequency=5Y
 #D- Offset for seasonal average first start dates ; same unit as SeasonalFrequency
 #D- Usefull if you do not want to consider the first X simulation's years
Index: /CMIP5/esmControl/CpiControl1/plot_co2.jnl
===================================================================
--- /CMIP5/esmControl/CpiControl1/plot_co2.jnl	(revision 1353)
+++ /CMIP5/esmControl/CpiControl1/plot_co2.jnl	(revision 1353)
@@ -0,0 +1,24 @@
+cancel var/all
+cancel data/all
+cancel mode metafile
+
+define viewport/xlim=0.,1./ylim=0.6,1   V1
+define viewport/xlim=0.,1./ylim=0.3,0.7 V2
+define viewport/xlim=0.,1./ylim=0.,0.4  V3
+
+file/skip=1/var=v1,v2,v3,v4,v5,v6,v7,v8,v9 co2.log
+set viewport V1
+plot/nolabel v4
+ppl xlab "atmopheric pco2"
+ppl plot
+plot/o v4[i=@SBX:12]
+set viewport V2
+plot/nolabel  v7
+ppl xlab "PISCES Flux"
+ppl plot
+plot/o  v7[i=@SBX:12]
+set viewport V3
+plot/nolabel  v8
+ppl xlab "ORCHIDEE Flux"
+ppl plot
+plot/o  v8[i=@SBX:12]
