-
Notifications
You must be signed in to change notification settings - Fork 284
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
BUG: Iris AreaWeighted regrid float tolerance bug #2201
Conversation
I have started an iris dev discussion on the wider issue of dealing with floats in iris here. |
Two exceptions raised. One under python3.4 test target: default: ======================================================================
ERROR: test_simple (iris.tests.test_mapping.TestUnmappable)
----------------------------------------------------------------------
Traceback (most recent call last):
...
ValueError: Image comparison failed. Message: Actual SHA1 020e0ca45a9fbd5caef915e59c02276725919889 not in expected ['6c139dab88d9e5884d313f1a607de5e9c4fe5a93', 'a14231d0f6fe19de89dfd200d25f1d7dbc31b2ff'] for test iris.tests.test_mapping.TestUnmappable.test_simple.0. The second under python3.4 test target: example: ======================================================================
ERROR: test_atlantic_profiles (example_tests.test_atlantic_profiles.TestAtlanticProfiles)
----------------------------------------------------------------------
Traceback (most recent call last):
...
ValueError: Image comparison failed. Message: Actual SHA1 f25dc9acc16a887eb224b4970d3042f5bcfd9743 not in expected ['0bde47fbbc4a15498c0ecb8bd3eb5e63339e5121', 'b8365851d0b4b5589289026eda692c643499c7f3', 'c3a2ccc6873ddee7ea0dafd25498b743ffece4fa', '4cbda27eb65fc360d08dde0ccf40b951fdfe4453', '3a2f43bc6b1bd4397a8eb6877a128ab7a4f051ff', 'da5cd8269bcc96533c8c2f4a788e2c980381dfef'] for test example_tests.test_atlantic_profiles.TestAtlanticProfiles.test_atlantic_profiles.0. Anyone might know what this might specifically effect only python3.4? |
@cpelley unfortunately, lots of things we have moved swiftly onto perceptual hashing, to let us handle issues such as this please rebase and see how this affects your change, it should help with image comparison issues |
077701b
to
3741531
Compare
Closing this as it is replaced by #2237 which points to v1.11.x |
Floating point equality without tolerance within
iris.experimental.regrid._within_bounds
produces masked results under circumstances where different longitude ranges are wrapped by wrap_lons here when we expect them to be equal (i.e. there is a loss of precision).Here is a break point at within_bounds for the case where the source longitude extent is [-91, 0] and the target longitude extent is [270, 360]:
You will note the 6.66133815e-16 value which makes the equality checks fail, since 0 != 6.66133815e-16.
See the added unittest for the full working example.