-
Notifications
You must be signed in to change notification settings - Fork 1.1k
improve modelchain inference error text #703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -216,6 +216,9 @@ class ModelChain(object): | |
interface for all of the modeling steps necessary for calculating PV | ||
power from a time series of weather inputs. | ||
|
||
See https://pvlib-python.readthedocs.io/en/stable/modelchain.html | ||
for examples. | ||
|
||
Parameters | ||
---------- | ||
system : PVSystem | ||
|
@@ -411,7 +414,8 @@ def infer_dc_model(self): | |
return self.pvwatts_dc, 'pvwatts' | ||
else: | ||
raise ValueError('could not infer DC model from ' | ||
'system.module_parameters') | ||
'system.module_parameters. Check parameters or ' | ||
'explicity set model with dc_model kwarg.') | ||
|
||
def sapm(self): | ||
self.dc = self.system.sapm(self.effective_irradiance/1000., | ||
|
@@ -530,7 +534,8 @@ def infer_ac_model(self): | |
return self.pvwatts_inverter | ||
else: | ||
raise ValueError('could not infer AC model from ' | ||
'system.inverter_parameters') | ||
'system.inverter_parameters. Check parameters or ' | ||
'explicity set model with ac_model kwarg.') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
||
def snlinverter(self): | ||
self.ac = self.system.snlinverter(self.dc['v_mp'], self.dc['p_mp']) | ||
|
@@ -577,7 +582,10 @@ def infer_aoi_model(self): | |
return self.ashrae_aoi_loss | ||
else: | ||
raise ValueError('could not infer AOI model from ' | ||
'system.module_parameters') | ||
'system.module_parameters. Check that the ' | ||
'parameters contain physical, aoi, or ashrae ' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'coefficients, explicity set model with ' | ||
'aoi_model kwarg, or set aoi_model="no_loss".') | ||
|
||
def ashrae_aoi_loss(self): | ||
self.aoi_modifier = self.system.ashraeiam(self.aoi) | ||
|
@@ -629,8 +637,9 @@ def infer_spectral_model(self): | |
raise ValueError('could not infer spectral model from ' | ||
'system.module_parameters. Check that the ' | ||
'parameters contain valid ' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
'first_solar_spectral_coefficients or a valid ' | ||
'Material or Technology value') | ||
'first_solar_spectral_coefficients, a valid ' | ||
'Material or Technology value, or set ' | ||
'spectral_model="no_loss".') | ||
|
||
def first_solar_spectral_loss(self): | ||
self.spectral_modifier = self.system.first_solar_spectral_loss( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicitly set the model with the dc_model kwarg