Closed
Description
Hi,
Just working my way through the procedural example given in the package overview. I copied-and-pasted the code and it runs fine. Then I want to select my own modules that are in the list of CEC modules rather than the Sandia modules
sandia_modules = pvlib.pvsystem.retrieve_sam('cecmod')
and
module = sandia_modules['Seraphim_Solar_System_SRP_275_6PA']
but when I do this I get an error, no matter which module I use. (I haven't written code to try them all but I have tried several and they all seem to produce the same error.)
C:\Users\Vignesh\Anaconda3\lib\site-packages\pvlib\clearsky.py:126: RuntimeWarning: invalid value encountered in fmax
ghi = cg1 * dni_extra * cos_zenith * tl / tl * np.fmax(ghi, 0)
C:\Users\Vignesh\Anaconda3\lib\site-packages\pvlib\clearsky.py:131: RuntimeWarning: invalid value encountered in fmax
bnci = dni_extra * np.fmax(bnci, 0)
Traceback (most recent call last):
File "<ipython-input-27-d0a44f15ba73>", line 1, in <module>
runfile('//emtserver/sharing/User Shared Folder/a. ENERGY/Glen/PVlib/package_overview_raw.py', wdir='//emtserver/sharing/User Shared Folder/a. ENERGY/Glen/PVlib')
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)
File "//emtserver/sharing/User Shared Folder/a. ENERGY/Glen/PVlib/package_overview_raw.py", line 71, in <module>
am_abs, aoi, module)
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\pvlib\pvsystem.py", line 1565, in sapm_effective_irradiance
F1 = sapm_spectral_loss(airmass_absolute, module)
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\pvlib\pvsystem.py", line 1460, in sapm_spectral_loss
am_coeff = [module['A4'], module['A3'], module['A2'], module['A1'],
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\pandas\core\series.py", line 601, in __getitem__
result = self.index.get_value(self, key)
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 2491, in get_value
raise e1
File "C:\Users\Vignesh\Anaconda3\lib\site-packages\pandas\core\indexes\base.py", line 2477, in get_value
tz=getattr(series.dtype, 'tz', None))
File "pandas\_libs\index.pyx", line 98, in pandas._libs.index.IndexEngine.get_value
File "pandas\_libs\index.pyx", line 106, in pandas._libs.index.IndexEngine.get_value
File "pandas\_libs\index.pyx", line 154, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 1210, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 1218, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'A4'
Metadata
Metadata
Assignees
Labels
No labels