diff --git a/src/chemistry/aerosol/bulk_aerosol_state_mod.F90 b/src/chemistry/aerosol/bulk_aerosol_state_mod.F90 index 4289adb086..53800cf033 100644 --- a/src/chemistry/aerosol/bulk_aerosol_state_mod.F90 +++ b/src/chemistry/aerosol/bulk_aerosol_state_mod.F90 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/src/physics/cam/aerosol_optics_cam.F90 b/src/physics/cam/aerosol_optics_cam.F90 index eab1796814..de3f94e52a 100644 --- a/src/physics/cam/aerosol_optics_cam.F90 +++ b/src/physics/cam/aerosol_optics_cam.F90 @@ -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)) @@ -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 @@ -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