-
Notifications
You must be signed in to change notification settings - Fork 142
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
cam6_4_025: Aerosol deposition fluxes #1096
cam6_4_025: Aerosol deposition fluxes #1096
Conversation
new file: src/chemistry/aerosol/aero_deposition_cam.F90 modified: src/chemistry/aerosol/aero_deposition_cam.F90 modified: src/chemistry/aerosol/aerosol_properties_mod.F90 modified: src/chemistry/aerosol/modal_aerosol_properties_mod.F90 modified: src/chemistry/modal_aero/aero_model.F90
…anup modified: src/chemistry/aerosol/aero_deposition_cam.F90 modified: src/chemistry/aerosol/modal_aerosol_properties_mod.F90 modified: src/chemistry/modal_aero/aero_model.F90
modified: src/chemistry/aerosol/modal_aerosol_properties_mod.F90
This has yet to be tested and evaluated. |
modified: src/chemistry/modal_aero/aero_model.F90
do ispec=1,bcphi_cnt | ||
cam_out%bcphidry(i) = cam_out%bcphidry(i) & | ||
+ (aerdepdryis(i,bcphi_ndx(ispec))+aerdepdrycw(i,bcphi_ndx(ispec))) | ||
enddo | ||
do ispec=1,bcpho_cnt | ||
cam_out%bcphodry(i) = cam_out%bcphodry(i) & | ||
+ (aerdepdryis(i,bcpho_ndx(ispec))+aerdepdrycw(i,bcpho_ndx(ispec))) | ||
enddo |
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.
Perhaps adding a comment above each of these loops (and for the group below) that differentiates what each loop is doing. At first I thought I'd found a bug, before I realized you were doing a two pass calculation
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.
Added comments
if (cam_out%bcphidry(i) .lt. 0._r8) cam_out%bcphidry(i) = 0._r8 | ||
if (cam_out%ocphidry(i) .lt. 0._r8) cam_out%ocphidry(i) = 0._r8 | ||
if (cam_out%bcphodry(i) .lt. 0._r8) cam_out%bcphodry(i) = 0._r8 | ||
if (cam_out%ocphodry(i) .lt. 0._r8) cam_out%ocphodry(i) = 0._r8 | ||
if (cam_out%dstdry1(i) .lt. 0._r8) cam_out%dstdry1(i) = 0._r8 | ||
if (cam_out%dstdry2(i) .lt. 0._r8) cam_out%dstdry2(i) = 0._r8 | ||
if (cam_out%dstdry3(i) .lt. 0._r8) cam_out%dstdry3(i) = 0._r8 | ||
if (cam_out%dstdry4(i) .lt. 0._r8) cam_out%dstdry4(i) = 0._r8 |
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.
CAM guidelines say "should" use <
instead of .lt.
. This is at your discretion since it is a "should" and not a "must"
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.
Done
do l = 1,self%nspecies(m) | ||
mm = self%indexer(m,l) | ||
call self%get(m,l, spectype=spectype, density=dns_dst) ! kg/m3 | ||
if (spectype==bulk_type) then |
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.
I'm not sure if it is doable (an error or not) to capture if no matches occur with spectype==bulk_type
. I'm thinking of whether it is worth trying to capture a typo or completely incorrect name for bulk_type
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.
I could probably implement an error code and error string that get returned by the subroutine if you think it is worth while. As it is now, if the specified bulk_type
is not valid then the fluxes returned are zeros.
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.
I agree that the fluxes will be zero, but I'm not sure if it would be readily apparent to a user that they had a typo or invalid name as zero fluxes might be pretty subtle in a run. It really is your call - I am just pointing this out for your consideration.
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.
Added error checking
modified: src/chemistry/aerosol/aero_deposition_cam.F90 modified: src/chemistry/aerosol/aerosol_properties_mod.F90 modified: src/chemistry/aerosol/modal_aerosol_properties_mod.F90
Merge pull request ESCOMP#1096 from fvitt/aerosol_deposition_fluxes cam6_4_025: Aerosol deposition fluxes ESCOMP commit: 2f8ec4d
Merge pull request ESCOMP#1096 from fvitt/aerosol_deposition_fluxes cam6_4_025: Aerosol deposition fluxes ESCOMP commit: 2f8ec4d
This repartitions the modal dust deposition fluxes into 4 bulk bins for passing to the surface models. The aerosol fluxes code was refactored in a generalized way which can easily be expanded for other aerosol representations, such as CARMA.
Closes #1060