Closed shartgring closed 2 months ago
Hey @shartgring thank you for reporting this issue. The core team is really busy at the moment preparing for v1, so I'm not sure when we'll have time to address this issue, but given that you seem to have done some diagnosing yourself, would you be interesting in making a PR to fix this yourself? If you're not sure how to go about the PR I'm happy to walk you through it.
Sounds good Sam! I have made a fork as I needed the implementation this week. I will work a bit more on it and then see if I can share that. I'll come back to you if I encounter any problems or when I need some help :)
@savente93 I fixed it on my own fork and tested it within my own project. Seems to work like a charm. I created a pull request https://github.com/Deltares/hydromt/pull/918 I hope the PR looks okay and otherwise let me know how I can improve it :)
The PET workflow using pyet can still be improved for readability as variables get mixed up. However in terms of fixing that the error is not raised anymore, the fix in the PR is sufficient
I'll try and have a look at it today. thanks!
HydroMT version checks
Reproducible Example
Using simple Penman-Monteith method to determine pet results in an error. pyet is used to calculate the actual vapor pressure. The wrong arguments are parsed to the pyet function or the wrong function is used. From the hydromt log:
And indeed, the following lines can be found in
forcing.py
:According to pyet documentation,
pyet.calc_e0
takes onlyt_mean
as argument. But maybe it should bepyet.calc_ea
which calculated the actual vapor pressure? That one also accepts multitple arguments, includingtmax, tmin, rh
. See also https://github.com/pyet-org/pyet/blob/ff411787fbaeaa903b9966e28df41db9afb05a28/pyet/meteo_utils.py#L222Note: I tried this using pyet version 1.3.1, hydromt version 0.9.4 and hydront_wflow version 0.5.0
Current behaviour
Gives an error when computing pet when not providing pressure term. The error is raised when pressure is calculated by pyet package
Desired behaviour
Change arguments for pyet.calc_e0 or use pyet.calc_ea
Additional context
No response