Skip to content

Commit

Permalink
Merge pull request #171 from cerfacs-globc/enh/in_between_years_season
Browse files Browse the repository at this point in the history
Enh/in between years season
  • Loading branch information
bzah authored May 23, 2022
2 parents c43eb5d + 71ff316 commit 6d7c792
Show file tree
Hide file tree
Showing 17 changed files with 556 additions and 269 deletions.
32 changes: 24 additions & 8 deletions doc/source/references/icclim_index_api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,31 @@ summer, autumn and monthly frequency:
| The winter season (``DJF``) of 2000 is composed of December 2000, January 2001 and February 2001.
| Likewise, the winter half-year (``ONDJFM``) of 2000 includes October 2000, November 2000, December 2000, January 2001, February 2001 and March 2001.
Monthly time series with months selected by user:
>>> slice_mode = ['month',[4,5,11]] # index will be computed only for April, May and November
Monthly time series filter
++++++++++++++++++++++++++
Monthly time series with months selected by user (the keyword can be either `month` or `months`):
>>> slice_mode = ['month', [4,5,11]] # index will be computed only for April, May and November
or
>>> slice_mode = ['month',[4]] # index will be computed only for April

User defined seasons:
>>> slice_mode = ['season',[4,5,6,7]]
or
>>> slice_mode = ['season',([11, 12, 1])]
>>> slice_mode = ['month', [4]] # index will be computed only for April

User defined seasons
++++++++++++++++++++
You can either defined seasons aware of data outside their bounds (keyword `season`) or
seasons which clip all data outside their bounds (keyword `clipped_season`).
The later is most useful on indices computing spells, if you want to totally ignore spells that could
have started before your custom season.
>>> slice_mode = ['season', [4,5,6,7]] # March to July un-clipped
or
>>> slice_mode = ['season', [11, 12, 1]] # November to January un-clipped

>>> slice_mode = ['clipped_season', [4,5,6,7]]
or
>>> slice_mode = ['clipped_season', ([11, 12, 1])]

Additionally, you can define a season between two exact date:
>>> slice_mode = ['season', ["07-19", "08-14"]]
or
>>> slice_mode = ["clipped_season", ["07-19", "08-14"]]

``threshold``
~~~~~~~~~~~~~
Expand Down
1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ dependencies:
- psutil
- zarr
- fsspec
- dateparser
- pandas>=1.3
# Dev dependencies
- pre-commit
Expand Down
Loading

0 comments on commit 6d7c792

Please sign in to comment.