Linear MoL horizontal theta transport#543
Linear MoL horizontal theta transport#543James Kent (jameskent-metoffice) wants to merge 5 commits into
Conversation
DrTVockerodtMO
left a comment
There was a problem hiding this comment.
Thanks for making the adjoint changes as well. Some clarification is needed before approval.
|
Thanks DrTVockerodtMO for spotting that. I must have introduced that as an error when trying to get the adjoint to work. I've removed the incorrect code and run the test suites and everything passes (including adjoint and jedi tests). |
|
There will need to be an accompanying LFRic-JEDI PR for this, I'll link it once ready |
DrTVockerodtMO
left a comment
There was a problem hiding this comment.
Thank you for the adjoint changes!
DanStoneMO
left a comment
There was a problem hiding this comment.
Linked JEDI PRs now live at:
lfric-jedi: https://github.com/JCSDA-internal/lfric-jedi/pull/1286
jjtests: https://github.com/MetOffice/jjtests/pull/178
cjohnson-pi
left a comment
There was a problem hiding this comment.
Many thanks for identifying and correcting this bug. I have checked the plots associated with the kgo changes, checked the linear and adjoint code, and am happy with the changes in the tolerances. So passes science review.
PR Summary
Sci/Tech Reviewer: cjohnson-pi
Code Reviewer:
There is a small error in the linear model MoL transport scheme. This only occurs for horizontal transport of Wtheta variables. In
tl_wt_advective_update_alg_mod.x90the algorithmhori_wt_update_algis called twice, once using the linearisation wind and the pertubation field, and once using the perturbation wind and the linearisation field. This gives both terms required in the linear transport. However, the algorithm is not incremental, and so the first call is ovewriten and not updated.This PR fixes this issue (for both 3D and horizontal MoL for Wtheta variables). It also tidies up the code in that algorithm. It also changes the adjoint to take this change into account.
I have run the test suites and there are kgo changes which I've updated. This includes kgo changes to Jedi tests. I've also changed the tolerance on some integration tests. Below are some plots to show some of the changes resulting from the PR.
DCMIP test on stable, showing theta.
DCMIP test from PR, showing theta (now propagating in the correct direction)
C224 NWP test on stable, showing u
C224 NWP test from PR, showing u
Linked PRs
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - linear_mol/run2
Suite Information
Task Information
✅ succeeded tasks - 1511
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