-
Notifications
You must be signed in to change notification settings - Fork 42
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 SphericalVector
to work with StructuredColumns as source functionspace.
#175
Update SphericalVector
to work with StructuredColumns as source functionspace.
#175
Conversation
Is there a better way to sort this out? ... The code above looks a bit hacky. |
"Once #174 is addressed, this block can be deleted and the PR will be ready for review." 🙂 |
@wdeconinck @MarekWlasak I've commented on a very simple solution in #174 which I believe this PR closes. I've also added some further tests to make sure sensible values are returned for points located on a pole. Thanks, all! |
@@ -3,7 +3,7 @@ | |||
* | |||
* This software is licensed under the terms of the Apache Licence Version 2.0 | |||
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0. | |||
* In applying this licence, ECMWF does not waive the privileges and immGeometryies | |||
* In applying this licence, ECMWF does not waive the privileges and immunities |
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.
Thanks for keeping our immunities intact 🙃
@@ -45,7 +43,10 @@ void GeometrySphere::xyz2lonlat(const Point3& xyz, Point2& lonlat) const { | |||
/// @ref https://en.wikipedia.org/wiki/Great-circle_navigation | |||
/// | |||
std::pair<double, double> greatCircleCourse(const Point2& lonLat1, | |||
const Point2& lonLat2) { | |||
const Point2& lonLat2) { | |||
if (lonLat1 == lonLat2) { |
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.
This should be using bool points_equal(const Point2&, const Point2&)
I have a more consistent way to compare these in an upcoming PR (a refactoring of the geometry library) and I've already included the "course" methods there, but they will need updating to your improved version, when that time comes :-)
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.
That's correct, that it should use "points_equal". But that already happens. See https://github.com/ecmwf/atlas/blob/develop/src/atlas/util/Point.h#L32-L34.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #175 +/- ##
========================================
Coverage 80.07% 80.07%
========================================
Files 859 859
Lines 63677 63686 +9
========================================
+ Hits 50987 50997 +10
+ Misses 12690 12689 -1 ☔ View full report in Codecov by Sentry. |
Thanks for taking a look. Just to summarise, are there any changes you'd like? It looks like MacOS build is falling over, but I'm not sure if that's down to this PR. |
SphericalVector
test to include halo exchange.SphericalVector
to work with StructuredColumns as source functionspace.
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.
Thanks @odlomax for the fixes and discussions.
* release/0.37.0: (23 commits) Update Changelog Version 0.37.0 Projection base implementation derivatives performance/encapsulation … (#185) atlas_io is an adaptor library when eckit_codec is available (#181) Fix build for configuration setting ATLAS_BITS_LOCAL=64 (#184) Revert "Avoid linker warnings on macOS about 'ld: warning: could not create compact unwind for ...'" Cosmetic: readability braces Initialize std::array values to zero because valgrind complains, even though c++ standard mandates it should be default-initialized to zero Fix bug in TraceT caused by typo where the title was wrong Avoid linker warnings on macOS about 'ld: warning: could not create compact unwind for ...' Use new LocalConfiguration baseclass functions in util::Config and util::Metadata instead of eckit::Value backdoor Removed leftover code missed in PR #175 Update `SphericalVector` to work with StructuredColumns as source functionspace. (#175) Bugfix for regional grids with ny > nx Refactoring of interpolation::method::SphericalVector and implementation of adjoint methods. (#168) Added test with empty integer sequence. Added arrayForEachDim method. Add docs build workflow Github Actions: Fix macOS MPI slots Fix for elements that might have unassigned partition via parallel Delaunay meshgenerator ...
This draft PR updates the test from PR #168 to include halo exchanges. Due to issue #174, the following code has to be added before
Inderpolation::exectute
is called:For other functionspaces, the type is set to
vector
and the halo exchange is called withinInderpolation::exectute
.If you comment out this block, you'll reproduce the output in #174 .
Once #174 is addressed, this block can be deleted and the PR will be ready for review.
Edit: further additions to this PR will close #174