-
Notifications
You must be signed in to change notification settings - Fork 169
Abstract aerosol interfaces extended for bulk representation #1404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: cam_development
Are you sure you want to change the base?
Changes from 15 commits
e3029c1
a48d2d7
544cf8f
4808038
34a1de2
6aeadbd
6850dd7
403844c
5d04c87
6bf0572
19018cc
499f920
5c640c9
95d14d4
15752c5
1ecd44f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
||
| procedure :: final=>aero_props_final | ||
| end type aerosol_properties | ||
|
|
@@ -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) | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Implementing this in a separate PR sounds reasonable to me.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 |
||
| import :: aerosol_properties, r8 | ||
| class(aerosol_properties), intent(in) :: self | ||
| integer, intent(in) :: bin_ndx ! bin index | ||
|
|
@@ -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 | ||
|
|
||
|
|
@@ -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 | ||
|
|
||
| !------------------------------------------------------------------------ | ||
|
|
@@ -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 | ||
|
|
||
|
|
@@ -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 | ||
There was a problem hiding this comment.
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:
aerosol_iscould function similarly to howdycore_isis 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.
There was a problem hiding this comment.
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.