Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.card
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.card	(revision 996)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.card	(revision 1000)
@@ -16,4 +16,10 @@
 LMDZ_Freq_aero=120
 LMDZ_Length_aero=12
+
+# Set COSP activation and Outputs frequency (monthly, daily, HF) = y/n
+LMDZ_COSP_OK=n
+LMDZ_COSP_monthly=y
+LMDZ_COSP_daily=y
+LMDZ_COSP_hf=n
 
 [InitialStateFiles]
@@ -42,4 +48,6 @@
 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/cosp_input_nl.txt,                .),    \
+	(${SUBMIT_DIR}/PARAM/cosp_output_nl.txt,               .),    \
 	(${SUBMIT_DIR}/PARAM/run.def, .), \
 	(${SUBMIT_DIR}/PARAM/traceur.def, .)
@@ -53,9 +61,12 @@
 
 [OutputFiles]
-List=	(histmth.nc,      ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc,      Post_1M_histmth), \
-	(histmthNMC.nc,   ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthNMC.nc,   Post_1M_histmthNMC), \
-	(dynzon.nc,       ${R_OUT_ATM_O_M}/${PREFIX}_1M_dynzon.nc,       NONE), \
-	(histday.nc,      ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc,      Post_1D_histday), \
-	(histhf.nc,       ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhf.nc,       Post_HF_histhf)
+List=	(histmth.nc,      ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmth.nc,      Post_1M_histmth),     \
+	(histmthCOSP.nc,  ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthCOSP.nc,  Post_1M_histmthCOSP), \
+	(histmthNMC.nc,   ${R_OUT_ATM_O_M}/${PREFIX}_1M_histmthNMC.nc,   Post_1M_histmthNMC),  \
+	(dynzon.nc,       ${R_OUT_ATM_O_M}/${PREFIX}_1M_dynzon.nc,       Post_1M_dynzon),      \
+	(histday.nc,      ${R_OUT_ATM_O_D}/${PREFIX}_1D_histday.nc,      Post_1D_histday),     \
+	(histdayCOSP.nc,  ${R_OUT_ATM_O_D}/${PREFIX}_1D_histdayCOSP.nc,  Post_1D_histdayCOSP), \
+	(histhf.nc,       ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhf.nc,       Post_HF_histhf),      \
+	(histhfCOSP.nc,   ${R_OUT_ATM_O_H}/${PREFIX}_HF_histhfCOSP.nc,   Post_HF_histhfCOSP)
 
 [Post_1M_histmth]
@@ -67,4 +78,13 @@
 ChunckJob3D = 100Y
 Seasonal=ON
