Lfric2lfric w2#390
Lfric2lfric w2#390Juan Manuel Castillo Sanchez (ukmo-juan-castillo) wants to merge 33 commits intoMetOffice:mainfrom
Conversation
transformation kernels
for W3 to W2 interpolation in lfric2lfric
DrTVockerodtMO
left a comment
There was a problem hiding this comment.
Thanks for the changes. One minor issue regarding consistent style with the rest of the adjoint tests.
applications/adjoint_tests/source/algorithm/interpolation/adjt_interpolation_alg_mod.x90
Outdated
Show resolved
Hide resolved
|
I tried running this against LFRic-JEDI, and the JEDI interface build failed with: Any ideas what could be causing this? I've not yet ruled out an error on my part, and I will update if that is the case. |
|
It looks like the build fail is due to the addition of two new arguments ( |
Exactly, that is why there is a lfric_core linked PR. This lfric_core PR is the one modifying the kernel that you observed failing. |
|
Ah, I see the branch for that now. Is there a PR for that one yet? |
Yes, there is a link in the PR description: MetOffice/lfric_core#312. I added a link to the PR in the issue. |
DanStoneMO
left a comment
There was a problem hiding this comment.
Alright given it another shot and JEDI is all good with this. No linked PR will be needed for lfric-jedi.
DrTVockerodtMO
left a comment
There was a problem hiding this comment.
Thanks for making the changes, code owner review passed.
| if (fs == W2) then | ||
| field_src_ptr => u_in_w3_src | ||
| field_dst_ptr => u_in_w3_dst | ||
| call lfric2lfric_map_regrid(field_dst_ptr, field_src_ptr) | ||
| field_src_ptr => v_in_w3_src | ||
| field_dst_ptr => v_in_w3_dst | ||
| call lfric2lfric_map_regrid(field_dst_ptr, field_src_ptr) | ||
| field_src_ptr => w_in_wth_src | ||
| field_dst_ptr => w_in_wth_dst | ||
| call lfric2lfric_map_regrid(field_dst_ptr, field_src_ptr) |
There was a problem hiding this comment.
What's the advantage of setting pointers and then calling lfric2lfric_map_regrid rather than just doing something like:
call lfric2lfric_map_regrid(u_in_w3_dst, u_in_w3_src)
call lfric2lfric_map_regrid(v_in_w3_dst, v_in_w3_src)
call lfric2lfric_map_regrid(w_in_w3_dst, w_in_w3_src)
| field_src_ptr => u_in_w3_src | ||
| field_dst_ptr => u_in_w3_dst | ||
| call lfric2lfric_oasis_regrid(modeldb, oasis_clock, & | ||
| field_dst_ptr, field_src_ptr) | ||
| field_src_ptr => v_in_w3_src | ||
| field_dst_ptr => v_in_w3_dst | ||
| call lfric2lfric_oasis_regrid(modeldb, oasis_clock, & | ||
| field_dst_ptr, field_src_ptr) | ||
| field_src_ptr => w_in_wth_src | ||
| field_dst_ptr => w_in_wth_dst | ||
| call lfric2lfric_oasis_regrid(modeldb, oasis_clock, & | ||
| field_dst_ptr, field_src_ptr) |
There was a problem hiding this comment.
Same question here as above - what's the advantage of setting pointers here?
|
Hi Juan - the linked section in the PR summary is meant for linked PRs - i.e. PRs in other repositories that need to go on together, rather than related PRs or PRs that need to go on in sequence. Can you move the #238 mention to the "is related to" section, and clarify whether lfric_core#312 is linked, part of a chain, or just related? |
PR Summary
Sci/Tech Reviewer: Ricky Wong (@mo-rickywong)
Code Reviewer: mo-marqh
This is relatively simple change to allow lfric2lfric to regrid W2 fields. The accepted procedure to deal with W2 is to convert them to a set of two W3 and one Wtheta fields, process these fields, and then regenerate back a W2 field with the resulting W3 and Wtheta fields.
This changes will make use of the existing subroutines converting W2 to W3,Wtheta fields, and back.
When we merged this code to the trunk, we discovered that the results were not bit-comparable. After some investigation, it was discovered that the subroutines converting from W2 to W3 and the other way round have implicit dependencies on base_mesh, which have to be removed. This will be done as part of this new PR.
The dependency is in the kernel compute_sample_u_ops_code, which is called by interp_w3wth_to_w2_alg.
linked Lfric2lfric: interpolate W2 fields #238, Remove base_mesh dependencies in compute_sample_u_ops kernel lfric_core#312
closes lfric2lfric: processing W2 fields #60
fixes lfric2lfric: processing W2 fields #60
Code Quality Checklist
Testing
Test Suite Results - lfric_apps - lfric2lfric_W2/run1
Suite Information
Task Information
✅ succeeded tasks - 1512
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