Index: LMDZ6/branches/IPSLCM6.0.15/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90
===================================================================
--- LMDZ6/branches/IPSLCM6.0.15/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 3607)
+++ LMDZ6/branches/IPSLCM6.0.15/libf/dynphy_lonlat/phylmd/etat0phys_netcdf.F90	(revision 3609)
@@ -113,4 +113,5 @@
   INTEGER :: flag_aerosol
   INTEGER :: flag_aerosol_strat
+  INTEGER :: flag_volc_surfstrat
   LOGICAL :: flag_aer_feedback
   LOGICAL :: flag_bc_internal_mixture
@@ -133,5 +134,5 @@
                    iflag_cldcon,                                          &
                    iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs,              &
-                   ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan,            &
+                   ok_ade,ok_aie,ok_alw,ok_cdnc,ok_volcan,flag_volc_surfstrat,&
                    aerosol_couple, chemistry_couple, flag_aerosol,        &
                    flag_aerosol_strat,                                    & 
Index: LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/conf_phys_m.F90
===================================================================
--- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/conf_phys_m.F90	(revision 3607)
+++ LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/conf_phys_m.F90	(revision 3609)
@@ -17,5 +17,5 @@
        iflag_cld_th, &
        iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
-       ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, &
+       ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, &
        chemistry_couple, flag_aerosol, flag_aerosol_strat,         &
        flag_aer_feedback, new_aod, &
@@ -64,4 +64,5 @@
     ! bl95_b*: parameters in the formula to link CDNC to aerosol mass conc 
     ! ok_volcan: activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
+    ! flag_volc_surfstrat: VolMIP flag, activate forcing surface cooling rate (=1), strato heating rate (=2) or nothing (=0, default)
     !
 
@@ -77,4 +78,5 @@
     INTEGER              :: flag_aerosol
     INTEGER              :: flag_aerosol_strat
+    INTEGER              :: flag_volc_surfstrat !VolMIP flag for surf/strat runs
     LOGICAL              :: flag_aer_feedback
     LOGICAL              :: flag_bc_internal_mixture
@@ -99,4 +101,5 @@
     INTEGER, SAVE       :: flag_aerosol_omp
     INTEGER, SAVE       :: flag_aerosol_strat_omp
+    INTEGER, SAVE       :: flag_volc_surfstrat_omp !VolMIP flag for surf/strat runs
     LOGICAL, SAVE       :: flag_aer_feedback_omp
     LOGICAL, SAVE       :: flag_bc_internal_mixture_omp
@@ -407,4 +410,14 @@
 
     !
+    !Config Key  = flag_volc_surfstrat
+    !Config Desc = impose cooling rate at the surface (=1), 
+    !              heating rate in the strato (=2), or nothing (=0)
+    !Config Def  = 0
+    !Config Help = Used in radlwsw_m.F
+    !
+    flag_volc_surfstrat_omp = 0
+    CALL getin('flag_volc_surfstrat', flag_volc_surfstrat_omp)
+    
+    !
     !Config Key  = aerosol_couple
     !Config Desc = read aerosol in file or calcul by inca
@@ -2304,4 +2317,5 @@
     ok_cdnc = ok_cdnc_omp
     ok_volcan = ok_volcan_omp
+    flag_volc_surfstrat=flag_volc_surfstrat_omp
     aerosol_couple = aerosol_couple_omp
     chemistry_couple = chemistry_couple_omp
@@ -2522,4 +2536,8 @@
     IF (flag_bc_internal_mixture .AND. flag_aerosol.NE.6) THEN 
        CALL abort_physic('conf_phys', 'flag_bc_internal_mixture can only be activated with flag_aerosol=6',1)
+    ENDIF
+
+    IF (flag_volc_surfstrat.LT.0.OR.flag_volc_surfstrat.GT.2) THEN
+       CALL abort_physic('conf_phys', 'flag_volc_surfstrat can only be 0 1 or 2',1)
     ENDIF
 
@@ -2637,4 +2655,5 @@
     WRITE(lunout,*)' ok_ade = ',ok_ade
     WRITE(lunout,*)' ok_volcan = ',ok_volcan
+    WRITE(lunout,*)' flag_volc_surfstrat = ',flag_volc_surfstrat
     WRITE(lunout,*)' ok_aie = ',ok_aie
     WRITE(lunout,*)' ok_alw = ',ok_alw
