Index: /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml
===================================================================
--- /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3047)
+++ /LMDZ6/trunk/DefLists/CMIP6_ping_atmos.xml	(revision 3048)
@@ -220,11 +220,11 @@
    <field id="CMIP6_rsdcs4co2"     field_ref="rsdcs4co2"        /> <!-- P1 (W m-2) downwelling_shortwave_flux_in_air_assuming_clear_sky : Downwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold -->
    <field id="CMIP6_rsdcsaf"       field_ref="dummy_XYA"        /> <!-- P1 (W m-2) downwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsdcsafbnd"    field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsdcsbnd"      field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
+   <field id="CMIP6_rsdcsafbnd"    field_ref="dummy_not_provided"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
+   <field id="CMIP6_rsdcsbnd"      field_ref="dummy_not_provided"        /> <!-- P1 (W m-2) band_downwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
    <field id="CMIP6_rsds"          field_ref="SWdnSFC"          /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air : surface solar irradiance for UV calculations -->
    <field id="CMIP6_rsdscs"        field_ref="SWdnSFCclr"       /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : surface solar irradiance clear sky for UV calculations -->
    <field id="CMIP6_rsdscsaf"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds. -->
-   <field id="CMIP6_rsdscsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsdscsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
+   <field id="CMIP6_rsdscsafbnd"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
+   <field id="CMIP6_rsdscsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_downwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
    <field id="CMIP6_rsdscsdiff"    field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air_assuming_clear_sky : unset -->
    <field id="CMIP6_rsdsdiff"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_diffuse_downwelling_shortwave_flux_in_air : unset -->
@@ -236,17 +236,17 @@
    <field id="CMIP6_rsucs4co2"     field_ref="rsucs4co2"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_in_air_assuming_clear_sky : Upwelling clear-sky shortwave radiation calculated using carbon dioxide concentrations increased fourfold -->
    <field id="CMIP6_rsucsaf"       field_ref="dummy_XYA"        /> <!-- P1 (W m-2) upwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsucsafbnd"    field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsucsbnd"      field_ref="dummy_XYA"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
+   <field id="CMIP6_rsucsafbnd"    field_ref="dummy_not_provided"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds (following Ghan). This requires a double-call in the radiation code with precisely the same meteorology. -->
+   <field id="CMIP6_rsucsbnd"      field_ref="dummy_not_provided"        /> <!-- P1 (W m-2) band_upwelling_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
    <field id="CMIP6_rsus"          field_ref="SWupSFC"          /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air : Surface Upwelling Shortwave Radiation -->
    <field id="CMIP6_rsuscs"        field_ref="SWupSFCclr"       /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Surface Upwelling Clear-sky Shortwave Radiation -->
    <field id="CMIP6_rsuscsaf"      field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Surface Upwelling Clear-sky, Aerosol Free Shortwave Radiation -->
-   <field id="CMIP6_rsuscsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (ACP, 2013). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsuscsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
+   <field id="CMIP6_rsuscsafbnd"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (ACP, 2013). This requires a double-call in the radiation code with precisely the same meteorology. -->
+   <field id="CMIP6_rsuscsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) surface_upwelling_shortwave_flux_in_air_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
    <field id="CMIP6_rsut"          field_ref="SWupTOA"          /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : at the top of the atmosphere -->
    <field id="CMIP6_rsut4co2"      field_ref="rsut4co2"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux : TOA Outgoing Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
    <field id="CMIP6_rsutcs"        field_ref="SWupTOAclr"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated in the absence of clouds. -->
    <field id="CMIP6_rsutcs4co2"    field_ref="rsutcs4co2"       /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : TOA Outgoing Clear-Sky Shortwave Radiation calculated using carbon dioxide concentrations increased fourfold -->
