Replies: 4 comments 2 replies
-
The code, if you don't want to bother with the download:
|
Beta Was this translation helpful? Give feedback.
-
A bit of context: the original MATLAB version included these kinds of range checks (example), but we have avoided them in pvlib-python. The responsibility is on the user to provide clean inputs, as you say.
Expected: yes, see #1387 and #1478. Desirable? Perhaps up to the user ;) |
Beta Was this translation helpful? Give feedback.
-
@AdamRJensen, should we update the PVGIS function to replace 999 with nan? |
Beta Was this translation helpful? Give feedback.
-
Yes, certainly! I could do that if nobody else volunteers 😀 |
Beta Was this translation helpful? Give feedback.
-
Hi team! I've tracked down my last two bugs, I'd like to discuss one of them. My issue was that the test TMY weather data I retrieved from PVGIS had an albedo data column (which is good), but since there was no data, all cells in that column were filled with a "999" value. Since, as of 0.9.2, pvlib.modelchain.ModelChain.run_model() now takes albedo values from the weather data into account, you can see how that can be a problem...
See attached code for a demonstration (my environment: python 3.10.11, numpy 1.25.0, pandas 2.0.3)
I don't consider this to be a bug per se; I believe it's up to the user to sanitize their data. But since albedo is expected to be between 0 and 1, it might be nice to have a check that raises a specific warning or error and/or replaces those values with a set value (0, 0.3, something like that).
Also, it looks like an albedo parameter provided explicitely in the array definition is ignored when albedo values are present in the weather data. Is that the expected behaviour? Is that the desirable behaviour?
If there is a community consensus for a course of action, I'll be happy to submit a formal code suggestion.
Thanks!
sixyphe_albedo_example.py.txt
Beta Was this translation helpful? Give feedback.
All reactions