cerfacs-globc / icclim

icclim: Python library for climate indices and climate indicators calculation.
https://icclim.readthedocs.io/en/latest/
Apache License 2.0
80 stars 32 forks source link

ENH: Make it possible to pass files in any order and guess the variables to be used #299

Open bzah opened 7 months ago

bzah commented 7 months ago

Description

It would be nice if icclim could guess which variable to use when given a list of files and the index expected variable is known. for example, fetch tasmax in files if computing SU.

bzah commented 7 months ago

@pagecp, I fogot about it but, it's already implemented. You can run icclim.cw(["pr.nc", "tas.nc"]) and it will work whatever is the order of the two files as long as a pr (or its aliases) and a tas (or its aliases) is found in the merged Dataset. I could not find this in the documentation though, I will keep this issue open to update the doc.