Closed itsklimov closed 7 months ago
@itsklimov the CEC module database doesn't contain parameters for any of the AOI models. You'll need to add those parameters to module_parameters
for the AOI model you choose.
Either
mc = ModelChain(system, pv_location, aoi_model='no_loss')
which skips the AOI model, or set aoi_model
to be one of 'physical', 'ashrae', 'sapm', 'martin_ruiz', 'interp' and add the parameters for that model's function. The function are in pvlib.iam
.
@pvlib/pvlib-core Since several AOI models have default parameters, we could add a bit more intelligence here and use default parameters when such a model is specified but no parameters are given.
Since several AOI models have default parameters, we could add a bit more intelligence here and use default parameters when such a model is specified but no parameters are given.
If I understand the idea correctly, I think this already works. See this example where aoi_model='physical'
is specified but no parameters are supplied: https://pvlib-python.readthedocs.io/en/stable/gallery/irradiance-transposition/plot_mixed_orientation.html
I solved it based on https://github.com/pvlib/pvlib-python/issues/621 I added relative_humidity to the weather forecast and used weather["precipitable_water"] = pvlib.atmosphere.gueymard94_pw(weather["temp_air"], weather["relative_humidity"]) # needed for aoi_model="physical"
sorry for the dumb question, how to determine which of the ‘physical’, ‘ashrae’, ‘martin_ruiz’, "no_loss" models best fit for my setup?
'physical' and 'martin_ruiz' are more popular, and these two models give similar results. Without measurements of the reflections from that Mission Solar module I don't think there's much basis to prefer one model over another.
I solved it based on #621 I added relative_humidity to the weather forecast and used weather["precipitable_water"] = pvlib.atmosphere.gueymard94_pw(weather["temp_air"], weather["relative_humidity"]) # needed for aoi_model="physical"
Just to clarify, precipitable_water
is used for the spectral mismatch model, not the AOI model.
Since several AOI models have default parameters, we could add a bit more intelligence here and use default parameters when such a model is specified but no parameters are given.
If I understand the idea correctly, I think this already works. See this example where
aoi_model='physical'
is specified but no parameters are supplied: https://pvlib-python.readthedocs.io/en/stable/gallery/irradiance-transposition/plot_mixed_orientation.html
So it does. Specify aoi_model
and the code skips the inference step.
Question addressed.
Describe the bug if I use cells from pvlib.pvsystem.retrieve_sam("CECMod") I get: ValueError: could not infer AOI model from system.arrays[i].module_parameters. Check that the module_parameters for all Arrays in system.arrays contain parameters for the physical, aoi, ashrae, martin_ruiz or interp model; explicitly set the model with the aoi_model kwarg; or set aoi_model="no_loss".
To Reproduce Steps to reproduce the behavior: setup:
Expected behavior expected to have the model to perform calculations
Versions:
pvlib.__version__
: 0.10.3pandas.__version__
: 2.0.3How to fix it? passing aoi_model="physical" to mc leading to KeyError: 'precipitable_water'
Shouldn't they be interchangeable with Sandia modules?