Correctly assign/discard soundings in regional MPAS-A and on concave decompositions#398
Open
MiCurry wants to merge 3 commits intoMPAS-Dev:developfrom
Open
Correctly assign/discard soundings in regional MPAS-A and on concave decompositions#398MiCurry wants to merge 3 commits intoMPAS-Dev:developfrom
MiCurry wants to merge 3 commits intoMPAS-Dev:developfrom
Conversation
This commit fixes a possible bug where a sounding could be assigned to the wrong cell. It replaces the path-based, nearest cell function with a KD-Tree datastructure that correctly determines nearest cells. However, this commit does not fix a bug while running regional MPAS-A where a sounding location that is specified outside of the simulation region is assigned incorrectly to a boundry cell.
This commit discards soundings that are outside a limited-area domain, rather then assigning them to incorrect cells. Using the in_cell function and the KD-Tree added in the last commit, soundings are discarded if they are determined to be outside of the region; however, it does not communicate these actions with the user.
This commit adds logic for determining whether a warning log message should be produced for a sounding or not. A point that is determined to not be owned by a task (via in_cell), might still be within the region in another decomposition. Thus, to avoid multiple tasks reporting that a sounding is discarded, tasks need to have some cooperation on determining if a sounding is completely outside of the limited area region.
Contributor
|
Since we use the |
Contributor
Author
|
The KD Tree should either be updated with the tie-break code from #630, symlinked with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull requests contains changes for fixing two bugs related to sounding locations in MPAS-A.
The first fix, fixes soundings being wrongly assigned to a wrong cell upon a concave decomposition. The first commit adds a K-Dimensional Tree which circumvents nearest_cell's flaw and correctly assigns the sounding to the correct cell, regardless of the decomposition.
The next fix, discards soundings that lie outside of a simulation's region by using the KD-Tree and the in_cell routine. The last commit adds logic to communicate to the user the sounding discard using MPI. Without this MPI communication, a sounding may be 'discarded' when it is in fact in the region, but owned by another task.
@mgduda I didn't realize this was two bug fixes in one. We could easily remove the KD-Tree and use nearest_cell and the in_cell routine to discard soundings outside of the region and then make another PR using the KD fixing the concave decomposition for the next release.