Changeset 3480


Ignore:
Timestamp:
Apr 18, 2019, 5:13:26 PM (6 years ago)
Author:
Laurent Fairhead
Message:

Integration of revisions 3425 through 3427 from IPSLCM6.0.15 branch into the trunk
LF

Location:
LMDZ6/trunk/libf/phylmd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r3479 r3480  
    14551455          CALL histwrite_phy(o_heat_volc, zx_tmp_fi3d)
    14561456          DO k=1, klev
    1457              IF (vars_defined) zx_tmp_fi3d(:,k)=cool_volc(:,k)*swradcorr(:)
     1457             IF (vars_defined) zx_tmp_fi3d(:,k)=cool_volc(:,k)
    14581458          ENDDO
    14591459          CALL histwrite_phy(o_cool_volc, zx_tmp_fi3d)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r3479 r3480  
    36883688#else
    36893689                   !--climatologies or INCA aerosols
    3690                    CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, &
     3690                   CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, ok_volcan, &
    36913691                        new_aod, flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, &
    36923692                        pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
     
    37783778             CALL readaerosolstrato1_rrtm(debut)
    37793779            ELSEIF (flag_aerosol_strat.EQ.2) THEN
    3780              CALL readaerosolstrato2_rrtm(debut)
     3780             CALL readaerosolstrato2_rrtm(debut, ok_volcan)
    37813781            ELSE
    37823782             abort_message='flag_aerosol_strat must equal 1 or 2 for rrtm=1'
  • LMDZ6/trunk/libf/phylmd/radlwsw_m.F90

    r3479 r3480  
    739739!
    740740!--OB
    741 !--aerosol TOT  - anthropogenic+natural
    742 !--aerosol NAT  - natural only
     741!--aerosol TOT  - anthropogenic+natural - index 2
     742!--aerosol NAT  - natural only          - index 1
    743743!
    744744      DO i = 1, kdlon
     
    760760!
    761761!--C. Kleinschmitt
    762 !--aerosol TOT  - anthropogenic+natural
    763 !--aerosol NAT  - natural only
     762!--aerosol TOT  - anthropogenic+natural - index 2
     763!--aerosol NAT  - natural only          - index 1
    764764!
    765765      DO i = 1, kdlon
     
    10541054           zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k)
    10551055           IF(ok_volcan) THEN
    1056               zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RDAY*RG/RCPD/PDP(i,k) !NL
    1057               zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RDAY*RG/RCPD/PDP(i,k) !NL
     1056              zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL
     1057              zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL
    10581058           ENDIF
    10591059!          print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k)
  • LMDZ6/trunk/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90

    r3479 r3480  
    66     tau_allaer, piz_allaer, &
    77     cg_allaer, m_allaer_pi, &
    8      flag_aerosol, flag_bc_internal_mixture, zrho )
     8     flag_aerosol, flag_bc_internal_mixture, zrho, ok_volcan )
    99
    1010  USE dimphy
     
    3232  LOGICAL,                        INTENT(IN)  :: flag_bc_internal_mixture
    3333  REAL, DIMENSION(klon,klev),     INTENT(IN)  :: zrho
     34  LOGICAL,                        INTENT(IN)  :: ok_volcan ! volcanic diags
    3435  !
    3536  ! Output arguments:
     
    794795         cg_allaer(i,k,2,inu)=MIN(MAX(cg_allaer(i,k,2,inu),0.0),1.0)
    795796
    796 ! NL VOLC
    797 !--natural aerosol
    798 ! (same as upper but no volc aer in strat)
    799          tau_allaer(i,k,1,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)+ &
    800                                tau_ae(i,k,id_ASBCM_phy,inu)+tau_ae(i,k,id_AIBCM_phy,inu)+   &
    801                                tau_ae(i,k,id_ASPOMM_phy,inu)+tau_ae(i,k,id_AIPOMM_phy,inu)+ &
    802                                tau_ae(i,k,id_ASSSM_phy,inu)+tau_ae(i,k,id_CSSSM_phy,inu)+   &
    803                                tau_ae(i,k,id_SSSSM_phy,inu)+ tau_ae(i,k,id_CIDUSTM_phy,inu)
    804          tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
    805 
    806          piz_allaer(i,k,1,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
    807                                 tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
    808                                 tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)+     &
    809                                 tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
    810                                 tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
    811                                 tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
    812                                 tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
    813                                 tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
    814                                 tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
    815                                 tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    816                                 /tau_allaer(i,k,1,inu)
    817          piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
    818          IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
    819 
    820          cg_allaer(i,k,1,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+ &
    821                                tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+ &
    822                                tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)*cg_ae(i,k,id_ASBCM_phy,inu)+    &
    823                                tau_ae(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+    &
    824                                tau_ae(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+ &
    825                                tau_ae(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+ &
    826                                tau_ae(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+    &
    827                                tau_ae(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+    &
    828                                tau_ae(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+    &
    829                                tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    830                                (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
    831          cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
    832 
    833 !--ASBCM aerosols take _pi value because of internal mixture option
    834 !         tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
    835 !                               tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+   &
    836 !                               tau_ae_pi(i,k,id_ASPOMM_phy,inu)+tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
    837 !                               tau_ae_pi(i,k,id_ASSSM_phy,inu)+tau_ae_pi(i,k,id_CSSSM_phy,inu)+   &
    838 !                               tau_ae_pi(i,k,id_SSSSM_phy,inu)+ tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
    839 !         tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
     797         IF (.NOT. ok_volcan) THEN
    840798!
    841 !         piz_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
    842 !                                tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
    843 !                                tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)+  &
    844 !                                tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
    845 !                                tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
    846 !                                tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
    847 !                                tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
    848 !                                tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
    849 !                                tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
    850 !                                tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    851 !                                /tau_allaer(i,k,1,inu)
    852 !         piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
    853 !         IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
     799!--this is the default case
     800!--in this case, index 1 of tau_allaer contains natural aerosols only
     801!--because the objective is to perform the double radiation call with and without anthropogenic aerosols
    854802!
    855 !         cg_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+    &
    856 !                               tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+    &
    857 !                               tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)*cg_ae_pi(i,k,id_ASBCM_phy,inu)+ &
    858 !                               tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+       &
    859 !                               tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+    &
    860 !                               tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+    &
    861 !                               tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+       &
    862 !                               tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+       &
    863 !                               tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+       &
    864 !                               tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    865 !                               (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
    866 !         cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
    867 ! NL VOLC END
     803           tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
     804                                 tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+   &
     805                                 tau_ae_pi(i,k,id_ASPOMM_phy,inu)+tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
     806                                 tau_ae_pi(i,k,id_ASSSM_phy,inu)+tau_ae_pi(i,k,id_CSSSM_phy,inu)+   &
     807                                 tau_ae_pi(i,k,id_SSSSM_phy,inu)+ tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
     808           tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
     809         
     810           piz_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
     811                                  tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
     812                                  tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)+  &
     813                                  tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
     814                                  tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
     815                                  tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
     816                                  tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
     817                                  tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
     818                                  tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
     819                                  tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
     820                                  /tau_allaer(i,k,1,inu)
     821           piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
     822           IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
     823         
     824           cg_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)*cg_ae(i,k,id_ASSO4M_phy,inu)+    &
     825                                 tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+    &
     826                                 tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)*cg_ae_pi(i,k,id_ASBCM_phy,inu)+ &
     827                                 tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)*cg_ae(i,k,id_AIBCM_phy,inu)+       &
     828                                 tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)*cg_ae(i,k,id_ASPOMM_phy,inu)+    &
     829                                 tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)*cg_ae(i,k,id_AIPOMM_phy,inu)+    &
     830                                 tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)*cg_ae(i,k,id_ASSSM_phy,inu)+       &
     831                                 tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)*cg_ae(i,k,id_CSSSM_phy,inu)+       &
     832                                 tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)*cg_ae(i,k,id_SSSSM_phy,inu)+       &
     833                                 tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
     834                                 (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
     835           cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
     836!
     837         ELSE
     838!
     839!--this is the case for VOLMIP
     840!--in this case index 1 of tau_allaer contains all (natural+anthropogenic) aerosols (same as index 2 above)
     841!--but stratospheric aerosols will not be added in rrtm/readaerosolstrato2 as
     842!--the objective is to have the double radiation call with and without stratospheric aerosols
     843!
     844           tau_allaer(i,k,1,inu)=tau_allaer(i,k,2,inu)
     845           
     846           piz_allaer(i,k,1,inu)=piz_allaer(i,k,2,inu)
     847           
     848           cg_allaer(i,k,1,inu) =cg_allaer(i,k,2,inu)
     849!
     850         ENDIF
    868851        ENDDO
    869852      ENDDO
  • LMDZ6/trunk/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90

    r3333 r3480  
    11! $Id$
    22!
    3 SUBROUTINE readaerosol_optic_rrtm(debut, aerosol_couple, ok_alw, &
     3SUBROUTINE readaerosol_optic_rrtm(debut, aerosol_couple, ok_alw, ok_volcan, &
    44     new_aod, flag_aerosol, flag_bc_internal_mixture, itap, rjourvrai, &
    55     pdtphys, pplay, paprs, t_seri, rhcl, presnivs, &
     
    3232  LOGICAL, INTENT(IN)                      :: aerosol_couple
    3333  LOGICAL, INTENT(IN)                      :: ok_alw
     34  LOGICAL, INTENT(IN)                      :: ok_volcan
    3435  LOGICAL, INTENT(IN)                      :: new_aod
    3536  INTEGER, INTENT(IN)                      :: flag_aerosol
     
    313314       tau_aero, piz_aero, cg_aero, &
    314315       m_allaer_pi, flag_aerosol,   &
    315        flag_bc_internal_mixture, zrho )
     316       flag_bc_internal_mixture, zrho, ok_volcan )
    316317
    317318  ! aeropt_5wv only for validation and diagnostics
  • LMDZ6/trunk/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90

    r3479 r3480  
    22! $Id: readaerosolstrato2_rrtm.F90 2526 2016-05-26 22:13:40Z oboucher $
    33!
    4 
    5 SUBROUTINE readaerosolstrato2_rrtm(debut)
     4SUBROUTINE readaerosolstrato2_rrtm(debut, ok_volcan)
    65
    76    USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, &
     
    3332! Variable input
    3433    LOGICAL, INTENT(IN) ::  debut
     34    LOGICAL, INTENT(IN) ::  ok_volcan !activate volcanic diags
    3535
    3636! Variables locales
     
    345345    ENDDO
    346346
     347    IF (.NOT. ok_volcan) THEN
     348!
     349!--this is the default case
     350!--stratospheric aerosols are added to both index 2 and 1 for double radiation calls
    347351!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
    348352    DO band=1, NSW
    349353      WHERE (stratomask.GT.0.999999)
    350 !--anthropogenic aerosols bands 1 to NSW
     354!--strat aerosols are added to index 2 : natural and anthropogenic aerosols for bands 1 to NSW
    351355        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
    352356                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     
    357361                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
    358362        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
    359 !--natural aerosols bands 1 to NSW
    360 !        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
    361 !                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
    362 !                                    MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    363 !                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
    364 !        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    365 !                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
    366 !                                    MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
    367 !        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
    368 !--no stratospheric aerosol in index 1 for these tests
    369         cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
    370         piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
    371         tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
     363!--strat aerosols are added to index 1 : natural aerosols only for bands 1 to NSW
     364        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
     365                cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     366                MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     367                piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
     368        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     369                piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
     370                MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
     371        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
    372372    ENDWHERE
    373373    ENDDO
     374!
     375    ELSE
     376!
     377!--this is the VOLMIP case
     378!--stratospheric aerosols are only added to index 2 in this case
     379!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
     380    DO band=1, NSW
     381      WHERE (stratomask.GT.0.999999)
     382!--strat aerosols are added to index 2 : natural and anthropogenic aerosols for bands 1 to NSW
     383        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
     384                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     385                                    MAX( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
     386                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
     387        piz_aero_sw_rrtm(:,:,2,band) = ( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
     388                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
     389                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
     390        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
     391     ENDWHERE
     392  ENDDO
     393  ENDIF
    374394
    375395!--total vertical aod at 10 um
     
    386406    ENDDO
    387407
     408    IF (.NOT. ok_volcan) THEN
     409!--this is the default case
     410!--stratospheric aerosols are added to both index 2 and 1
    388411    DO band=1, NLW
    389412      WHERE (stratomask.GT.0.999999)
    390413        tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
    391414        tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band) + taulw_aer_strat(:,:,band)
    392 !--no stratospheric aerosols in index 1 for these tests
    393 !    tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band)
    394415      ENDWHERE
    395416    ENDDO
     417!
     418    ELSE
     419!
     420!--this is the VOLMIP case
     421    DO band=1, NLW
     422!--stratospheric aerosols are not added to index 1
     423!--and we copy index 2 in index 1 because we want the same dust aerosol LW properties as above
     424      tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,2,band)
     425!
     426      WHERE (stratomask.GT.0.999999)
     427!--stratospheric aerosols are only added to index 2
     428        tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
     429      ENDWHERE
     430    ENDDO
     431    ENDIF
    396432
    397433!--default SSA value if there is no aerosol
Note: See TracChangeset for help on using the changeset viewer.