Ignore:
Timestamp:
Dec 13, 2018, 11:13:29 PM (6 years ago)
Author:
oboucher
Message:

Tidying up the routines
Adding more comments

File:
1 edited

Legend:

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

    r3425 r3426  
    291291    ENDDO
    292292
    293     IF ( .not. ok_volcan) THEN
     293    IF (.NOT. ok_volcan) THEN
     294!
     295!--this is the default case
     296!--stratospheric aerosols are added to both index 2 and 1 for double radiation calls
    294297!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
    295298    DO band=1, NSW
    296299      WHERE (stratomask.GT.0.999999)
    297 !--anthropogenic aerosols bands 1 to NSW
     300!--strat aerosols are added to index 2 : natural and anthropogenic aerosols for bands 1 to NSW
    298301        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
    299302                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     
    304307                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
    305308        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
    306 !--natural aerosols bands 1 to NSW
    307 ! BEWARE: if you change stings here, you'll also need to change them a few
    308 ! lines down after the ELSE
     309!--strat aerosols are added to index 1 : natural aerosols only for bands 1 to NSW
    309310        cg_aero_sw_rrtm(:,:,1,band)  = ( cg_aero_sw_rrtm(:,:,1,band)*piz_aero_sw_rrtm(:,:,1,band)*tau_aero_sw_rrtm(:,:,1,band) + &
    310311                cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     
    317318    ENDWHERE
    318319    ENDDO
    319 !--no stratospheric aerosol in index 1 for these tests
     320!
    320321    ELSE
     322!
     323!--this is the VOLMIP case
     324!--stratospheric aerosols are only added to index 2 in this case
    321325!--weighted average for cg, piz and tau, adding strat aerosols on top of tropospheric ones
    322326    DO band=1, NSW
    323327      WHERE (stratomask.GT.0.999999)
    324 !--anthropogenic aerosols bands 1 to NSW
     328!--strat aerosols are added to index 2 : natural and anthropogenic aerosols for bands 1 to NSW
    325329        cg_aero_sw_rrtm(:,:,2,band)  = ( cg_aero_sw_rrtm(:,:,2,band)*piz_aero_sw_rrtm(:,:,2,band)*tau_aero_sw_rrtm(:,:,2,band) + &
    326330                                         cg_aer_strat(:,:,band)*piz_aer_strat(:,:,band)*tau_aer_strat(:,:,band) ) /              &
     
    331335                                    MAX( tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band), 1.e-15 )
    332336        tau_aero_sw_rrtm(:,:,2,band)  = tau_aero_sw_rrtm(:,:,2,band) + tau_aer_strat(:,:,band)
    333 !--natural aerosols bands 1 to NSW
    334         cg_aero_sw_rrtm(:,:,1,band)  =  cg_aero_sw_rrtm(:,:,1,band)
    335         piz_aero_sw_rrtm(:,:,1,band)  = piz_aero_sw_rrtm(:,:,1,band)
    336         tau_aero_sw_rrtm(:,:,1,band)  = tau_aero_sw_rrtm(:,:,1,band)
    337337     ENDWHERE
    338338  ENDDO
     
    352352    ENDDO
    353353
    354     IF ( .not. ok_volcan) THEN
     354    IF (.NOT. ok_volcan) THEN
     355!--this is the default case
     356!--stratospheric aerosols are added to both index 2 and 1
    355357    DO band=1, NLW
    356358      WHERE (stratomask.GT.0.999999)
     
    359361      ENDWHERE
    360362    ENDDO
     363!
    361364    ELSE
     365!
     366!--this is the VOLMIP case
    362367    DO band=1, NLW
    363368      WHERE (stratomask.GT.0.999999)
     369!--stratospheric aerosols are only added to index 2
    364370        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
     371!--stratospheric aerosols are not added to index 1
     372!--and we copy index 2 in index 1 because we want the same dust aerosol LW properties as above
    366373        tau_aero_lw_rrtm(:,:,1,band)  = tau_aero_lw_rrtm(:,:,2,band)
    367374      ENDWHERE
Note: See TracChangeset for help on using the changeset viewer.