Skip to content
Open
Show file tree
Hide file tree
Changes from 15 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
41 changes: 37 additions & 4 deletions src/chemistry/aerosol/aerosol_properties_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ module aerosol_properties_mod
procedure(aero_resuspension_resize), deferred :: resuspension_resize
procedure(aero_rebin_bulk_fluxes), deferred :: rebin_bulk_fluxes
procedure(aero_hydrophilic), deferred :: hydrophilic
procedure :: is_bulk
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be really nice if this could instead be a general term or if terms could be added for other types. One suggestion is:

Suggested change
procedure :: is_bulk
procedure ::aerosol_is

aerosol_is could function similarly to how dycore_is is used today. This could then be used to identify the bulk model but also could replace current model tests such as (nmodes>0) (currently used to identify MAM but collides with our modal and sectional models) or (nbins>0) (currently used to identify CARMA but also collides with our sectional model).

I'm happy to submit this as an independent PR or as a PR to this PR branch.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gold2718 I like this suggestion. Since you offered, please submit a PR to this branch with the changes you have in mind. Thanks.


procedure :: final=>aero_props_final
end type aerosol_properties
Expand Down Expand Up @@ -101,7 +102,7 @@ end function aero_number_transported
! species morphology
!------------------------------------------------------------------------
subroutine aero_props_get(self, bin_ndx, species_ndx, list_ndx, density, hygro, &
spectype, specname, specmorph, refindex_sw, refindex_lw)
spectype, specname, specmorph, refindex_sw, refindex_lw)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still think each of these properties should be a separate method which would simplify use and maintenance but I can pitch this as an independent PR later if that sounds plausible.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implementing this in a separate PR sounds reasonable to me.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. It will be nice to see it as a clean change to see if it really helps. Shall I open an issue for this (and maybe for optics_params?

import :: aerosol_properties, r8
class(aerosol_properties), intent(in) :: self
integer, intent(in) :: bin_ndx ! bin index
Expand All @@ -124,7 +125,10 @@ subroutine aero_optics_params(self, list_ndx, bin_ndx, opticstype, extpsw, absps
refrtabsw, refitabsw, refrtablw, refitablw, ncoef, prefr, prefi, sw_hygro_ext_wtp, &
sw_hygro_ssa_wtp, sw_hygro_asm_wtp, lw_hygro_ext_wtp, wgtpct, nwtp, &
sw_hygro_coreshell_ext, sw_hygro_coreshell_ssa, sw_hygro_coreshell_asm, lw_hygro_coreshell_ext, &
corefrac, bcdust, kap, relh, nfrac, nbcdust, nkap, nrelh )
corefrac, bcdust, kap, relh, nfrac, nbcdust, nkap, nrelh, &
sw_hygroscopic_ext, sw_hygroscopic_ssa, sw_hygroscopic_asm, lw_hygroscopic_ext, &
sw_insoluble_ext, sw_insoluble_ssa, sw_insoluble_asm, lw_insoluble_ext, &
r_sw_ext, r_sw_scat, r_sw_ascat, r_mu, r_lw_abs )

import :: aerosol_properties, r8

Expand Down Expand Up @@ -169,6 +173,25 @@ subroutine aero_optics_params(self, list_ndx, bin_ndx, opticstype, extpsw, absps
integer, optional, intent(out) :: nkap ! hygroscopicity dimension size
integer, optional, intent(out) :: nrelh ! relative humidity dimension size

! hygroscopic
real(r8), optional, pointer :: sw_hygroscopic_ext(:,:) ! short wave extinction table
real(r8), optional, pointer :: sw_hygroscopic_ssa(:,:) ! short wave single-scatter albedo table
real(r8), optional, pointer :: sw_hygroscopic_asm(:,:) ! short wave asymmetry table
real(r8), optional, pointer :: lw_hygroscopic_ext(:,:) ! long wave absorption table

! non-hygroscopic (insoluble)
real(r8), optional, pointer :: sw_insoluble_ext(:) ! short wave extinction table
real(r8), optional, pointer :: sw_insoluble_ssa(:) ! short wave single-scatter albedo table
real(r8), optional, pointer :: sw_insoluble_asm(:) ! short wave asymmetry table
real(r8), optional, pointer :: lw_insoluble_ext(:) ! long wave absorption table

! volcanic radius
real(r8), optional, pointer :: r_sw_ext(:,:)
real(r8), optional, pointer :: r_sw_scat (:,:)
real(r8), optional, pointer :: r_sw_ascat(:,:)
real(r8), optional, pointer :: r_mu(:)
real(r8), optional, pointer :: r_lw_abs(:,:)

end subroutine aero_optics_params

!------------------------------------------------------------------------
Expand Down Expand Up @@ -375,12 +398,12 @@ end function aero_alogsig_rlist
! returns name for a given radiation list number and aerosol bin
!------------------------------------------------------------------------------
function aero_bin_name(self, list_ndx, bin_ndx) result(name)
import :: aerosol_properties, r8
import :: aerosol_properties, r8, aero_name_len
class(aerosol_properties), intent(in) :: self
integer, intent(in) :: list_ndx ! radiation list number
integer, intent(in) :: bin_ndx ! bin number

character(len=32) name
character(len=aero_name_len) :: name

end function aero_bin_name

Expand Down Expand Up @@ -710,4 +733,14 @@ pure real(r8) function pom_equivso4_factor(self)

end function pom_equivso4_factor

!------------------------------------------------------------------------------
! returns TRUE if bulk aerosol representation
!------------------------------------------------------------------------------
pure logical function is_bulk(self)
class(aerosol_properties), intent(in) :: self

is_bulk = .false.

end function is_bulk

end module aerosol_properties_mod
Loading