-
Notifications
You must be signed in to change notification settings - Fork 38
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
Fixed clip_timerange
if only a single time point is extracted
#1497
Conversation
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.
cool, thanks, Manu! Just a minor note that we should check units and calendar are preserved too
Codecov Report
@@ Coverage Diff @@
## main #1497 +/- ##
=======================================
Coverage 90.71% 90.72%
=======================================
Files 197 197
Lines 10517 10527 +10
=======================================
+ Hits 9541 9551 +10
Misses 976 976
Continue to review full report at Codecov.
|
Added! I also added support for cases where time is not the first dimension. Never seen this in any dataset, but better safe than sorry 😄 |
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.
sehr gut 😁 I've never seen time anywhere but the 0th dimension either
Description
The default behavior of
iris.cube.Cube.extract()
is to return a scalar coordinate if only a single value is extracted. This causes some NCL diagnostics to fail ifclip_timerange
extracts only single point in time. This PR fixes this behavior.Closes #1496
Before you get started
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.
To help with the number pull requests: