- Posts: 5
SSC Module PVWattsv5_1ts vs pvsamv1 and shading
- Stephen Peters
- Topic Author
Less
More
22 Nov 2016 10:33 #4951
by Stephen Peters
SSC Module PVWattsv5_1ts vs pvsamv1 and shading was created by Stephen Peters
Hello,
I am fairly new to using SAM and the SDK so please bare with me. (and if there is some documentation I have missed please point me that way)
I am using the python SSC API and would like to incorporate shading into the time series predictions I am making. I understand that SAM has the ability to incorporate shading via the pvsamv1 module.
If I switch to using this module I get an error saying "precheck input: variable 'solar_resource_file' required but not assigned time -1".
I have not assigned 'solar_resource_file' as I am feeding in the resource data and using the SSC to make a prediction one timestamp at a time, as seen below.
Is it possible to use pvsamv1 in a similar way I am using PVwattsV5_1ts? If not is there a way to incorporate self-shading losses into the PVwatts calculations based on the parameters I have such as fixed or tracker, GCR, tilt?
Any help would be great!! Thanks in advance!
#### example code ####
for idx, row in solarData.iterrows():
year = row.year
month = row.month
day = row.day
hour = row.hour
dni = row
diffuse = row
temp = row
wndspd = row
poaIn, tcellIn, dcIn, acIn = self._samSDK(year, month, day, hour, self.min_past_hour, self.lat, self.lon, self.tz, dni, diffuse, temp, wndspd, self.track, poaPrev)
I am fairly new to using SAM and the SDK so please bare with me. (and if there is some documentation I have missed please point me that way)
I am using the python SSC API and would like to incorporate shading into the time series predictions I am making. I understand that SAM has the ability to incorporate shading via the pvsamv1 module.
If I switch to using this module I get an error saying "precheck input: variable 'solar_resource_file' required but not assigned time -1".
I have not assigned 'solar_resource_file' as I am feeding in the resource data and using the SSC to make a prediction one timestamp at a time, as seen below.
Is it possible to use pvsamv1 in a similar way I am using PVwattsV5_1ts? If not is there a way to incorporate self-shading losses into the PVwatts calculations based on the parameters I have such as fixed or tracker, GCR, tilt?
Any help would be great!! Thanks in advance!
#### example code ####
for idx, row in solarData.iterrows():
year = row.year
month = row.month
day = row.day
hour = row.hour
dni = row
diffuse = row
temp = row
wndspd = row
poaIn, tcellIn, dcIn, acIn = self._samSDK(year, month, day, hour, self.min_past_hour, self.lat, self.lon, self.tz, dni, diffuse, temp, wndspd, self.track, poaPrev)
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
22 Nov 2016 15:32 #4952
by pgilman
Replied by pgilman on topic SSC Module PVWattsv5_1ts vs pvsamv1 and shading
Dear Stephen,
For documentation of both SAM's detailed photovoltaic model and PVWatts, please see the Performance Model documentation page:
sam.nrel.gov/performance
The latest version of SAM (2016.3.14 r4) has a code generator that generates code in each of the languages supported by the SAM SDK, including Python. That might be a useful way for you to avoid errors caused by incorrectly assigning values to inputs. To use the code generator, start SAM and create a case for a system like the one you would like to model in the SDK. Then, on the Case menu (click the carrot symbol next to the case's name on the Case tab at the top of the SAM window), click Generate code, and choose a language.
In pvsamv1, you can use
instead of
to use an array of weather data in place of a weather file. However, it is not possible to run pvsamv1 for a single time step as it is with pvwattsv5_1ts, so you have to provide pvsamv1 with a full year's worth of weather data.
In PVWatts V5, when you choose 1 Axis Tracking (
= 2) or 1 Axis Backtracking (
= 3) for the Array type, the model automatically calculates self-shading losses. In pvsamv1, it is possible to use one-axis tracking with no self shading, but not in PVWatts.
Best regards,
Paul.
For documentation of both SAM's detailed photovoltaic model and PVWatts, please see the Performance Model documentation page:
sam.nrel.gov/performance
The latest version of SAM (2016.3.14 r4) has a code generator that generates code in each of the languages supported by the SAM SDK, including Python. That might be a useful way for you to avoid errors caused by incorrectly assigning values to inputs. To use the code generator, start SAM and create a case for a system like the one you would like to model in the SDK. Then, on the Case menu (click the carrot symbol next to the case's name on the Case tab at the top of the SAM window), click Generate code, and choose a language.
In pvsamv1, you can use
Code:
solar_resource_data
Code:
solar_resource_file
In PVWatts V5, when you choose 1 Axis Tracking (
Code:
array_type
Code:
array_type
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Stephen Peters
- Topic Author
Less
More
- Posts: 5
23 Nov 2016 01:48 #4953
by Stephen Peters
Replied by Stephen Peters on topic SSC Module PVWattsv5_1ts vs pvsamv1 and shading
Hi Paul,
That is very helpful. Thank you very much. I will investigate the code generator function.
Just one follow up questions.
For PVWatts V5, will self-shading be automatically calculated for fixed tilt (array_type =0)?
Cheers,
Stephen
That is very helpful. Thank you very much. I will investigate the code generator function.
Just one follow up questions.
For PVWatts V5, will self-shading be automatically calculated for fixed tilt (array_type =0)?
Cheers,
Stephen
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
28 Nov 2016 10:57 #4954
by pgilman
Replied by pgilman on topic SSC Module PVWattsv5_1ts vs pvsamv1 and shading
Dear Stephen,
No. PVWatts V5 only calculates self-shading for the one-axis tracking options.
Best regards,
Paul.
No. PVWatts V5 only calculates self-shading for the one-axis tracking options.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- Stephen Peters
- Topic Author
Less
More
- Posts: 5
29 Nov 2016 02:33 #4955
by Stephen Peters
Replied by Stephen Peters on topic SSC Module PVWattsv5_1ts vs pvsamv1 and shading
Cheers Paul.
Please Log in or Create an account to join the conversation.
- John.Snow
Less
More
- Posts: 1
05 Dec 2016 06:19 #4956
by John.Snow
Replied by John.Snow on topic SSC Module PVWattsv5_1ts vs pvsamv1 and shading
Please Log in or Create an account to join the conversation.
Moderators: pgilman