Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/chemistry/aerosol/bulk_aerosol_state_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module bulk_aerosol_state_mod
use shr_kind_mod, only: r8 => shr_kind_r8
use rad_constituents, only: rad_cnst_get_aer_mmr
use cam_abortutils, only: endrun

use physics_buffer, only: physics_buffer_desc
use physics_types, only: physics_state

Expand Down Expand Up @@ -336,8 +336,13 @@ function dry_volume(self, aero_props, list_idx, bin_idx, ncol, nlev) result(vol)
integer, intent(in) :: nlev ! number of levels

real(r8) :: vol(ncol,nlev) ! m3/kg
real(r8), pointer :: mmr(:,:) ! kg/kg
real(r8) :: dens ! kg/m3

call aero_props%get(bin_idx, 1, density=dens)
call self%get_ambient_mmr(list_idx, 1, bin_idx, mmr)

vol = -huge(1._r8)
vol(:ncol,:nlev) = mmr(:ncol,:nlev)/dens

end function dry_volume

Expand All @@ -356,7 +361,8 @@ function wet_volume(self, aero_props, list_idx, bin_idx, ncol, nlev) result(vol)

real(r8) :: vol(ncol,nlev) ! m3/kg

vol = -huge(1._r8)
vol = self%dry_volume(aero_props, list_idx, bin_idx, ncol, nlev) &
+ self%water_volume(aero_props, list_idx, bin_idx, ncol, nlev)

end function wet_volume

Expand All @@ -375,7 +381,7 @@ function water_volume(self, aero_props, list_idx, bin_idx, ncol, nlev) result(vo

real(r8) :: vol(ncol,nlev) ! m3/kg

vol = -huge(1._r8)
vol = 0._r8

end function water_volume

Expand Down
30 changes: 16 additions & 14 deletions src/physics/cam/aerosol_optics_cam.F90
Original file line number Diff line number Diff line change
Expand Up @@ -1080,24 +1080,25 @@ subroutine update_diags( is_coarse_dust )
sumhygro = hygrosulf(icol) + hygropom(icol) + hygrosoa(icol) + hygrobc(icol) + &
hygrodust(icol) + hygrosslt(icol)

scatdust(icol) = (scatdust(icol) + scath2o*hygrodust(icol)/sumhygro)/sumscat
absdust(icol) = (absdust(icol) + absh2o*hygrodust(icol)/sumhygro)/sumabs
if (sumscat>0._r8 .and. sumabs>0._r8 .and. sumhygro>0._r8) then
scatdust(icol) = (scatdust(icol) + scath2o*hygrodust(icol)/sumhygro)/sumscat
absdust(icol) = (absdust(icol) + absh2o*hygrodust(icol)/sumhygro)/sumabs

scatsulf(icol) = (scatsulf(icol) + scath2o*hygrosulf(icol)/sumhygro)/sumscat
abssulf(icol) = (abssulf(icol) + absh2o*hygrosulf(icol)/sumhygro)/sumabs
scatsulf(icol) = (scatsulf(icol) + scath2o*hygrosulf(icol)/sumhygro)/sumscat
abssulf(icol) = (abssulf(icol) + absh2o*hygrosulf(icol)/sumhygro)/sumabs

scatpom(icol) = (scatpom(icol) + scath2o*hygropom(icol)/sumhygro)/sumscat
abspom(icol) = (abspom(icol) + absh2o*hygropom(icol)/sumhygro)/sumabs
scatpom(icol) = (scatpom(icol) + scath2o*hygropom(icol)/sumhygro)/sumscat
abspom(icol) = (abspom(icol) + absh2o*hygropom(icol)/sumhygro)/sumabs

scatsoa(icol) = (scatsoa(icol) + scath2o*hygrosoa(icol)/sumhygro)/sumscat
abssoa(icol) = (abssoa(icol) + absh2o*hygrosoa(icol)/sumhygro)/sumabs
scatsoa(icol) = (scatsoa(icol) + scath2o*hygrosoa(icol)/sumhygro)/sumscat
abssoa(icol) = (abssoa(icol) + absh2o*hygrosoa(icol)/sumhygro)/sumabs

scatbc(icol)= (scatbc(icol) + scath2o*hygrobc(icol)/sumhygro)/sumscat
absbc(icol) = (absbc(icol) + absh2o*hygrobc(icol)/sumhygro)/sumabs

scatsslt(icol) = (scatsslt(icol) + scath2o*hygrosslt(icol)/sumhygro)/sumscat
abssslt(icol) = (abssslt(icol) + absh2o*hygrosslt(icol)/sumhygro)/sumabs
scatbc(icol)= (scatbc(icol) + scath2o*hygrobc(icol)/sumhygro)/sumscat
absbc(icol) = (absbc(icol) + absh2o*hygrobc(icol)/sumhygro)/sumabs

scatsslt(icol) = (scatsslt(icol) + scath2o*hygrosslt(icol)/sumhygro)/sumscat
abssslt(icol) = (abssslt(icol) + absh2o*hygrosslt(icol)/sumhygro)/sumabs
endif

aodabsbc(icol) = aodabsbc(icol) + absbc(icol)*dopaer(icol)*(1.0_r8-palb(icol))

Expand Down Expand Up @@ -1149,7 +1150,6 @@ subroutine update_diags( is_coarse_dust )
! dmleung 20 Oct 2025 ++
! Then, all these diagnostics are outputted based on the modified dust AOD.
! We simply apply dopaer/dopaer0 (>1 for coarse mode) to the absorption diagnostics.
aodvis(icol) = aodvis(icol) + dopaer(icol)
aodabs(icol) = aodabs(icol) + mass(icol,ilev) * pabs(icol) * dopaer(icol)/dopaer0(icol) ! dmleung
extinct(icol,ilev) = extinct(icol,ilev) + dopaer(icol)*air_density(icol,ilev)/mass(icol,ilev)
absorb(icol,ilev) = absorb(icol,ilev) + air_density(icol,ilev) * pabs(icol) * dopaer(icol)/dopaer0(icol) ! dmleung
Expand All @@ -1161,6 +1161,8 @@ subroutine update_diags( is_coarse_dust )

end if

aodvis(icol) = aodvis(icol) + dopaer(icol)

if (ilev<=troplev(icol)) then
aodvisst(icol) = aodvisst(icol) + dopaer(icol)
end if
Expand Down
Loading