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

Enh/in between years season #171

Merged
merged 11 commits into from
May 23, 2022
Merged

Enh/in between years season #171

merged 11 commits into from
May 23, 2022

Conversation

bzah
Copy link
Member

@bzah bzah commented May 6, 2022

Pull Request to resolve #162

  • Unit tests cover the changes.
  • These changes were tested on real data.
  • The relevant documentation has been added or updated.
  • A short description of the changes has been added to doc/source/references/release_notes.rst.

Describe the changes you made

Added the possibility to create a season between two dates using slice_mode.

slice_mode=["season", ["15 june", "25-08"] ]

Various date format are accepted thanks to dateparser library.
I think we should try to use it as well on time_range and base_periode_time_range parameters

wip:

  • wait for xclim PR to be merged
  • List all indices where season cannot be computed on
  • Forbid calling these indices in icclim with a seasonal slice_mode

bzah added 5 commits May 3, 2022 18:01
- test with real data
- add unit tests
- Add filtering of missing values (start and end of data sampled period) when having DJF or similar season (between years)
We can have a workaround in icclim until it is done in xclim
- fix todos
- add documentation on slice_mode doc
@bzah bzah force-pushed the enh/in_between_years_season branch from e48deb8 to 11ce826 Compare May 6, 2022 06:46
@bzah bzah mentioned this pull request May 6, 2022
4 tasks
@bzah bzah force-pushed the enh/in_between_years_season branch from d7efa23 to 3981c72 Compare May 6, 2022 07:39
@bzah bzah marked this pull request as ready for review May 20, 2022 10:05
bzah added 3 commits May 23, 2022 17:42
There is no real benefit of maintaining an icclim specific
implementation for the same functions.
@github-actions
Copy link

Coverage

Report
FileStmtsMissCoverMissing
icclim
   ecad_functions.py2674185%769–803, 807–812, 991–992, 1017, 1042, 1044, 1076
   icclim_exceptions.py17476%18, 32, 43, 46
   icclim_logger.py863362%21–24, 46, 58, 68, 73–98, 108, 114–145, 153–158
   main.py1972587%69, 232, 271, 289, 310–311, 313, 336–340, 354–356, 379–386, 408, 416, 418–419, 423, 453
   utils.py14286%10, 21
icclim/clix_meta
   clix_meta_indices.py42198%56
icclim/models
   cf_calendar.py34197%68
   ecad_indices.py89199%458
   frequency.py177597%294, 301, 352, 378, 430
   index_config.py1162083%129, 143, 161, 170–173, 187, 207, 214, 223, 234, 243, 250, 255–263
   netcdf_version.py13469%14–17
   quantile_interpolation.py15567%15–19
   user_index_config.py106992%41–44, 59, 88, 178, 180, 184
icclim/pre_processing
   input_parsing.py47198%30
   rechunk.py86298%39, 129
icclim/tests
   test_rechunk.py25292%62, 90
icclim/user_indices
   calc_operation.py76199%188
   operators.py1814277%104, 187, 200, 203, 220–229, 235–251, 321, 333, 339, 344, 364, 366, 385, 393–394, 413, 422, 430, 442, 461–485
   stat.py17947%14, 26–32, 40–42
TOTAL277120892% 

Test results

Tests Skipped Failures Errors Time
183 0 💤 0 ❌ 0 🔥 41.831s ⏱️

@bzah bzah merged commit 6d7c792 into master May 23, 2022
@bzah bzah deleted the enh/in_between_years_season branch May 23, 2022 18:06
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.

ENH: Add option to resample between two dates using slice_mode
1 participant