Open wholmgren opened 2 years ago
Append v5
to the function names? So ModelChain.with_pvwattsv5
, etc, and deprecate the originals
After thumbing up, second thought: append v5
to base layer functions but add a parameter to ModelChain.with_pvwatts
.
The release note itself seems ambiguous, since the "Detailed PV Model" has several module and inverter options, and incomplete, since the parameters for those options aren't identified. Regardless, I think it's a good idea to create and maintain ways in which pvlib users can run a PVWatts version of their choice and to document what that choice implies technically.
The following note from the SAM website may also be relevant:
Note: The PVWatts website uses a different version numbering system than the PVWatts model. For example, the website "Version 6" uses the PVWatts Version 5 model.
Is the overall idea to offer a complete set of functions for each (or at least more than one) pvwatts version?
I think there are two independent goals here. For one, to resolve the ambiguity of what models our current "pvwatts_dc" et al. functions implement. For two, to make space for emulating other PVWatts versions, which yes is something I'd like to do for at least v8.
FYI I suspect much of PVWatts v8 is already implemented in pvlib (although called something else, e.g. sam_noct
and the CEC models), but I'm waiting until they publish an official description before taking a closer look.
I support those goals. Assuming that there will be several versions implemented eventually (someone might want to add older ones too) then probably there will be only a few base functions that differ from one version to the next. Would the version suffix refer to the version where the function was introduced? Do any of them them predate v5 currently?
Would the version suffix refer to the version where the function was introduced?
That makes sense to me. The docstring could list any newer versions that also use it.
Do any of them them predate v5 currently?
I don't think any pvlib functions with "pvwatts" in the name (currently just the module, inverter, and system loss models) implement pre-v5 models. My understanding is that versions 1 through 4 used the same performance models (the differences were in other aspects like weather data and UI), so it is sufficient to compare the technical reference for Version 1 with that of Version 5.
As an aside, if someone does add the v1 models to pvlib someday, it might be more correct to name them pvform
rather than pvwattsv1
.
The SAM Version 2021.12.02 release notes describe major changes to the PVWatts model:
We should add a note or a warning to
pvsystem.pvwatts_dc
andinverter.pvwatts
. AndModelChain.with_pvwatts
is also now ambiguous.