- Posts: 10
Directly Assigning Weather File Elements in PySAM without using a weather file
- matan
- Topic Author
Less
More
17 Jun 2020 13:36 #8318
by matan
Directly Assigning Weather File Elements in PySAM without using a weather file was created by matan
Hello!
I am wondering weather is possible to directly run the PVwatts model without using a weather file, and directly assigning the sequences of weather data to the SolarResource.solar_resource_data attribute. I tried the following, but I always get Annual Energy = 0, and all elements of ac out = 0. What am I doing wrong? Or is what I am trying to do not possible.
thank you,
Matan
I am wondering weather is possible to directly run the PVwatts model without using a weather file, and directly assigning the sequences of weather data to the SolarResource.solar_resource_data attribute. I tried the following, but I always get Annual Energy = 0, and all elements of ac out = 0. What am I doing wrong? Or is what I am trying to do not possible.
Code:
import PySAM.Pvwattsv7 as pv
model = pv.default('PVWattsNone')
wspd = [0, 0, 0.83... # 8760 elements of data. ie len(wspd = 8760)
tdry = [10.3, 10.54...
dn = [0, 0...
dh = [0, 0...
year = [2019, 2019 ...
month = [6, 6 ...
day = [1, 1 ...
hour = [0, 0, ...
minute = [0, 15 ...
model.SolarResource.assign({'solar_resource_data':{'dn':dn,
'df':dh,
'tdry':tdry,
'wspd':wspd,
'lat':51.4,
'lon':1.1,
'tz':0,
'Elevation':16,
'Year':year,
'Month':month,
'Day':day,
'Hour':hour,
'Minute':minute,
'albedo':0.5}})
model.execute(1)
model.ac_annual #0.0 kWh
Matan
Code:
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
17 Jun 2020 17:05 #8320
by pgilman
Replied by pgilman on topic Directly Assigning Weather File Elements in PySAM without using a weather file
Hi Matan,
You're on the right track.
The code beginning at this line in common.cpp of the SSC source code should help you see how to format the table correctly.
Best regards,
Paul.
You're on the right track.
The code beginning at this line in common.cpp of the SSC source code should help you see how to format the table correctly.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- matan
- Topic Author
Less
More
- Posts: 10
17 Jun 2020 17:08 #8321
by matan
Replied by matan on topic Directly Assigning Weather File Elements in PySAM without using a weather file
Hello Paul,
Thank you for your response. I figured out my problem. I used 'Elevation' as a key instead of 'elev'. It works now.
Best,
Matan
Thank you for your response. I figured out my problem. I used 'Elevation' as a key instead of 'elev'. It works now.
Best,
Matan
Please Log in or Create an account to join the conversation.
- matan
- Topic Author
Less
More
- Posts: 10
02 Jul 2020 17:44 - 06 Jul 2020 09:52 #8388
by matan
Replied by matan on topic Directly Assigning Weather File Elements in PySAM without using a weather file
Hello ,
I have another followup question to this! Reading through the documentation for PVwattsV7: nrel-pysam.readthedocs.io/en/2.0.2/modules/Pvwattsv7.html , I am not sure where I would input "snow"-depth.
I am using the direct assignment method to assign weather data, rather than reading from a weather file. Looking at the SolarResource.solar_resource_data, I see that "snow" (nor "albedo") is included in the 'info' . Can I assign snow and albedo as part of a the "solar_resource_data" dictionary?
Best,
Matan
I have another followup question to this! Reading through the documentation for PVwattsV7: nrel-pysam.readthedocs.io/en/2.0.2/modules/Pvwattsv7.html , I am not sure where I would input "snow"-depth.
I am using the direct assignment method to assign weather data, rather than reading from a weather file. Looking at the SolarResource.solar_resource_data, I see that "snow" (nor "albedo") is included in the 'info' . Can I assign snow and albedo as part of a the "solar_resource_data" dictionary?
Best,
Matan
Attachments:
Last edit: 06 Jul 2020 09:52 by pgilman.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5447
06 Jul 2020 09:56 #8402
by pgilman
Replied by pgilman on topic Directly Assigning Weather File Elements in PySAM without using a weather file
Hi Matan,
You can use the documentation of solar_resource_data for pvsamv1 as a reference: nrel-pysam.readthedocs.io/en/2.0.2/modules/Pvsamv1.html .
Best regards,
Paul.
You can use the documentation of solar_resource_data for pvsamv1 as a reference: nrel-pysam.readthedocs.io/en/2.0.2/modules/Pvsamv1.html .
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman