-
Notifications
You must be signed in to change notification settings - Fork 39
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
Missing 2m height coordinate and monotonicity for tasmin in CESM2 and CESM2-WACCM #2574
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2574 +/- ##
==========================================
+ Coverage 94.66% 94.68% +0.01%
==========================================
Files 251 251
Lines 14302 14372 +70
==========================================
+ Hits 13539 13608 +69
- Misses 763 764 +1 ☔ View full report in Codecov by Sentry. |
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.
looks good, many thanks! Would you mind running pre-commit before hand please? Also, will approve and merge if you don't want to plug in the monotonicity fix here as well 🍺
Thanks @valeriupredoi and thanks for showing me a similar fix for the monotonicity too. I've added a fix for the monotonicity as well as adding tests for them and I ran pre-commit before sending pushing the changes. Let me know if there's anything else I need to change. |
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.
many thanks @Karen-A-Garcia 🍺 A few wiggles to fix (am not 100% sure of the baseclass for Tasmin for CESM2, I think it should be a generic Fix
class there, doesn't really matter that much). One general comment related to testing: it's great that you added tests, this is always a good thing to see from users, but wrt the testing framework, I'd suggest using the Pytest test classes/functions, and not use Unittest test classes anymore - these are old school and a tad harder to adapt inside a Pytest testing framework, plus, they need a lot more indentation 😁
Thank you @valeriupredoi for looking over my code.🍺 I've changed all the old test formats and changed them so that they run with pytest. I had no issues on my end with the tests when I ran them in my terminal but let me know if there's anything else I need to change. Also looks like CESM2-FV2 and CESM2-WACCM-FV2 had some monotonicity issue so I've import changes to Tas and Pr made in CESM2 into those files. There was also one test that failed from some code that was already in the file and I couldn't really figure out how to fix it so I left it as it was. |
def test_get(self): | ||
"""Test fix get.""" | ||
self.assertListEqual( | ||
Fix.get_fixes("CMIP6", "NCAR", "day", "tasmin"), |
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.
hi @Karen-A-Garcia - these tests have not been corrected: they are still in UnitTest format, but a bit more critical, are not testing for the correct model, and also have issues with the actual tested outcome vs expected, could you please have another look at them? My code suggestion change appears to have been resolved, but the model is still wrong: you should test for CESM2-WACCM, not NCAR. Perhaps you forgot to push the changes? 🍺
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.
Oh that is so strange because it was changed on my files when I pushed them and they seemed to not have change for some reason. I'll try to fix that.
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.
No worries at all! I was suspecting it's a push issue. If it's too much trouble to convert the tests to simple pytest funcs, don't worry about it, it's great you plopped tests in anyways. Let me know if I can help in any way 👍🍺
many thanks @Karen-A-Garcia ! There are still some issues, unfortunately, please see the failed tests, and my comment above, perhaps you forgot to push to remote? Cheers! PS: I turned on Github Actions tests, since it's a lot easier to see test fails there than on CircleCI, see eg test run output |
@valeriupredoi Okay I think I've changed all the UnitTest formats into pytest now and the failed tests are coming from that code that I was previously talking about that was failing when I ran it in my terminal as well. |
excellent work @Karen-A-Garcia - many thanks! All spiffy now: the issue was that the |
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.
very many thanks @Karen-A-Garcia 🍻
This is a follow up to issue #2573 for the height coordinates. Still looking into the time issue. There was already a fix for the 2m height previously done for tas and I simply applied the fix to tasmin in both CESM2 and CESM2-WACCM files. There were already tests written for the fixes so I didn't add anything to those files.
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.