-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add TUV-x height grid updates #134
Conversation
…d' into 95-update-tuvx-temp
|
||
type(grid_t), intent(inout) :: height_grid | ||
real(kind_phys), intent(in) :: host_midpoints(:) ! km | ||
real(kind_phys), intent(in) :: host_edges(:) ! km |
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.
Is the term edge
equivalent to interface
? If so, can we use interface across the code base to enhance the consistency and readability?
real(kind_phys), intent(in) :: host_edges(:) ! km | |
real(kind_phys), intent(in) :: host_interface(:) ! km |
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.
Looks good, but did have a few questions and some suggestions. Of course please let me know if you have any concerns with any of my comments. Thanks!
@@ -128,7 +129,7 @@ subroutine tuvx_run( temperature, dry_air_density, & | |||
call calculate_heights( geopotential_height_wrt_surface_at_midpoint(i_col,:), & | |||
geopotential_height_wrt_surface_at_interface(i_col,:), & | |||
surface_geopotential(i_col), & | |||
reciprocal_of_gravitational_acceleration, & | |||
standard_gravitational_acceleration, & |
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 would probably recommend calculating reciprocal_of_gravitational_acceleration
outside of the i_col
loop and then just passing it to calculate_heights
like you were doing previously (this could potentially reduce the total number of divisions that have to be done).
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, thank you for the comment!
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.
Everything looks good to me now! I did have one final performance-related change request, but it certainly isn't required (and doesn't need a re-review). Thanks again!
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.
looks good to me!
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.
looks great!
Updates TUV-x height grid with CAM-SIMA state data before calculating rate constants.
Uses geopontential height values to calculate actual heights above sea level, as currently done in the CAMChem gas-phase chemistry module. If there is a better way to get these height values, we can update this PR.
Closes #94
Notes (Jiwon):
edges
withinterface
valgrind
suppression option to suppress memory leak issues in certain functions of TUV-x.