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] Bind xclim indicators to missing ECAD indices #235

Merged
merged 10 commits into from
Oct 28, 2022

Conversation

bzah
Copy link
Member

@bzah bzah commented Oct 27, 2022

Draft how we should bind existing xclim indices into icclim v6 to complete the ECAD list.

Pull Request to resolve #203

  • 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

  • Add some ECAD indices that can be easily bind to xclim's indicators.
    This includes {GSL, SPI3, SPI6}.
    The same approach could be used for other missing indices that can't be generified and that are available within xclim.
  • Add some documentation for generic indices.

This PR is also related to #204 but does not fully resolve it.

@bzah bzah changed the title wip [ENH] Bind xclim indicators to missing ECAD indices Oct 27, 2022
icclim/ecad/xclim_binding.py Outdated Show resolved Hide resolved
Whenever the user gives only a year,
date_reader would complete the date with the date of the current day.
Now we complete with the first of January and show a warning.
@bzah bzah mentioned this pull request Oct 28, 2022
25 tasks
@github-actions
Copy link

github-actions bot commented Oct 28, 2022

Coverage

Report
FileStmtsMissCoverMissing
icclim
   icclim_exceptions.py7186%20
   icclim_logger.py852966%24, 43, 65, 70–95, 105, 111–142, 150–155
   main.py2702093%119, 128, 404, 489, 515–516, 518–519, 521, 523–524, 526–527, 546–553, 690, 697, 701
   utils.py37586%22, 33–34, 36–37
icclim/ecad
   xclim_binding.py48688%39, 43, 68, 72, 97, 101
icclim/generic_indices
   generic_indicators.py4728582%57, 60, 77, 81, 85, 98, 104, 178, 219, 226, 350, 379, 669, 700, 706, 714, 733, 896, 901, 921–927, 931, 961, 963, 1028–1029, 1062–1089, 1116–1137, 1153, 1162–1163, 1169–1199, 1205–1209, 1233
   standard_variable.py48198%19
   threshold.py3982195%198, 218, 222, 270, 286–289, 304, 311, 387, 526, 595, 691, 894, 916, 922, 996, 999, 1097–1099
icclim/models
   cf_calendar.py35197%20
   climate_variable.py1001090%102, 161, 172, 206, 212, 250, 254, 282–283, 320
   frequency.py1761194%167–170, 314–316, 323, 401, 427, 432
   index_group.py34197%33
   operator.py29197%14
   standard_index.py28389%56, 59, 63
icclim/pre_processing
   input_parsing.py1783381%41, 105, 110, 116, 125, 138, 167, 183, 197, 217, 225, 227, 236, 245, 263, 277–285, 294–309, 331
   rechunk.py86298%38, 132
TOTAL253023091% 

Test results

Tests Skipped Failures Errors Time
186 0 💤 0 ❌ 0 🔥 2m 8s ⏱️

@bzah bzah marked this pull request as ready for review October 28, 2022 13:52
@bzah
Copy link
Member Author

bzah commented Oct 28, 2022

@pagecp I've added in the documentation a "how to" recipe for generic indices. It's not fancy but at least it gives an overview of each generic index.

See https://icclim--235.org.readthedocs.build/en/235/how_to/recipes_generic.html

@pagecp
Copy link
Collaborator

pagecp commented Oct 28, 2022

It is really great! It will really help to startup a more full documentation later. And at least current users will be able to use those as examples.

@bzah bzah merged commit ec9bd9f into master Oct 28, 2022
@bzah bzah deleted the enh/bind_xclim_indices branch October 28, 2022 14:08
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 documentation for generic indices
2 participants