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

Adds tests showing out-of-range data returning from scipy interpolate… #2007

Merged
merged 5 commits into from
Jun 19, 2024

Conversation

MoseleyS
Copy link
Contributor

@MoseleyS MoseleyS commented Jun 18, 2024

… and adds an np.clip to the affected plugin to overcome this

This was discovered because the interpolation of the rain falling level can produce values fractionally lower (machine-precision) than the snow falling level if both are zero before the interpolation is done.

Description

Testing:

  • Ran tests and they passed OK
  • Added new tests for the new feature(s)

MoseleyS added 2 commits June 18, 2024 09:26
… and adds an np.clip to the affected plugin to overcome this
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.42%. Comparing base (84a8944) to head (284094d).
Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2007      +/-   ##
==========================================
+ Coverage   98.39%   98.42%   +0.03%     
==========================================
  Files         124      128       +4     
  Lines       12212    12469     +257     
==========================================
+ Hits        12016    12273     +257     
  Misses        196      196              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MoseleyS MoseleyS marked this pull request as ready for review June 18, 2024 09:45
@MoseleyS MoseleyS self-assigned this Jun 18, 2024
Copy link
Contributor

@bayliffe bayliffe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine. Tests pass with change, fail without. Precision used in test is high, but only 7 decimal places beyond the order, which is suitable for float32.

@bayliffe bayliffe merged commit f61c504 into metoppv:master Jun 19, 2024
10 checks passed
@MoseleyS MoseleyS deleted the min_after_interp branch June 19, 2024 07:29
MoseleyS added a commit to MoseleyS/improver that referenced this pull request Aug 22, 2024
metoppv#2007)

* Adds tests showing out-of-range data returning from scipy interpolate and adds an np.clip to the affected plugin to overcome this

* isort

* black

* Adjusts test to test for what we care about

* Add comment
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants