pvwatts run moel from effective irradiance: p_mp missing

35 views
Skip to first unread message

Iván Lombardero

unread,
Sep 15, 2024, 5:39:03 PM9/15/24
to pvlib-python
When running a ModelChain from the effective irradiance and using pvwatts for the dc model I got an error as apparently it tries to parse p_mp as a datetime. I've tried to follow the error but I haven't found the root cause, am I missing anything here?

As a quick example I've chosen the bifacial modelchain example from the gallery ( Bifacial Modeling - modelchain — pvlib python 0.11.0 documentation (pvlib-python.readthedocs.io)), add the two requested parameters for the module in pvwatts (pdc0 and gamma_pdc) and set the dc_model to pvwatts. Just to make sure nothing else was causing the error I've defined temp_air, and wind_speed as well as the models to be  used for the temperature model and the ac model (notebook attached). I'm using pvlib 0.11.0 and python 3.11.7 on Windows 10.

Thanks for your support.
plot_bifi_model_mc_pvwatts.ipynb

cwh...@sandia.gov

unread,
Sep 15, 2024, 6:41:25 PM9/15/24
to pvlib-python
That certainly is a weird way for pvlib to inform you of a problem with the selected combination of models.

The PVWatts DC model only calculates p_mp. The "sandia" inverter model also needs v_mp, which is not found in the ModelChain.results from the DC calculation, and that's ultimately the problem with your code.

Set the inverter model to "pvwatts", define parameters for the inverter (e.g., pvwatts_inverter['pdc0'] = cec_inverter['Pdc0']) and you should be fine.

Cliff

Iván Lombardero

unread,
Sep 16, 2024, 12:28:53 PM9/16/24
to pvlib-python
ouch, should've seen it nevertheless. Thanks for the quick feedback.
Reply all
Reply to author
Forward
0 new messages