-   <field id="CMIP6_rsutcsafbnd"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
-   <field id="CMIP6_rsutcsbnd"     field_ref="dummy_XY"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
+   <field id="CMIP6_rsutcsafbnd"   field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) band_toa_outgoing_shortwave_flux_assuming_clean_clear_sky : Calculated in the absence of aerosols and clouds, following Ghan (2013, ACP). This requires a double-call in the radiation code with precisely the same meteorology. -->
+   <field id="CMIP6_rsutcsbnd"     field_ref="dummy_not_provided"         /> <!-- P1 (W m-2) toa_outgoing_shortwave_flux_assuming_clear_sky : Calculated with aerosols but without clouds. This is a standard clear-sky calculation -->
    <field id="CMIP6_rtmt"          field_ref="nettop"           /> <!-- P1 (W m-2) net_downward_radiative_flux_at_top_of_atmosphere_model : Net Downward Radiative Flux at Top of Model : I.e., at the top of that portion of the atmosphere where dynamics are explicitly treated by the model. This is reported only if it differs from the net downward radiative flux at the top of the atmosphere. -->
    <field id="CMIP6_rv"            field_ref="dummy_XY"         /> <!-- P1 (s-1) atmosphere_relative_vorticity : Relative Vorticity at 850 hPa -->
@@ -267,5 +267,5 @@
    <field id="CMIP6_snrefr"        field_ref="dummy_XY"         /> <!-- P1 (kg m-2 s-1) surface_snow_and_ice_refreezing_flux : Re-freezing of water in the snow -->
    <field id="CMIP6_snwc"          field_ref="dummy_XY"         /> <!-- P1 (kg m-2) canopy_snow_amount : Total water mass of the snowpack (liquid or frozen), averaged over a grid cell and interecepted by the canopy. -->
-   <field id="CMIP6_solbnd"        field_ref="dummy_XY"         /> <!-- P1 (W m-2) band_solar_insolation : Top-of-Atmosphere Solar Insolation for each band -->
+   <field id="CMIP6_solbnd"        field_ref="solbnd"         /> <!-- P1 (W m-2) band_solar_insolation : Top-of-Atmosphere Solar Insolation for each band -->
    <field id="CMIP6_swsffluxaero"  field_ref="dummy_XY"         /> <!-- P2 (W m-2) shortwave__flux_due_to_volcanic_aerosols_at__the_surface : shortwave heating rate due to volcanic aerosols to be diagnosed through double radiation call, zonal average values required -->
    <field id="CMIP6_swsrfasdust"   field_ref="dummy_XY"         /> <!-- P1 (W m-2) tendency_of_all_sky_surface_shortwave_flux_due_to_dust_ambient_aerosol_particles : Balkanski - LSCE -->
Index: /LMDZ6/trunk/DefLists/context_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/context_lmdz.xml	(revision 3047)
+++ /LMDZ6/trunk/DefLists/context_lmdz.xml	(revision 3048)
@@ -61,4 +61,6 @@
     <axis id="bnds" standard_name="bounds" unit="1" >
     </axis>
+    <axis id="spectband" standard_name="Sensor Band Central Radiation Wavenumber" unit="m-1">
+    </axis>
 
 <!-- Cosp axis definitions-->
@@ -109,4 +111,9 @@
         <domain id="dom_glo" />
         <axis id="plev" />
+     </grid>
+
+     <grid id="grid_glo_spectband">
+        <domain id="dom_glo" />
+        <axis id="spectband" />
      </grid>
 
Index: /LMDZ6/trunk/DefLists/field_def_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3047)
+++ /LMDZ6/trunk/DefLists/field_def_lmdz.xml	(revision 3048)
@@ -637,12 +637,12 @@
         <field id="dtlif"    long_name="Orography dT"    unit="K/s" />
         <field id="dthin"    long_name="Hines GWD dT"    unit="K/s" />
-        <field id="rsu"    long_name="SW upward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rsd"    long_name="SW downward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rlu"    long_name="LW upward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rld"    long_name="LW downward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rsucs"    long_name="SW CS upward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rsdcs"    long_name="SW CS downward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rlucs"    long_name="LW CS upward radiation"    unit="W m-2" enabled="FALSE" />
-        <field id="rldcs"    long_name="LW CS downward radiation"    unit="W m-2" enabled="FALSE" />
+        <field id="rsu"    long_name="SW upward radiation"    unit="W m-2" />
+        <field id="rsd"    long_name="SW downward radiation"    unit="W m-2" />
+        <field id="rlu"    long_name="LW upward radiation"    unit="W m-2" />
+        <field id="rld"    long_name="LW downward radiation"    unit="W m-2" />
+        <field id="rsucs"    long_name="SW CS upward radiation"    unit="W m-2" />
+        <field id="rsdcs"    long_name="SW CS downward radiation"    unit="W m-2" />
+        <field id="rlucs"    long_name="LW CS upward radiation"    unit="W m-2" />
+        <field id="rldcs"    long_name="LW CS downward radiation"    unit="W m-2" />
         <field id="tnt"    long_name="Tendency of air temperature"    unit="K s-1" />
         <field id="tntc"    long_name="Tendency of air temperature due to Moist Convection"    unit="K s-1" />
