Refactor fast physics - #368
Conversation
Hopefully I've addressed all of these... |
Yep this all looks good to me :) The bot seems to've already automatically moved this out of sci/tech review for me (I assumed I'd need to press a button somewhere to sign this off?) Maybe it counts as signed-off once all the comments are marked as "resolved"?) Cheers! |
MichaelWhitall
left a comment
There was a problem hiding this comment.
Oh no wait there actually is an "approve" button in here, which I hadn't pressed yet; I think the bot's activity was a bit premature? Anyhow I'm pressing the button now ;)
The bot moved it to "changes requested" - I should have moved it back to sci/tech after doing them. I think you need to tick the boxes in the science review section, and then tag the code reviewer in a comment saying your happy it's passed - the bot is supposed to move it to code review, although I've never actually got that to work! |
|
Sci/Tech review approved on this one, passing over to Lottie Turner (@mo-lottieturner) for code review... Cheers! |
| !>@param[in] clock Model time information | ||
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, & | ||
| dtheta, mv, rho, u, & | ||
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, dtheta, & |
There was a problem hiding this comment.
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, dtheta, & | |
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, & |
changed name variable has been duplicated in merge
There was a problem hiding this comment.
Well caught, thanks for pointing it out!
| if (use_spt) then | ||
| call spt_main_alg(dtheta_stph, dmv_stph, dtheta, mv, & | ||
| convection_fields, & | ||
| call spt_main_alg(dtheta_stph, dmv_stph, dtheta, & |
There was a problem hiding this comment.
| call spt_main_alg(dtheta_stph, dmv_stph, dtheta, & | |
| call spt_main_alg(dtheta_stph, dmv_stph, & |
changed name variable has been duplicated in merge
There was a problem hiding this comment.
Thanks Ian
| !>@param[in] clock Model time information | ||
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, & | ||
| dtheta, mv, rho, u, & | ||
| subroutine stph_main_alg( du_stph, dtheta_stph, dmv_stph, dtheta, & |
There was a problem hiding this comment.
Well caught, thanks for pointing it out!
| if (use_spt) then | ||
| call spt_main_alg(dtheta_stph, dmv_stph, dtheta, mv, & | ||
| convection_fields, & | ||
| call spt_main_alg(dtheta_stph, dmv_stph, dtheta, & |
There was a problem hiding this comment.
Thanks Ian
cf625d2
into
MetOffice:main
PR Summary
Sci/Tech Reviewer: MichaelWhitall
Code Reviewer: Lottie Turner (@mo-lottieturner)
This PR refactors fast physics to enable 2 key pieces of science infrastructure (which are also implemented by this PR):
To enable this, it has been necessary to properly separate the boundary layer and convection increments, which were previously badly inter-mixed. Fast physics now tracks "latest" fields which are updated by each scheme in turn (since the physics here is sequential by design), and then finally constructs an increment from the difference between the final and initial fields. Because this changes the calculation order, it changes many KGOs for lfric_atm
The calls to these schemes in slow physics have also had to be updated to be consistent, and diagnostics previously produced in bl_imp_alg but that depend on convection have had to be separated into their own algorithm to be called after BL and convection have definitely both been done.
Ideally, the new "BL before conv" functionality would be switched on in the comorph_dev tests, however these currently fail when doing so. I will investigate this separately, as the failure is not connected to the code introduced by this PR (particularly the refactoring, which we want to consolidate back to main asap), but is a feedback on model evolution. Doing so would also conflict with several other PRs in flight (#292, #326) so is best left as a separate PR.
closes #228
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - fast_refactor/run1
Suite Information
Task Information
✅ succeeded tasks - 1310
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review