Changeset 3425 for LMDZ6/branches


Ignore:
Timestamp:
Dec 13, 2018, 1:07:06 PM (6 years ago)
Author:
Laurent Fairhead
Message:

Followup to r3408 modifications for VolMIP
NL

Location:
LMDZ6/branches/IPSLCM6.0.15/libf/phylmd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/phys_output_write_mod.F90

    r3408 r3425  
    13881388          CALL histwrite_phy(o_heat_volc, zx_tmp_fi3d)
    13891389          DO k=1, klev
    1390              zx_tmp_fi3d(:,k)=cool_volc(:,k)*swradcorr(:)
     1390             zx_tmp_fi3d(:,k)=cool_volc(:,k)
    13911391          ENDDO
    13921392          CALL histwrite_phy(o_cool_volc, zx_tmp_fi3d)
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/physiq_mod.F90

    r3419 r3425  
    13521352
    13531353       IF (type_trac == 'inca') THEN
     1354          ! jg : initialisation jusqu'au ces variables sont dans restart
     1355          ccm(:,:,:) = 0.
     1356          tau_aero(:,:,:,:) = 0.
     1357          piz_aero(:,:,:,:) = 0.
     1358          cg_aero(:,:,:,:) = 0.
    13541359
    13551360          config_inca='none' ! default
     
    36033608#else
    36043609                   !--climatologies or INCA aerosols
    3605                    CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, &
     3610                   CALL readaerosol_optic_rrtm( debut, aerosol_couple, ok_alw, ok_volcan, &
    36063611                        new_aod, flag_aerosol, flag_bc_internal_mixture, itap, jD_cur-jD_ref, &
    36073612                        pdtphys, pplay, paprs, t_seri, rhcl, presnivs,  &
     
    36933698             CALL readaerosolstrato1_rrtm(debut)
    36943699            ELSEIF (flag_aerosol_strat.EQ.2) THEN
    3695              CALL readaerosolstrato2_rrtm(debut)
     3700             CALL readaerosolstrato2_rrtm(debut, ok_volcan)
    36963701            ELSE
    36973702             abort_message='flag_aerosol_strat must equal 1 or 2 for rrtm=1'
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/radlwsw_m.F90

    r3408 r3425  
    10371037           zcool0(i,k)=(ZLWFT0_i(i,k)-ZLWFT0_i(i,k+1))*RDAY*RG/RCPD/PDP(i,k)
    10381038           IF(ok_volcan) THEN
    1039               zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RDAY*RG/RCPD/PDP(i,k) !NL
    1040               zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RDAY*RG/RCPD/PDP(i,k) !NL
     1039              zheat_volc(i,k)=(ZSWADAERO(i,k+1)-ZSWADAERO(i,k))*RG/RCPD/PDP(i,k) !NL
     1040              zcool_volc(i,k)=(ZLWADAERO(i,k)-ZLWADAERO(i,k+1))*RG/RCPD/PDP(i,k) !NL
    10411041           ENDIF
    10421042!          print *,'heat cool heat0 cool0 ',zheat(i,k),zcool(i,k),zheat0(i,k),zcool0(i,k)
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/aeropt_6bands_rrtm.F90

    r3408 r3425  
    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
    797797!--natural aerosol
     798!--ASBCM aerosols take _pi value because of internal mixture option
     799         IF(.not. ok_volcan) THEN
     800         tau_allaer(i,k,1,inu)=tau_ae_pi(i,k,id_ASSO4M_phy,inu)+tau_ae_pi(i,k,id_CSSO4M_phy,inu)+ &
     801                               tau_ae_pi(i,k,id_ASBCM_phy,inu)+tau_ae_pi(i,k,id_AIBCM_phy,inu)+   &
     802                               tau_ae_pi(i,k,id_ASPOMM_phy,inu)+tau_ae_pi(i,k,id_AIPOMM_phy,inu)+ &
     803                               tau_ae_pi(i,k,id_ASSSM_phy,inu)+tau_ae_pi(i,k,id_CSSSM_phy,inu)+   &
     804                               tau_ae_pi(i,k,id_SSSSM_phy,inu)+ tau_ae_pi(i,k,id_CIDUSTM_phy,inu)
     805         tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
     806         
     807         piz_allaer(i,k,1,inu)=(tau_ae_pi(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
     808                                tau_ae_pi(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
     809                                tau_ae_pi(i,k,id_ASBCM_phy,inu)*piz_ae_pi(i,k,id_ASBCM_phy,inu)+  &
     810                                tau_ae_pi(i,k,id_AIBCM_phy,inu)*piz_ae(i,k,id_AIBCM_phy,inu)+     &
     811                                tau_ae_pi(i,k,id_ASPOMM_phy,inu)*piz_ae(i,k,id_ASPOMM_phy,inu)+   &
     812                                tau_ae_pi(i,k,id_AIPOMM_phy,inu)*piz_ae(i,k,id_AIPOMM_phy,inu)+   &
     813                                tau_ae_pi(i,k,id_ASSSM_phy,inu)*piz_ae(i,k,id_ASSSM_phy,inu)+     &
     814                                tau_ae_pi(i,k,id_CSSSM_phy,inu)*piz_ae(i,k,id_CSSSM_phy,inu)+     &
     815                                tau_ae_pi(i,k,id_SSSSM_phy,inu)*piz_ae(i,k,id_SSSSM_phy,inu)+     &
     816                                tau_ae_pi(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
     817                                /tau_allaer(i,k,1,inu)
     818         piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
     819         IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
     820         
     821         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)+    &
     822                               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)+    &
     823                               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)+ &
     824                               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)+       &
     825                               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)+    &
     826                               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)+    &
     827                               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)+       &
     828                               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)+       &
     829                               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)+       &
     830                               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))/ &
     831                               (tau_allaer(i,k,1,inu)*piz_allaer(i,k,1,inu))
     832         cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
     833         ELSE
    798834! (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)+ &
     835            tau_allaer(i,k,1,inu)=tau_ae(i,k,id_ASSO4M_phy,inu)+tau_ae(i,k,id_CSSO4M_phy,inu)+ &
    800836                               tau_ae(i,k,id_ASBCM_phy,inu)+tau_ae(i,k,id_AIBCM_phy,inu)+   &
    801837                               tau_ae(i,k,id_ASPOMM_phy,inu)+tau_ae(i,k,id_AIPOMM_phy,inu)+ &
    802838                               tau_ae(i,k,id_ASSSM_phy,inu)+tau_ae(i,k,id_CSSSM_phy,inu)+   &
    803839                               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)+   &
     840            tau_allaer(i,k,1,inu)=MAX(tau_allaer(i,k,1,inu),tau_min)
     841           
     842            piz_allaer(i,k,1,inu)=(tau_ae(i,k,id_ASSO4M_phy,inu)*piz_ae(i,k,id_ASSO4M_phy,inu)+   &
    807843                                tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)+   &
    808844                                tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)+     &
     
    815851                                tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)) &
    816852                                /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)+ &
     853            piz_allaer(i,k,1,inu)=MIN(MAX(piz_allaer(i,k,1,inu),0.01),1.0)
     854            IF (tau_allaer(i,k,1,inu).LE.tau_min) piz_allaer(i,k,1,inu)=1.0
     855           
     856            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)+ &
    821857                               tau_ae(i,k,id_CSSO4M_phy,inu)*piz_ae(i,k,id_CSSO4M_phy,inu)*cg_ae(i,k,id_CSSO4M_phy,inu)+ &
    822858                               tau_ae(i,k,id_ASBCM_phy,inu)*piz_ae(i,k,id_ASBCM_phy,inu)*cg_ae(i,k,id_ASBCM_phy,inu)+    &
     
    829865                               tau_ae(i,k,id_CIDUSTM_phy,inu)*piz_ae(i,k,id_CIDUSTM_phy,inu)*cg_ae(i,k,id_CIDUSTM_phy,inu))/ &
    830866                               (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)
    840 !
    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
    854 !
    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
     867            cg_allaer(i,k,1,inu)=MIN(MAX(cg_allaer(i,k,1,inu),0.0),1.0)
     868         ENDIF
    868869        ENDDO
    869870      ENDDO
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/rrtm/readaerosol_optic_rrtm.F90

    r3337 r3425  
    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/branches/IPSLCM6.0.15/libf/phylmd/rrtm/readaerosolstrato2_rrtm.F90

    r3408 r3425  
    22! $Id: readaerosolstrato2_rrtm.F90 2526 2016-05-26 22:13:40Z oboucher $
    33!
    4 SUBROUTINE readaerosolstrato2_rrtm(debut)
     4SUBROUTINE readaerosolstrato2_rrtm(debut, ok_volcan)
    55
    66    USE netcdf95, ONLY: nf95_close, nf95_gw_var, nf95_inq_dimid, &
     
    2929! Variable input
    3030    LOGICAL, INTENT(IN) ::  debut
     31    LOGICAL, INTENT(IN) ::  ok_volcan !activate volcanic diags
    3132
    3233! Variables locales
     
    290291    ENDDO
    291292
     293    IF ( .not. ok_volcan) THEN
    292294!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
    293295    DO band=1, NSW
     
    303305        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
    304306!--natural aerosols bands 1 to NSW
    305 !        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
    306 !                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
    307 !                                    MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    308 !                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
    309 !        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
    310 !                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
    311 !                                    MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
    312 !        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
     307! BEWARE: if you change stings here, you'll also need to change them a few
     308! lines down after the ELSE
     309        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
     310                cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     311                MAX( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     312                piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
     313        piz_aero_sw_rrtm(:,:,1,band) = ( piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) +                             &
     314                piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
     315                MAX( tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band), 1.e-15 )
     316        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band) + tau_aer_strat(:,:,band)
     317    ENDWHERE
     318    ENDDO
    313319!--no stratospheric aerosol in index 1 for these tests
     320    ELSE
     321!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
     322    DO band=1, NSW
     323      WHERE (stratomask.GT.0.999999)
     324!--anthropogenic aerosols bands 1 to NSW
     325        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
     326                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     327                                    MAX( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
     328                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band), 1.e-15 )
     329        piz_aero_sw_rrtm(:,:,2,band) = ( piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) +                             &
     330                                         piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /                                     &
     331                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
     332        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
     333!--natural aerosols bands 1 to NSW
    314334        cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
    315335        piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
    316336        tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
    317     ENDWHERE
    318     ENDDO
     337     ENDWHERE
     338  ENDDO
     339  ENDIF
    319340
    320341!--total vertical aod at 10 um
     
    331352    ENDDO
    332353
     354    IF ( .not. ok_volcan) THEN
    333355    DO band=1, NLW
    334356      WHERE (stratomask.GT.0.999999)
    335357        tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
    336358        tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band) + taulw_aer_strat(:,:,band)
    337 !--no stratospheric aerosols in index 1 for these tests
    338 !    tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,1,band)
    339359      ENDWHERE
    340360    ENDDO
     361    ELSE
     362    DO band=1, NLW
     363      WHERE (stratomask.GT.0.999999)
     364        tau_aero_lw_rrtm(:,:,2,band)  = tau_aero_lw_rrtm(:,:,2,band) + taulw_aer_strat(:,:,band)
     365        !--no stratospheric aerosols in index 1 for these tests
     366        tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,2,band)
     367      ENDWHERE
     368    ENDDO
     369    ENDIF
    341370
    342371!--default SSA value if there is no aerosol
Note: See TracChangeset for help on using the changeset viewer.