@@ -178,6 +178,9 @@ subroutine aerosol_optics_cam_init
178178 modal_active = nmodes> 0
179179 carma_active = nbins> 0
180180 bulk_active = nbulk_aerosols> 0
181+ if (masterproc) then
182+ write (iulog,* ) prefix,' nmodes,nbins,nbulk_aerosols: ' ,nmodes,nbins,nbulk_aerosols
183+ end if
181184
182185 ! count aerosol models
183186 if (modal_active) then
@@ -863,15 +866,19 @@ subroutine aerosol_optics_cam_sw(list_idx, state, pbuf, nnite, idxnite, tauxar,
863866 case (' nonhygro' , ' insoluble' )
864867 aero_optics= >insoluble_aerosol_optics(aeroprops, aerostate, list_idx, ibin)
865868
866- case (' volcanic_radius' ,' volcanic_radius1' ,' volcanic_radius2' ,' volcanic_radius3' )
869+ case (' volcanic_radius' ,' volcanic_radius1' ,' volcanic_radius2' ,' volcanic_radius3' ,' volcanic_radius5' )
870+
871+ ! construct name of radius physics buffer field
867872 pbuf_fld = ' VOLC_RAD_GEOM '
868873 if (len_trim (opticstype)>15 ) then
869874 pbuf_fld = trim (pbuf_fld)// opticstype(16 :16 )
870875 endif
876+
871877 ! get microphysical properties for volcanic aerosols
872878 idx = pbuf_get_index(pbuf_fld)
873- call pbuf_get_field(pbuf, idx, geometric_radius )
879+ call pbuf_get_field(pbuf, idx, geometric_radius)
874880
881+ ! construct aerosol optics object
875882 aero_optics= >volcrad_aerosol_optics(aeroprops, aerostate, list_idx, &
876883 ibin, ncol, pver, geometric_radius(:ncol,:))
877884
@@ -904,9 +911,7 @@ subroutine aerosol_optics_cam_sw(list_idx, state, pbuf, nnite, idxnite, tauxar,
904911 ! ref: Fig. 1d of Jasper F. Kok et al. (2017),
905912 ! Smaller desert dust cooling effect estimated from analysis of dust size and abundance
906913
907- if (.not. aeroprops% model_is(' BAM' )) then
908- call update_diags( is_coarse_dust= coarse_dust_mode ) ! dopaer is updated in update_diags.
909- end if
914+ call update_diags( is_coarse_dust= coarse_dust_mode ) ! dopaer is updated in update_diags.
910915
911916 ! dmleung: update_diags updated dopaer(icol) as a diagnostic.
912917 ! Aerosol optical and radiative properties are subsequently modified given dopaer update in update_diags.
@@ -941,9 +946,9 @@ subroutine aerosol_optics_cam_sw(list_idx, state, pbuf, nnite, idxnite, tauxar,
941946 bam_cnt = bam_cnt+1
942947 call aer_vis_diag_out(lchnk, ncol, nnite, idxnite, bam_cnt, taubam, &
943948 list_idx, troplev)
944- else
945- call output_bin_diags()
946- end if
949+ endif
950+
951+ call output_bin_diags()
947952
948953 end do binloop
949954 end do aeromodel
@@ -1018,33 +1023,45 @@ subroutine update_diags( is_coarse_dust )
10181023 case (' dust' )
10191024 dustvol(icol) = vol(icol)
10201025 burdendust(icol) = burdendust(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1021- scatdust(icol) = vol(icol) * specrefindex(iwav)% re
1022- absdust(icol) =- vol(icol) * specrefindex(iwav)% im
1026+ if (associated (specrefindex)) then
1027+ scatdust(icol) = vol(icol) * specrefindex(iwav)% re
1028+ absdust(icol) =- vol(icol) * specrefindex(iwav)% im
1029+ end if
10231030 hygrodust(icol)= vol(icol)* hygro_aer
10241031 case (' black-c' )
10251032 burdenbc(icol) = burdenbc(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1026- scatbc(icol) = vol(icol) * specrefindex(iwav)% re
1027- absbc(icol) =- vol(icol) * specrefindex(iwav)% im
1033+ if (associated (specrefindex)) then
1034+ scatbc(icol) = vol(icol) * specrefindex(iwav)% re
1035+ absbc(icol) =- vol(icol) * specrefindex(iwav)% im
1036+ end if
10281037 hygrobc(icol)= vol(icol)* hygro_aer
10291038 case (' sulfate' )
10301039 burdenso4(icol) = burdenso4(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1031- scatsulf(icol) = vol(icol) * specrefindex(iwav)% re
1032- abssulf(icol) =- vol(icol) * specrefindex(iwav)% im
1040+ if (associated (specrefindex)) then
1041+ scatsulf(icol) = vol(icol) * specrefindex(iwav)% re
1042+ abssulf(icol) =- vol(icol) * specrefindex(iwav)% im
1043+ end if
10331044 hygrosulf(icol)= vol(icol)* hygro_aer
10341045 case (' p-organic' )
10351046 burdenpom(icol) = burdenpom(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1036- scatpom(icol) = vol(icol) * specrefindex(iwav)% re
1037- abspom(icol) =- vol(icol) * specrefindex(iwav)% im
1047+ if (associated (specrefindex)) then
1048+ scatpom(icol) = vol(icol) * specrefindex(iwav)% re
1049+ abspom(icol) =- vol(icol) * specrefindex(iwav)% im
1050+ end if
10381051 hygropom(icol)= vol(icol)* hygro_aer
10391052 case (' s-organic' )
10401053 burdensoa(icol) = burdensoa(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1041- scatsoa(icol) = vol(icol) * specrefindex(iwav)% re
1042- abssoa(icol) = - vol(icol) * specrefindex(iwav)% im
1054+ if (associated (specrefindex)) then
1055+ scatsoa(icol) = vol(icol) * specrefindex(iwav)% re
1056+ abssoa(icol) = - vol(icol) * specrefindex(iwav)% im
1057+ end if
10431058 hygrosoa(icol)= vol(icol)* hygro_aer
10441059 case (' seasalt' )
10451060 burdenseasalt(icol) = burdenseasalt(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1046- scatsslt(icol) = vol(icol) * specrefindex(iwav)% re
1047- abssslt(icol) = - vol(icol) * specrefindex(iwav)% im
1061+ if (associated (specrefindex)) then
1062+ scatsslt(icol) = vol(icol) * specrefindex(iwav)% re
1063+ abssslt(icol) = - vol(icol) * specrefindex(iwav)% im
1064+ end if
10481065 hygrosslt(icol)= vol(icol)* hygro_aer
10491066 end select
10501067 end do
@@ -1432,15 +1449,19 @@ subroutine aerosol_optics_cam_lw(list_idx, state, pbuf, tauxar)
14321449 case (' nonhygro' , ' insoluble' )
14331450 aero_optics= >insoluble_aerosol_optics(aeroprops, aerostate, list_idx, ibin)
14341451
1435- case (' volcanic_radius' ,' volcanic_radius1' ,' volcanic_radius2' ,' volcanic_radius3' )
1452+ case (' volcanic_radius' ,' volcanic_radius1' ,' volcanic_radius2' ,' volcanic_radius3' ,' volcanic_radius5' )
1453+
1454+ ! construct name of radius physics buffer field
14361455 pbuf_fld = ' VOLC_RAD_GEOM '
14371456 if (len_trim (opticstype)>15 ) then
14381457 pbuf_fld = trim (pbuf_fld)// opticstype(16 :16 )
14391458 endif
1459+
14401460 ! get microphysical properties for volcanic aerosols
14411461 idx = pbuf_get_index(pbuf_fld)
1442- call pbuf_get_field(pbuf, idx, geometric_radius )
1462+ call pbuf_get_field(pbuf, idx, geometric_radius)
14431463
1464+ ! construct aerosol optics object
14441465 aero_optics= >volcrad_aerosol_optics(aeroprops, aerostate, list_idx, &
14451466 ibin, ncol, pver, geometric_radius(:ncol,:))
14461467
0 commit comments