You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "compute_ghi.py", line 41, in
tus.longitude, tus.altitude)
File "//anaconda/lib/python2.7/site-packages/pvlib/clearsky.py", line 113, in ineichen
cos_zenith = np.maximum(tools.cosd(apparent_zenith), 0)
File "//anaconda/lib/python2.7/site-packages/pvlib/tools.py", line 26, in cosd
res = np.cos(np.radians(angle))
TypeError: ufunc 'radians' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
It looks like the clearsky.ineichen takes solar zenith angle as the first argument? However, this code does reproduce what is seen in the middle figure of out[11] of irradiance.pynb for linke turbidity = 2.0, all other code being the same:
The API changed in version 0.4. I thought this tutorial worked with the new version of pvlib (it does have a note at the top saying that it should) but I guess I missed something or forgot to commit a change.
There's a very similar example in the documentation that does work...
Hi -
It looks like the Ipython notebook tutorial irradiance.pynb has code to compute the ineichen model as follows:
irrad_data = pvlib.clearsky.ineichen(times, tus.latitude, tus.longitude, tus.altitude)
irrad_data.plot()
Which gives an error:
Traceback (most recent call last):
File "compute_ghi.py", line 41, in
tus.longitude, tus.altitude)
File "//anaconda/lib/python2.7/site-packages/pvlib/clearsky.py", line 113, in ineichen
cos_zenith = np.maximum(tools.cosd(apparent_zenith), 0)
File "//anaconda/lib/python2.7/site-packages/pvlib/tools.py", line 26, in cosd
res = np.cos(np.radians(angle))
TypeError: ufunc 'radians' not supported for the input types, and the inputs could not be safely coerced to any supported types according to the casting rule ''safe''
It looks like the clearsky.ineichen takes solar zenith angle as the first argument? However, this code does reproduce what is seen in the middle figure of out[11] of irradiance.pynb for linke turbidity = 2.0, all other code being the same:
irrad_data = tus.get_clearsky(times, model='ineichen', linke_turbidity=2)
The text was updated successfully, but these errors were encountered: