I have encountered an issue when trying to use TMY data downloaded from the NSRDB in PSM3 format. I am attempting to load the data with readInputTMY:
TMYfile = 'C:\\Users\\etonita\\Documents\\WeatherFiles\\Golden_CO_tmy-2022.csv'
myTMY3, meta = bifacialvf.readInputTMY(TMYfile)
This results in the following error:
File ~\AppData\Local\anaconda3\Lib\site-packages\pvlib\iotools\tmy.py:205 in read_tmy3
meta['altitude'] = float(meta['altitude'])
ValueError: could not convert string to float: 'Longitude'
A work-around I have implemented is to use pvlib to load in the TMY data and rename the meta variables according to what bifacialvf is looking for:
myTMY3, meta = pvlib.iotools.read_psm3(TMYfile,map_variables=True)
meta['TZ']=meta['Time Zone']
meta['city']=meta['City']
myTMY3["DNI"]=myTMY3["dni"]
myTMY3["DHI"]=myTMY3["dhi"]
myTMY3["GHI"]=myTMY3["ghi"]
I have encountered an issue when trying to use TMY data downloaded from the NSRDB in PSM3 format. I am attempting to load the data with readInputTMY:
This results in the following error:
File ~\AppData\Local\anaconda3\Lib\site-packages\pvlib\iotools\tmy.py:205 in read_tmy3 meta['altitude'] = float(meta['altitude']) ValueError: could not convert string to float: 'Longitude'
A work-around I have implemented is to use pvlib to load in the TMY data and rename the meta variables according to what bifacialvf is looking for:
This solves the issue.