Index: LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90
===================================================================
--- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90	(revision 3607)
+++ LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90	(revision 3609)
@@ -331,10 +331,13 @@
     !======================================================================
     LOGICAL, SAVE :: ok_volcan ! pour activer les diagnostics volcaniques
+    !$OMP THREADPRIVATE(ok_volcan)
+    INTEGER, SAVE :: flag_volc_surfstrat ! pour imposer le cool/heat rate à la surf/strato
+    !$OMP THREADPRIVATE(flag_volc_surfstrat)
     LOGICAL ok_cvl  ! pour activer le nouveau driver pour convection KE
     PARAMETER (ok_cvl=.TRUE.)
     LOGICAL ok_gust ! pour activer l'effet des gust sur flux surface
     PARAMETER (ok_gust=.FALSE.)
-    integer iflag_radia     ! active ou non le rayonnement (MPL)
-    save iflag_radia
+    INTEGER iflag_radia     ! active ou non le rayonnement (MPL)
+    SAVE iflag_radia
     !$OMP THREADPRIVATE(iflag_radia)
     !======================================================================
@@ -1238,5 +1241,5 @@
             fact_cldcon, facttemps,ok_newmicro,iflag_radia, &
             iflag_cld_th,iflag_ratqs,ratqsbas,ratqshaut,tau_ratqs, &
-            ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, aerosol_couple, &
+            ok_ade, ok_aie, ok_alw, ok_cdnc, ok_volcan, flag_volc_surfstrat, aerosol_couple, &
             chemistry_couple, flag_aerosol, flag_aerosol_strat,         &
             flag_aer_feedback, new_aod, &
@@ -3913,5 +3916,5 @@
                t_seri,q_seri,wo, &
                cldfrarad, cldemirad, cldtaurad, &
-               ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, &
+               ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, flag_volc_surfstrat, &
                flag_aerosol, flag_aerosol_strat, flag_aer_feedback, &
                tau_aero, piz_aero, cg_aero, &
@@ -3999,5 +4002,5 @@
                      t_seri,q_seri,wo, &
                      cldfrarad, cldemirad, cldtaurad, &
-                     ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, &
+                     ok_ade.OR.flag_aerosol_strat.GT.0, ok_aie, ok_volcan, flag_volc_surfstrat, &
                      flag_aerosol, flag_aerosol_strat, flag_aer_feedback, &
                      tau_aero, piz_aero, cg_aero, &
Index: LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/radlwsw_m.F90
===================================================================
--- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/radlwsw_m.F90	(revision 3607)
+++ LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/radlwsw_m.F90	(revision 3609)
@@ -16,5 +16,5 @@
    t,q,wo,&
    cldfra, cldemi, cldtaupd,&
-   ok_ade, ok_aie, ok_volcan, flag_aerosol,&
+   ok_ade, ok_aie, ok_volcan, flag_volc_surfstrat, flag_aerosol,&
    flag_aerosol_strat, flag_aer_feedback, &
    tau_aero, piz_aero, cg_aero,&
@@ -102,4 +102,5 @@
   ! ok_aie---input-L- apply the Aerosol Indirect Effect or not?
   ! ok_volcan-input-L- activate volcanic diags (SW heat & LW cool rate, SW & LW flux)
+  ! flag_volc_surfstrat-input-I- activate volcanic surf cooling or strato heating (or nothing)
   ! flag_aerosol-input-I- aerosol flag from 0 to 6
   ! flag_aerosol_strat-input-I- use stratospheric aerosols flag (0, 1, 2)
@@ -200,4 +201,5 @@
   LOGICAL, INTENT(in)  :: ok_volcan                                      ! produce volcanic diags (SW/LW heat flux and rate)
   LOGICAL              :: lldebug
+  INTEGER, INTENT(in)  :: flag_volc_surfstrat                            ! allow to impose volcanic cooling rate at surf or heating in strato
   INTEGER, INTENT(in)  :: flag_aerosol                                   ! takes value 0 (no aerosol) or 1 to 6 (aerosols)
   INTEGER, INTENT(in)  :: flag_aerosol_strat                             ! use stratospheric aerosols
