-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add Var.split_by_season_across_time #207
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #207 +/- ##
==========================================
+ Coverage 98.25% 98.31% +0.05%
==========================================
Files 12 12
Lines 1263 1302 +39
==========================================
+ Hits 1241 1280 +39
Misses 22 22 ☔ View full report in Codecov by Sentry. |
cf10715
to
3bad53f
Compare
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.
Can you please also add a FAQ explaining the difference between the two functions and caveats?
NEWS.md
Outdated
It may be the case that you want to split seasons, but also want to retain the order that | ||
the seasons appear in across time. This can be done by using `split_by_season_across_time`. |
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.
I don't understand this. Could you add an example?
src/Utils.jl
Outdated
""" | ||
split_by_season_across_time(dates::AbstractArray{<:Dates.DateTime}) | ||
|
||
Split `dates` into a vector of vectors of dates split by seasons across time. |
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.
Can you add some further description here?
It is not clear what this function does just by reading the docstring
src/Var.jl
Outdated
""" | ||
split_by_season_across_time(var::OutputVar) | ||
|
||
Return a vector of `OutputVar`s split by season across time. |
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.
Can you add some further description here?
It is not clear what this function does just by reading the docstring and how it differs from split_by_season
src/Var.jl
Outdated
expected to be second. Also, the interpolations will be inaccurate in time intervals | ||
outside of their respective season for the returned `OutputVar`s. |
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.
Let's move this "Also" in a note and explain it a little bit better (maybe with an example)
Refactor `Var.split_by_season` into `Var._check_time_dim` and `Var._split_along_dim`.
3bad53f
to
d2bc04c
Compare
d2bc04c
to
cc93bac
Compare
This PR adds
Var.split_by_season_across_time
. The difference between this andVar.split_by_season
is that the splitting is also done across time.