-
Notifications
You must be signed in to change notification settings - Fork 11
Fix coordinate discontinuities on x- and y-coordinates for 2D grids #181
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
base: main
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #181 +/- ##
==========================================
+ Coverage 75.58% 75.64% +0.06%
==========================================
Files 26 26
Lines 3555 3564 +9
==========================================
+ Hits 2687 2696 +9
Misses 868 868 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Can we get those unit tests too please? Good sign that existing snapshots have not changed (as expected) |
|
Well the good news is that this example surfaced a couple of bugs that I have fixed. (#184 , #183). The bad news is that this "simple" approach doesn't seem to work too well with the Is this the "feature" of the real dataset that causes the problem?
|
That's great to hear.
I hadn't visualized it like that, but that sure seems to pinpoint the issue. The fundamental challenge may be that this is a hybrid grid- could that explain the strange behavior at [0, 3297] and [4500, 1]? Here is an excerpt from the HYCOM docs. A more complete description lies here. |
|
Can you merge ScootScience#2 |
* Tweak * comment out for now * Fix size limiter again (earth-mover#183) * Add test * Fix in-place transforms for float32 coordinates. (earth-mover#184) * Update coarsen too * Update localhost example
|
Ok merged those changes into this branch. I'll try and dig into the coarsen problem soon. Thanks for all the assistance. |


Handle discontinuities in X and Y direction for curvilinear grids. (
pipeline.py).Motivation
Visualizing HYCOM ocean model data with a curvilinear grid (see: Real-Time Ocean Forecast System/RTOFS grid) with X,Y dimensions and Latitude (X,Y) / Longitude (X,Y) coordinates for a large domain in the northeast pacific.
Fixing
pipeline.pyThe issue seems to be that discontinuities can happen in either dimension for 2D grids. At different values of
Xan antimeridian crossing may or may not occur. At different values ofY, the starting value ofLongitudecan change. Previously,pipeline.subset_to_bboxwas only handling the former.pipeline.subset_to_bboxnow corrects for discontinuities in both directions.Including both of these changes gives me the image I expect.