Skip to content
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

Update IS_IN_UNGRID to handle if grid lon defintions are mismatched #1325

Merged

Conversation

JessicaMeixner-NOAA
Copy link
Collaborator

Pull Request Summary

Update IS_IN_UNGRID to handle if grid lon defintions are mismatched

Description

This PR adds a modified longitude point for the point that you are trying to find in a triangle element. If for example this point is -180 but the grid is defined from 0 to 360 this will address this mismatch and the point will be found in an element.

If there are regtests where the requested point output does not match the grid definition (ufs1.1) then there will be answer changes. This followed the work of the "fix periodicity" routine.

Issue(s) addressed

Fixes #1273

Commit Message

Update IS_IN_UNGRID to handle if grid lon defintions are mismatched

Check list

Testing

  • How were these changes tested? regression tests
  • Are the changes covered by regression tests? (If not, why? Do new tests need to be added?) yes
  • Have the matrix regression tests been run (if yes, please note HPC and compiler)? hera, intel
  • Please indicate the expected changes in the regression test output, (Note the list of known non-identical tests.)

We expect that unstructured grid regtests with points defined outside of it's domain definition, such as ufs1.1 will have answer changes.

  • Please provide the summary output of matrix.comp (matrix.Diff.txt, matrixCompFull.txt and matrixCompSummary.txt):
**********************************************************************
********************* non-identical cases ****************************
**********************************************************************
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)
mww3_test_03/./work_PR2_UNO_MPI_d2                     (16 files differ)
mww3_test_03/./work_PR1_MPI_d2                     (11 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 files differ)
mww3_test_03/./work_PR3_UNO_MPI_d2                     (19 files differ)
mww3_test_03/./work_PR2_UQ_MPI_d2                     (15 files differ)
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)
mww3_test_03/./work_PR3_UQ_MPI_d2                     (16 files differ)
mww3_test_09/./work_MPI_ASCII                     (0 files differ)
ww3_tp2.10/./work_MPI_OMPH                     (7 files differ)
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)
ww3_tp2.21/./work_ma                     (3 files differ)
ww3_tp2.21/./work_mb                     (3 files differ)
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)
ww3_ufs1.1/./work_unstr_b                     (4 files differ)
ww3_ufs1.1/./work_unstr_a                     (5 files differ)
ww3_ufs1.1/./work_unstr_c                     (4 files differ)
ww3_ufs1.3/./work_a                     (3 files differ)

Not originally expected non-b4b:

ww3_tp2.21/./work_ma                     (3 files differ)
ww3_tp2.21/./work_mb                     (3 files differ)

Looking into this test case closer, it looks like we're actually finding more points for the interpolation. This test might actually need further investigation (unrelated to this PR) as the interpolated output doesn't seem quite right. However it's the same before and after this PR, but the weights are slightly different.

The ufs1.1 tests now have more output points - indicating this fix is working.

@MatthewMasarik-NOAA
Copy link
Collaborator

@JessicaMeixner-NOAA thank you for tracking this down. Sorry for the delayed reply, I'm going to get the tests going now.

Copy link
Collaborator

@MatthewMasarik-NOAA MatthewMasarik-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JessicaMeixner-NOAA my testing gives the same output you got regarding b4b's.

**********************************************************************          
********************* non-identical cases ****************************          
**********************************************************************          
mww3_test_03/./work_PR1_MPI_e                     (1 files differ)              
mww3_test_03/./work_PR3_UQ_MPI_e_c                     (1 files differ)         
mww3_test_03/./work_PR3_UNO_MPI_e                     (1 files differ)          
mww3_test_03/./work_PR2_UQ_MPI_e                     (1 files differ)           
mww3_test_03/./work_PR2_UNO_MPI_e                     (1 files differ)          
mww3_test_03/./work_PR2_UNO_MPI_d2                     (14 files differ)        
mww3_test_03/./work_PR1_MPI_d2                     (15 files differ)            
mww3_test_03/./work_PR3_UNO_MPI_d2_c                     (8 files differ)       
mww3_test_03/./work_PR3_UQ_MPI_d2_c                     (16 files differ)       
mww3_test_03/./work_PR3_UNO_MPI_d2                     (15 files differ)        
mww3_test_03/./work_PR2_UQ_MPI_d2                     (14 files differ)         
mww3_test_03/./work_PR3_UQ_MPI_e                     (1 files differ)           
mww3_test_03/./work_PR3_UNO_MPI_e_c                     (1 files differ)        
mww3_test_03/./work_PR3_UQ_MPI_d2                     (16 files differ)         
mww3_test_09/./work_MPI_ASCII                     (0 files differ)              
ww3_tp2.10/./work_MPI_OMPH                     (6 files differ)                 
ww3_tp2.16/./work_MPI_OMPH                     (4 files differ)                 
ww3_tp2.21/./work_ma                     (3 files differ)                       
ww3_tp2.21/./work_mb                     (3 files differ)                       
ww3_tp2.6/./work_ST4_ASCII                     (0 files differ)                 
ww3_ufs1.1/./work_unstr_b                     (4 files differ)                  
ww3_ufs1.1/./work_unstr_a                     (4 files differ)                  
ww3_ufs1.1/./work_unstr_c                     (4 files differ)                  
ww3_ufs1.3/./work_a                     (3 files differ)                        
                                                                                
**********************************************************************          
************************ identical cases *****************************          
**********************************************************************

I'm okay approving this, I think first it would be good to know what plan you had in mind for addressing the unexpected non-b4b's?

ww3_tp2.21/./work_ma                     (3 files differ)                       
ww3_tp2.21/./work_mb                     (3 files differ)                       

@JessicaMeixner-NOAA
Copy link
Collaborator Author

My preference would be to create an issue to investigate what is going on in that regression test - which has issues regardless of this PR, the interpolation is not performing as I think we would expect. I can create that issue if you agree on this path forward or please suggest an alternative.

@MatthewMasarik-NOAA
Copy link
Collaborator

My preference would be to create an issue to investigate what is going on in that regression test - which has issues regardless of this PR, the interpolation is not performing as I think we would expect. I can create that issue if you agree on this path forward or please suggest an alternative.

Since it's not related to this PR, I agree that creating in issue to look into it is a good path forward.

@JessicaMeixner-NOAA
Copy link
Collaborator Author

Issue made: #1332

@MatthewMasarik-NOAA
Copy link
Collaborator

Issue made: #1332

Looks great! Thank you @JessicaMeixner-NOAA, I'll wrap up the review.

Copy link
Collaborator

@MatthewMasarik-NOAA MatthewMasarik-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review
Pass

Testing
Pass

See #1325 (review) for matrixCompSummary non-b4b's.

Approved.

@MatthewMasarik-NOAA MatthewMasarik-NOAA merged commit 488e3c8 into NOAA-EMC:develop Dec 13, 2024
3 of 14 checks passed
@MatthewMasarik-NOAA
Copy link
Collaborator

Thank you @JessicaMeixner-NOAA for fixing this mismatch, and posting the issue to follow up on the non-b4b's.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Be able to handle point output if point/grid mismatch because -180 to 180 vs 0 to 360
2 participants