-
Notifications
You must be signed in to change notification settings - Fork 164
C grid interpolation for VectorFields #2152
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
Merged
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
8d025da
Start of implementing C-Grid interpolation
erikvansebille 50d9d52
Moving C-grid velocity code from v3 to v4
erikvansebille 3226306
use time_interval type to set default time
erikvansebille 1bd7e0c
Adding nemo curvilinear test for C-grid
erikvansebille 2da436a
Speeding up curvilinear search by dask loading lon and lat
erikvansebille 0e1a221
Updating c-grid velocity test and algorithm
erikvansebille 1ecab22
Fixing vector interpolation
erikvansebille 8b1b830
Fixing CGrid_Velocity interpolation for multiple particles
erikvansebille cad34e0
Adding better error message handling for CGrid_velocity interpolation
erikvansebille 26cffcc
Adding warning suppression for index_search
erikvansebille e2376e2
Fixing error when Grid does not have lon or lat
erikvansebille 6529e13
Fixing to keep the maximum Error code in field
erikvansebille bbc2c30
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille dda469d
Adding NEMO3D test
erikvansebille 76d015b
Updating CGrid interpolation to not interpolate over depth for U and V
erikvansebille 196c6e7
Fixing W interpolation for CGrid
erikvansebille 1c948dd
Fixing stommel gyre CGrid interpolation test
erikvansebille df78b62
Updating failing unit test
erikvansebille cd69147
Further fixing unit test by dropping unused dimensions
erikvansebille 1a64033
Temporary fix to spatialhash
erikvansebille 7c1a87a
Adding TODO statement about spherical meshes
erikvansebille 07a8238
Updating spherical mash hashmap creation
erikvansebille f77f5f4
merge
erikvansebille 2924ee0
Fixing grid._mesh in interpolator
erikvansebille 9264d8a
Merge branch 'feature/morton-hashing' into c-grid-interpolation
erikvansebille 1a17911
Using is_dask_collection to check for dask in interpolation
erikvansebille 6753e81
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille 5bdc874
Fixing vector_interp_method
erikvansebille a0962dc
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille 6659a1d
fixing merging bugs
erikvansebille f14e8cb
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille 2568feb
Using is_dask_collection for c-grid interpolator
erikvansebille 525ec71
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille cebda92
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille 0ac7ae0
Removing mesh types check for VectorField
erikvansebille 872b75c
Setting lon and lat as coordinates
erikvansebille 0be3404
Merge branch 'v4-dev' into c-grid-interpolation
erikvansebille 38622fc
Merge branch 'v4-dev' into c-grid-interpolation
VeckoTheGecko File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which scenarios would produce the errors in particular are we ignoring here? And is the rest of the code robust to the nans/inf values that ignoring the errors would produce?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The way that
np.whereworks is that it always computes both the True and False results (as far as I understand).That means that it will for example take the
np.sqrt(det2)even ifdet2 < 0, leading to a lot of warnings (have you not seen them in your test results?).The
with np.errstate()filters these warnings outSo yes, the code is robust to NaNs and Infs, because these would not be warnings but errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one option would be to do:
lets just merge for now and leave this 'unresolved' in the PR - minor thing