Skip to content
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

Always round when calculating scaled integers #211

Open
pp-mo opened this issue Jun 15, 2020 · 0 comments
Open

Always round when calculating scaled integers #211

pp-mo opened this issue Jun 15, 2020 · 0 comments

Comments

@pp-mo
Copy link
Member

pp-mo commented Jun 15, 2020

IMHO we should be rounding any time we convert a float value to a scaled integer.

While making a fix in #210, I scanned the whole of save_rules.py for "int(" and found several several other places in this code where rounding should probably be applied and is not :

However, fixing the first of those breaks a test in Iris iris.tests.integration.format_interop.test_name_grib, which is also a CML-based one ...
which means we would need to release the new iris-grib, and only then fix Iris, as there is no sensible way to apply a tolerance to this test.

As #210 is to enable the version 0.16 release, I declined to take on the bigger issues at that time.
But maybe we should revisit + fix these other places.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Development

No branches or pull requests

1 participant