+
+[Post_1M_histmthCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
 
 [Post_1M_histmthNMC]
@@ -95,4 +115,13 @@
 Seasonal=OFF
 
+[Post_1D_histdayCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
 [Post_HF_histhf]
 Patches= (Patch_20091030_histcom_time_axis)
@@ -103,2 +132,12 @@
 ChunckJob3D = OFF
 Seasonal=OFF
+
+[Post_HF_histhfCOSP]
+Patches = ()
+GatherWithInternal = (lon, lat, presnivs, time_counter, aire)
+TimeSeriesVars2D = ()
+ChunckJob2D = NONE
+TimeSeriesVars3D = ()
+ChunckJob3D = NONE
+Seasonal=OFF
+
Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.driver
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.driver	(revision 996)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/COMP/lmdz.driver	(revision 1000)
@@ -69,4 +69,11 @@
     eval LMDZ_Freq_aero=\${lmdz_UserChoices_LMDZ_Freq_aero} > /dev/null 2>&1
     eval LMDZ_Length_aero=\${lmdz_UserChoices_LMDZ_Length_aero} > /dev/null 2>&1
+
+    ##  Read LMDZ_COSP_monthly  LMDZ_COSP_daily and LMDZ_COSP_hf in lmdz.card
+    eval LMDZ_COSP_OK=\${lmdz_UserChoices_LMDZ_COSP_OK} > /dev/null 2>&1
+    eval LMDZ_COSP_monthly=\${lmdz_UserChoices_LMDZ_COSP_monthly} > /dev/null 2>&1
+    eval LMDZ_COSP_daily=\${lmdz_UserChoices_LMDZ_COSP_daily} > /dev/null 2>&1
+    eval LMDZ_COSP_hf=\${lmdz_UserChoices_LMDZ_COSP_hf} > /dev/null 2>&1
+
 
     IGCM_debug_PopStack "ATM_Initialize"
@@ -143,4 +150,8 @@
     LMDZ_sed physiq.def ecrit_mth   ${LMDZ_ecrit_mth}
     LMDZ_sed physiq.def ecrit_ISCCP ${LMDZ_ecrit_ISCCP}
+    LMDZ_sed physiq.def ok_cosp     ${LMDZ_COSP_OK}
+    LMDZ_sed physiq.def ok_mensuelCOSP  ${LMDZ_COSP_monthly}
+    LMDZ_sed physiq.def ok_journeCOSP   ${LMDZ_COSP_daily}
+    LMDZ_sed physiq.def ok_hfCOSP   ${LMDZ_COSP_hf}
 
     ## gcm.def parameters : no change since gcm.def_${RESOL_ATM_3D} is used and already modified
Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_input_nl.txt
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_input_nl.txt	(revision 1000)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_input_nl.txt	(revision 1000)
@@ -0,0 +1,103 @@
+! (c) British Crown Copyright 2008, the Met Office.
+! All rights reserved.
+! 
+! Redistribution and use in source and binary forms, with or without modification, are permitted 
+! provided that the following conditions are met:
+! 
+!     * Redistributions of source code must retain the above copyright notice, this list 
+!       of conditions and the following disclaimer.
+!     * Redistributions in binary form must reproduce the above copyright notice, this list
+!       of conditions and the following disclaimer in the documentation and/or other materials 
+!       provided with the distribution.
+!     * Neither the name of the Met Office nor the names of its contributors may be used 
+!       to endorse or promote products derived from this software without specific prior written 
+!       permission.
+! 
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
+! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
+! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+! Namelist that sets up the main COSP options
+&COSP_INPUT
+  CMOR_NL='./cmor/cosp_cmor_nl.txt', ! CMOR namelist
+  NPOINTS_IT=10000,! Max number of gridpoints to be processed in one iteration
+  NCOLUMNS=20,  ! Number of subcolumns
+  NLEVELS=39,   ! Number of model levels 
+  USE_VGRID=.true., ! Use fixed vertical grid for outputs? (if .true. then you need to define number of levels with Nlr)
+  NLR=40,       ! Number of levels in statistical outputs (only used if USE_VGRID=.true.)
+  CSAT_VGRID=.true., ! CloudSat vertical grid? (if .true. then the CloudSat standard grid is used for the outputs.
+                     !  USE_VGRID needs also be .true.)
+  FINPUT='histday.nc', ! NetCDF file with 1D inputs
+!  FINPUT='cosp_input_um_2d.nc', ! NetCDF file with 2D inputs
+  !----------------------------------------------------------------------------------
+  !--------------- Inputs related to radar simulations
+  !----------------------------------------------------------------------------------
+  RADAR_FREQ=94.0, ! CloudSat radar frequency (GHz)
+  SURFACE_RADAR=0, ! surface=1, spaceborne=0
+  use_mie_tables=0,! use a precomputed lookup table? yes=1,no=0
+  use_gas_abs=1,   ! include gaseous absorption? yes=1,no=0
+  do_ray=0,        ! calculate/output Rayleigh refl=1, not=0
+  melt_lay=0,      ! melting layer model off=0, on=1
+  k2=-1,           ! |K|^2, -1=use frequency dependent default
+  use_reff=.true., ! True if you want effective radius to be used by radar simulator (always used by lidar)
+  use_precipitation_fluxes=.true.,  ! True if precipitation fluxes are input to the algorithm 
+  !----------------------------------------------------------------------------------
+  !---------------- Inputs related to lidar simulations
+  !----------------------------------------------------------------------------------
+  Nprmts_max_hydro=12, ! Max number of parameters for hydrometeor size distributions
+  Naero=1,             ! Number of aerosol species (Not used)
+  Nprmts_max_aero=1,   ! Max number of parameters for aerosol size distributions (Not used)
+  lidar_ice_type=0,    ! Ice particle shape in lidar calculations (0=ice-spheres ; 1=ice-non-spherical)
+  OVERLAP=3,   !  overlap type: 1=max, 2=rand, 3=max/rand
+  !----------------------------------------------------------------------------------
+  !---------------- Inputs related to ISCCP simulator
+  !----------------------------------------------------------------------------------
+  ISCCP_TOPHEIGHT=1,  !  1 = adjust top height using both a computed
+                       !  infrared brightness temperature and the visible
+                       !  optical depth to adjust cloud top pressure. Note
+                       !  that this calculation is most appropriate to compare
+                       !  to ISCCP data during sunlit hours.
+                      !  2 = do not adjust top height, that is cloud top
+                       !  pressure is the actual cloud top pressure
+                       !  in the model
+                      !  3 = adjust top height using only the computed
+                       !  infrared brightness temperature. Note that this
+                       !  calculation is most appropriate to compare to ISCCP
+                       !  IR only algortihm (i.e. you can compare to nighttime
+                       !  ISCCP data with this option)
+  ISCCP_TOPHEIGHT_DIRECTION=1,   ! direction for finding atmosphere pressure level
+                                 ! with interpolated temperature equal to the radiance
+                                 ! determined cloud-top temperature
+                                 ! 1 = find the *lowest* altitude (highest pressure) level
+                                 ! with interpolated temperature equal to the radiance
+                                 ! determined cloud-top temperature
+                                 ! 2 = find the *highest* altitude (lowest pressure) level
+                                 ! with interpolated temperature equal to the radiance 
+                                 ! determined cloud-top temperature
+                                 ! ONLY APPLICABLE IF top_height EQUALS 1 or 3
+                                 ! 1 = default setting, and matches all versions of 
+                                 ! ISCCP simulator with versions numbers 3.5.1 and lower
+                                 ! 2 = experimental setting  
+  !----------------------------------------------------------------------------------
+  !-------------- RTTOV inputs
+  !----------------------------------------------------------------------------------
+  Platform=1,    ! satellite platform
+  Satellite=15,  ! satellite
+  Instrument=0,  ! instrument
+  Nchannels=8,   ! Number of channels to be computed
+  Channels=1,3,5,6,8,10,11,13,        ! Channel numbers (please be sure that you supply Nchannels)
+  Surfem=0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,  ! Surface emissivity (please be sure that you supply Nchannels)
+  ZenAng=50.0, ! Satellite Zenith Angle
+  CO2=5.241e-04, ! Mixing ratios of trace gases
+  CH4=9.139e-07,
+  N2O=4.665e-07,
+  CO=2.098e-07
+/
+
+
Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_output_nl.txt
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_output_nl.txt	(revision 1000)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/cosp_output_nl.txt	(revision 1000)
@@ -0,0 +1,63 @@
+! (c) British Crown Copyright 2008, the Met Office.
+! All rights reserved.
+! 
+! Redistribution and use in source and binary forms, with or without modification, are permitted 
+! provided that the following conditions are met:
+! 
+!     * Redistributions of source code must retain the above copyright notice, this list 
+!       of conditions and the following disclaimer.
+!     * Redistributions in binary form must reproduce the above copyright notice, this list
+!       of conditions and the following disclaimer in the documentation and/or other materials 
+!       provided with the distribution.
+!     * Neither the name of the Met Office nor the names of its contributors may be used 
+!       to endorse or promote products derived from this software without specific prior written 
+!       permission.
+! 
+! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR 
+! IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND 
+! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+! CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
+! DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 
+! DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER 
+! IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 
+! OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+! Namelist that sets up output-related variables. It controls 
+! the instrument simulators to run and the list of variables 
+! to be written to file
+&COSP_OUTPUT
+  ! Simulator flags
+  Lradar_sim=.false.,
+  Llidar_sim=.true.,
+  Lisccp_sim=.true.,
+  Lmisr_sim=.false.,
+  ! Output variables
+  Lalbisccp=.true.,
+  Latb532=.true.,
+  Lboxptopisccp=.true.,
+  Lboxtauisccp=.true.,
+  Lcfad_dbze94=.false.,
+  Lcfad_lidarsr532=.true.,
+  Lclcalipso=.true.,
+  Lclhcalipso=.true.,
+  Lclisccp2=.true.,
+  Lcllcalipso=.true.,
+  Lclmcalipso=.true.,
+  Lcltcalipso=.true.,
+  Lctpisccp=.true.,
+  Ldbze94=.false.,
+  Ltauisccp=.true.,
+  Ltclisccp=.true.,
+  Llongitude=.false.,
+  Llatitude=.false.,
+  Lparasol_refl=.true.,
+  LclMISR=.false.,
+  Lmeantbisccp=.true.,
+  Lmeantbclrisccp=.true.,
+  ! Use lidar and radar
+  Lclcalipso2=.false.,
+  Lcltlidarradar=.false.,
+  ! These are provided for debugging or special purposes
+  Lfrac_out=.false.,
+  Lbeta_mol532=.true.,  
+/
Index: CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/physiq.def_L39
===================================================================
--- CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/physiq.def_L39	(revision 996)
+++ CONFIG/IPSLCM/IPSLCM5A/EXP00/PARAM/physiq.def_L39	(revision 1000)
@@ -206,6 +206,12 @@
 ### ok_cosp=y/n flag simulateur COSP
 ok_cosp=n
-## freq_COSP = frequence d'appel de COSP en secondes
+### freq_COSP = frequence d'appel de COSP en secondes
 freq_COSP=10800.
+### ok_mensuelCOSP=y/n sortir fichier mensuel COSP histmthCOSP.nc, =n pas de fichier histmthCOSP.nc
+ok_mensuelCOSP=y
+### ok_journeCOSP=y/n sortir fichier journalier histdayCOSP.nc, =n pas de fichier histdayCOSP.nc
+ok_journeCOSP=y
+### ok_hfCOSP=y/n, ecrire sorties  haute frequence histhfCOSP.nc, =n pas de fichier histhfCOSP.nc
+ok_hfCOSP=n
 #
 # Parametres simulateur ISCCP
