@@ -911,9 +911,7 @@ subroutine aerosol_optics_cam_sw(list_idx, state, pbuf, nnite, idxnite, tauxar,
911911 ! ref: Fig. 1d of Jasper F. Kok et al. (2017),
912912 ! Smaller desert dust cooling effect estimated from analysis of dust size and abundance
913913
914- if (.not. aeroprops% model_is(' BAM' )) then
915- call update_diags( is_coarse_dust= coarse_dust_mode ) ! dopaer is updated in update_diags.
916- end if
914+ call update_diags( is_coarse_dust= coarse_dust_mode ) ! dopaer is updated in update_diags.
917915
918916 ! dmleung: update_diags updated dopaer(icol) as a diagnostic.
919917 ! Aerosol optical and radiative properties are subsequently modified given dopaer update in update_diags.
@@ -948,9 +946,9 @@ subroutine aerosol_optics_cam_sw(list_idx, state, pbuf, nnite, idxnite, tauxar,
948946 bam_cnt = bam_cnt+1
949947 call aer_vis_diag_out(lchnk, ncol, nnite, idxnite, bam_cnt, taubam, &
950948 list_idx, troplev)
951- else
952- call output_bin_diags()
953- end if
949+ endif
950+
951+ call output_bin_diags()
954952
955953 end do binloop
956954 end do aeromodel
@@ -1025,33 +1023,45 @@ subroutine update_diags( is_coarse_dust )
10251023 case (' dust' )
10261024 dustvol(icol) = vol(icol)
10271025 burdendust(icol) = burdendust(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1028- scatdust(icol) = vol(icol) * specrefindex(iwav)% re
1029- 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
10301030 hygrodust(icol)= vol(icol)* hygro_aer
10311031 case (' black-c' )
10321032 burdenbc(icol) = burdenbc(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1033- scatbc(icol) = vol(icol) * specrefindex(iwav)% re
1034- 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
10351037 hygrobc(icol)= vol(icol)* hygro_aer
10361038 case (' sulfate' )
10371039 burdenso4(icol) = burdenso4(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1038- scatsulf(icol) = vol(icol) * specrefindex(iwav)% re
1039- 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
10401044 hygrosulf(icol)= vol(icol)* hygro_aer
10411045 case (' p-organic' )
10421046 burdenpom(icol) = burdenpom(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1043- scatpom(icol) = vol(icol) * specrefindex(iwav)% re
1044- 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
10451051 hygropom(icol)= vol(icol)* hygro_aer
10461052 case (' s-organic' )
10471053 burdensoa(icol) = burdensoa(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1048- scatsoa(icol) = vol(icol) * specrefindex(iwav)% re
1049- 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
10501058 hygrosoa(icol)= vol(icol)* hygro_aer
10511059 case (' seasalt' )
10521060 burdenseasalt(icol) = burdenseasalt(icol) + specmmr(icol,ilev)* mass(icol,ilev)
1053- scatsslt(icol) = vol(icol) * specrefindex(iwav)% re
1054- 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
10551065 hygrosslt(icol)= vol(icol)* hygro_aer
10561066 end select
10571067 end do
0 commit comments