@@ -319,4 +321,6 @@
   REAL(KIND=8) zswadaero(kdlon,kflev+1)                       ! SW Aerosol direct forcing
   REAL(KIND=8) zlwadaero(kdlon,kflev+1)                       ! LW Aerosol direct forcing
+!-- VolMIP
+  REAL(KIND=8) volmip_solsw(kdlon) ! SW clear sky in the case of VOLMIP
 !-LW by CK
   REAL(KIND=8) ztoplwadaero(kdlon), zsollwadaero(kdlon)     ! LW Aerosol direct forcing at TOAand surface
@@ -875,4 +879,5 @@
          ZTOPLWAIAERO,ZSOLLWAIAERO, &
          ZLWADAERO, & !--NL
+         volmip_solsw, flag_volc_surfstrat, & !--VOLMIP
          ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat, &
          flag_aer_feedback) ! flags aerosols
@@ -1025,4 +1030,11 @@
 !     print*,'OK2'
 
+!!--add VOLMIP (surf cool or strat heat activate)
+      IF (flag_volc_surfstrat > 0) THEN
+         DO i = 1, kdlon
+            zsolsw(i)    = volmip_solsw(i)*fract(i)
+         ENDDO
+      ENDIF
+
 ! extrait de SW_AR4
 !     DO k = 1, KFLEV
Index: LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/recmwf_aero.F90
===================================================================
--- LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/recmwf_aero.F90	(revision 3607)
+++ LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/recmwf_aero.F90	(revision 3609)
@@ -36,4 +36,6 @@
  & PTOPLWAIAERO,PSOLLWAIAERO,&
  & PLWADAERO,& !--NL
+!--ajout volmip 
+ & volmip_solsw, flag_volc_surfstrat,&
 !..end
  & ok_ade, ok_aie, ok_volcan, flag_aerosol,flag_aerosol_strat,flag_aer_feedback)
@@ -258,4 +260,7 @@
 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFLCCDN(KPROMA,KLEV+1) ! LW clear sky clean (no aerosol) flux down
 REAL(KIND=JPRB)   ,INTENT(OUT)   :: PFLCCUP(KPROMA,KLEV+1) ! LW clear sky clean (no aerosol) flux up
+!--ajout VOLMIP
+REAL(KIND=JPRB)   ,INTENT(OUT)   :: volmip_solsw(KPROMA) ! SW clear sky in the case of VOLMIP
+INTEGER, INTENT(IN)              :: flag_volc_surfstrat !--VOlMIP Modif
 
 !     ==== COMPUTED IN RADITE ===
@@ -794,4 +799,25 @@
 ENDIF
 
+!--VolMIP Strat/Surf
+!--only ok_ade + ok_aie case treated
+IF (ok_ade.AND.ok_aie.AND.ok_volcan) THEN
+   !--in this case the fluxes used for the heating rates come from case 4 but SW surface radiation is kept from case 2
+   IF (flag_volc_surfstrat.EQ.2) THEN ! STRAT HEATING
+      volmip_solsw(:)= ZFSDN_AERO(:,1,2)-ZFSUP_AERO(:,1,2)
+   ELSEIF (flag_volc_surfstrat.EQ.1) THEN ! SURF COOLING
+      !--in this case the fluxes used for the heating rates come from case 2 but SW surface radiation is kept from case 4
+      PFSUP(:,:) =    ZFSUP_AERO(:,:,2)
+      PFSDN(:,:) =    ZFSDN_AERO(:,:,2)
+      PFSCUP(:,:) =   ZFSUP0_AERO(:,:,2)
+      PFSCDN(:,:) =   ZFSDN0_AERO(:,:,2)
+      PFLUX(:,1,:) =  LWUP_AERO(:,:,2)
+      PFLUX(:,2,:) =  LWDN_AERO(:,:,2)
+      PFLUC(:,1,:) =  LWDN0_AERO(:,:,2) 
+      PFLUC(:,2,:) =  LWDN0_AERO(:,:,2)
+      volmip_solsw(:)= ZFSDN_AERO(:,1,4)-ZFSUP_AERO(:,1,4)
+   ENDIF
+ENDIF
+!--End VolMIP Strat/Surf
+
 IF (swaerofree_diag) THEN
 ! copy shortwave clear-sky clean (no aerosol) case