@@ -783,4 +783,8 @@
     </field_group>
 
+    <field_group id="fields_solbnd_3D" grid_ref="grid_glo_spectband" >
+      <field id="solbnd"    long_name="Top-of-Atmosphere Solar Insolation for each band"    unit="W m-2" />
+    </field_group>
+
     <field_group id="fields_COSP_CALIPSO_2D" grid_ref="grid_glo" freq_op="3h">
       <field id="cllcalipso"    long_name="Lidar Low-level Cloud Fraction"   unit="1"  detect_missing_value=".true." />
Index: /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml
===================================================================
--- /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 3047)
+++ /LMDZ6/trunk/DefLists/file_def_histmth_lmdz.xml	(revision 3048)
@@ -660,4 +660,9 @@
             </field_group>
 
+            <!-- VARS 3D -->
+            <field_group operation="average" freq_op="1ts" grid_ref="grid_glo_spectband">
+                <field field_ref="solbnd" level="4" />
+            </field_group>
+
         </file>
 
Index: /LMDZ6/trunk/libf/phylmd/clesphys.h
===================================================================
--- /LMDZ6/trunk/libf/phylmd/clesphys.h	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/clesphys.h	(revision 3048)
@@ -11,4 +11,5 @@
        LOGICAL ok_limitvrai
        LOGICAL ok_all_xml
+       LOGICAL ok_lwoff
        INTEGER nbapp_rad, iflag_con, nbapp_cv, nbapp_wk, iflag_ener_conserv
        REAL co2_ppm, co2_ppm0, solaire
@@ -137,5 +138,5 @@
      &     , iflag_ice_thermo, ok_gwd_rando, NSW, iflag_albedo          &
      &     , ok_chlorophyll,ok_conserv_q, adjust_tropopause             &
-     &     , ok_daily_climoz, ok_all_xml                                &
+     &     , ok_daily_climoz, ok_all_xml, ok_lwoff                      &
      &     , iflag_phytrac
      
Index: /LMDZ6/trunk/libf/phylmd/conf_phys_m.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/conf_phys_m.F90	(revision 3048)
@@ -91,4 +91,5 @@
     LOGICAL, SAVE       :: ok_newmicro_omp
     LOGICAL, SAVE       :: ok_all_xml_omp
+    LOGICAL, SAVE       :: ok_lwoff_omp
     LOGICAL, SAVE       :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp        
     LOGICAL, SAVE       :: ok_LES_omp   
@@ -294,4 +295,13 @@
     ok_all_xml_omp = .FALSE.
     CALL getin('ok_all_xml', ok_all_xml_omp)
+
+    !
+    !Config Key  = ok_lwoff
+    !Config Desc = inhiber l effet radiatif LW des nuages
+    !Config Def  = .FALSE.
+    !Config Help = 
+    !
+    ok_lwoff_omp = .FALSE.
+    CALL getin('ok_lwoff', ok_lwoff_omp)
     !
 
@@ -2245,4 +2255,5 @@
 
     ok_all_xml = ok_all_xml_omp
+    ok_lwoff = ok_lwoff_omp
     ok_newmicro = ok_newmicro_omp
     ok_journe = ok_journe_omp
@@ -2326,5 +2337,4 @@
     cvl_corr = cvl_corr_omp
     ok_lic_melt = ok_lic_melt_omp
-    ok_lic_cond = ok_lic_cond_omp
     f_cdrag_ter=f_cdrag_ter_omp
     f_cdrag_oce=f_cdrag_oce_omp
@@ -2504,5 +2514,4 @@
     write(lunout,*)' cvl_corr=', cvl_corr
     write(lunout,*)'ok_lic_melt=', ok_lic_melt
-    write(lunout,*)'ok_lic_cond=', ok_lic_cond
     write(lunout,*)'cycle_diurne=',cycle_diurne
     write(lunout,*)'soil_model=',soil_model
Index: /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90	(revision 3048)
@@ -1417,4 +1417,6 @@
   TYPE(ctrl_out), SAVE :: o_lcc3dstra = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'lcc3dstra', 'Stratiform cloud liquid fraction', '1', (/ ('', i=1, 10) /))
+  TYPE(ctrl_out), SAVE :: o_solbnd = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
+    'solbnd', 'Top-of-Atmosphere Solar Insolation for each band', 'W m-2', (/ ('', i=1, 10) /))
   TYPE(ctrl_out), SAVE :: o_stratomask = ctrl_out((/ 2,  6, 10, 10, 10, 10, 11, 11, 11, 11/), &
     'stratomask', 'Stratospheric fraction', '1', (/ ('', i=1, 10) /))
Index: /LMDZ6/trunk/libf/phylmd/phys_output_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_mod.F90	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_mod.F90	(revision 3048)
@@ -137,4 +137,9 @@
     REAL :: ini_heure
 #endif
+    INTEGER                         :: ISW
+    REAL, DIMENSION(NSW)            :: wl1_sun, wl2_sun !wavelength bounds (in um) for SW
+    REAL, DIMENSION(NSW)            :: wn1_sun, wn2_sun !wavenumber bounds (in m-1) for SW 
+    REAL, DIMENSION(NSW)            :: spectband  !mean wavenumb. of each sp.band
+    REAL, DIMENSION(NSW,2)          :: spbnds_sun !bounds of spectband
 
     WRITE(lunout,*) 'Debut phys_output_mod.F90'
@@ -354,4 +359,48 @@
      CALL wxios_add_vaxis("Alt", &
             levmax(iff) - levmin(iff) + 1, pseudoalt)
+
+    IF (NSW.EQ.6) THEN
+!
+!wl1_sun: minimum bound of wavelength (in um)
+!
+      wl1_sun(1)=0.180
+      wl1_sun(2)=0.250
+      wl1_sun(3)=0.440
+      wl1_sun(4)=0.690
+      wl1_sun(5)=1.190
+      wl1_sun(6)=2.380
+!
+!wl2_sun: maximum bound of wavelength (in um)
+!
+      wl2_sun(1)=0.250
+      wl2_sun(2)=0.440
+      wl2_sun(3)=0.690
+      wl2_sun(4)=1.190
+      wl2_sun(5)=2.380
+      wl2_sun(6)=4.000
+!
+    ELSE IF(NSW.EQ.2) THEN
+!
+!wl1_sun: minimum bound of wavelength (in um)
+!
+      wl1_sun(1)=0.250
+      wl1_sun(2)=0.690
+!
+!wl2_sun: maximum bound of wavelength (in um)
+!
+      wl2_sun(1)=0.690
+      wl2_sun(2)=4.000
+    ENDIF
+
+    DO ISW=1, NSW
+     wn1_sun(ISW)=1.e+6/wl1_sun(ISW) 
+     wn2_sun(ISW)=1.e+6/wl2_sun(ISW) 
+     spbnds_sun(ISW,1)=wn2_sun(ISW)
+     spbnds_sun(ISW,2)=wn1_sun(ISW)
+     spectband(ISW)=(wn1_sun(ISW)+wn2_sun(ISW))/2
+    ENDDO
+!
+!!! ajout axe vertical spectband : solar band number
+    CALL wxios_add_vaxis("spectband", NSW, spectband, positif='down')
    ELSE
     ! NMC files
Index: /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90	(revision 3048)
@@ -119,5 +119,5 @@
          o_swtoacf_zero, o_swsrfcf_zero, &
          o_topswai, o_solswai, o_toplwai, o_sollwai, o_scdnc, &
-         o_cldncl, o_reffclws, o_reffclwc, o_stratomask,&
+         o_cldncl, o_reffclws, o_reffclwc, o_solbnd, o_stratomask,&
          o_cldnvi, o_lcc, o_lcc3d, o_lcc3dcon, &
          o_lcc3dstra, o_reffclwtop, o_ec550aer, &
@@ -389,4 +389,5 @@
     REAL, DIMENSION (klon,klev) :: zx_tmp_fi3d, zpt_conv
     REAL, DIMENSION (klon,klev+1) :: zx_tmp_fi3d1
+    REAL, DIMENSION (klon,NSW) :: zx_tmp_fi3dsp
     CHARACTER (LEN=4)              :: bb2
     INTEGER, DIMENSION(nbp_lon*nbp_lat)  :: ndex2d
@@ -1383,4 +1384,18 @@
        CALL histwrite_phy(o_zfull,zphi/RG)
 
+!solbnd begin
+#ifdef CPP_RRTM
+      IF (iflag_rrtm.EQ.1) THEN
+       IF (vars_defined) THEN
+        DO ISW=1, NSW
+          zx_tmp_fi3dsp(:,ISW) = swdn(:,klevp1)*swradcorr(:)*RSUN(ISW)
+        ENDDO
+        CALL histwrite_phy(o_solbnd, zx_tmp_fi3dsp)
+       ENDIF
+      ENDIF
+#endif
+
+!solbnd end
+
        IF (flag_aerosol_strat.EQ.2) THEN
          CALL histwrite_phy(o_stratomask, stratomask)
Index: /LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 3047)
+++ /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 3048)
@@ -1105,4 +1105,8 @@
     REAL, dimension(klon, klev) :: cldfrarad   ! fraction nuageuse
 
+    !lwoff=y : offset LW CRE for radiation code and other schemes
+    REAL, SAVE :: betalwoff 
+    !OMP THREADPRIVATE(betalwoff)
+!
     INTEGER :: nbtr_tmp ! Number of tracer inside concvl
     REAL, dimension(klon,klev) :: sh_in ! Specific humidity entering in phytrac
@@ -1788,4 +1792,17 @@
        WRITE(*,*)'lat2_beta=',lat2_beta
        WRITE(*,*)'mskocean_beta=',mskocean_beta
+
+      !lwoff=y : offset LW CRE for radiation code and other schemes
+      !lwoff=y : betalwoff=1.
+      betalwoff=0.
+      IF (ok_lwoff) THEN
+         betalwoff=1.
+      ENDIF
+      WRITE(*,*)'ok_lwoff=',ok_lwoff
+      ! 
+      !lwoff=y to begin only sollw and sollwdown are set up to CS values
+      sollw = sollw + betalwoff * (sollw0 - sollw)
+      sollwdown(:)= sollwdown(:) + betalwoff *(-1.*ZFLDN0(:,1) - &
+                    sollwdown(:))
     ENDIF
     !
@@ -3603,4 +3620,7 @@
           ! global
           !
+!IM 251017 begin
+                print*,'physiq betaCRF global zdtime=',zdtime
+!IM 251017 end
           DO k=1, klev
              DO i=1, klon
@@ -3717,4 +3737,5 @@
              print *,' ->radlwsw, number 1 '
           ENDIF
+
           !
           CALL radlwsw &
@@ -3733,4 +3754,5 @@
                tau_aero_lw_rrtm, & 
                cldtaupirad,new_aod, &
+!              zqsat, flwcrad, fiwcrad, &
                zqsat, flwc, fiwc, &
                ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
@@ -3755,4 +3777,14 @@
                ZSWFT0_i, ZFSDN0, ZFSUP0)
 
+          !lwoff=y, betalwoff=1. : offset LW CRE for radiation code and other
+          !schemes
+          toplw = toplw + betalwoff * (toplw0 - toplw)
+          sollw = sollw + betalwoff * (sollw0 - sollw)
+          lwdn = lwdn + betalwoff * (lwdn0 - lwdn)
+          lwup = lwup + betalwoff * (lwup0 - lwup)
+          sollwdown(:)= sollwdown(:) + betalwoff *(-1.*ZFLDN0(:,1) - &
+                        sollwdown(:))
+          cool = cool + betalwoff * (cool0 - cool)
+ 
 #ifndef CPP_XIOS
           !--OB 30/05/2016 modified 21/10/2016
@@ -3805,4 +3837,5 @@
                      tau_aero_lw_rrtm, &
                      cldtaupi,new_aod, &
+!                    zqsat, flwcrad, fiwcrad, &
                      zqsat, flwc, fiwc, &
                      ref_liq, ref_ice, ref_liq_pi, ref_ice_pi, &
@@ -3826,6 +3859,5 @@
                      ZLWFT0_i, ZFLDN0, ZFLUP0, &
                      ZSWFT0_i, ZFSDN0, ZFSUP0)
-          endif
-          !
+          endif !ok_4xCO2atm
        ENDIF ! aerosol_couple
        itaprad = 0
