- Posts: 1
pySAM: weather data from dictionary
- mulcahydj
- Topic Author
Less
More
27 Sep 2019 16:05 #7684
by mulcahydj
pySAM: weather data from dictionary was created by mulcahydj
Hello,
I'm trying to use PySAM to simulate solar systems based on commercial weather data and am having trouble determining the correct format for the dictionary of resource data. The documentation ( pysam-docs.readthedocs.io/en/latest/modules/Pvwattsv5.html#PySAM.Pvwattsv5.Pvwattsv5.LocationAndResource.solar_resource_data ) mentions that you can assign weather data from dictionary but is unclear on the structure of the dictionary for 'solar_resource_data'.
I tried a format the dictionary as the parameter names with a list of the data:
{ 'dn' : list of dn data,
'di' : list of di data,
...
}
When I try to execute a model with the data, I get the error:
'error: pvwattsv5 execution error. exec fail(pvwattsv5): subhourly weather files must specify the minute for each record'
Is this a results of formatting the data improperly or is there another way to specify the time periods?
Thank you for any help,
David
I'm trying to use PySAM to simulate solar systems based on commercial weather data and am having trouble determining the correct format for the dictionary of resource data. The documentation ( pysam-docs.readthedocs.io/en/latest/modules/Pvwattsv5.html#PySAM.Pvwattsv5.Pvwattsv5.LocationAndResource.solar_resource_data ) mentions that you can assign weather data from dictionary but is unclear on the structure of the dictionary for 'solar_resource_data'.
I tried a format the dictionary as the parameter names with a list of the data:
{ 'dn' : list of dn data,
'di' : list of di data,
...
}
When I try to execute a model with the data, I get the error:
'error: pvwattsv5 execution error. exec fail(pvwattsv5): subhourly weather files must specify the minute for each record'
Is this a results of formatting the data improperly or is there another way to specify the time periods?
Thank you for any help,
David
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5418
01 Oct 2019 17:37 #7689
by pgilman
Replied by pgilman on topic pySAM: weather data from dictionary
Hi David,
SAM's weather file format requires values for a year, month, day, and optional minute column so that SAM can determine the sun position in each time step.
You might try adding a minute column with a list of either zeroes or 30s indicating whether the data is for the top of the hour (0) or bottom (30). I suspect that if you try that, you may get new errors about the other time stamp columns. The year column should be a numbers like 2017, month should be 1 through 12, and hour should be 0 through 23.
Let me know if you continue to have trouble with that.
Best regards,
Paul.
SAM's weather file format requires values for a year, month, day, and optional minute column so that SAM can determine the sun position in each time step.
You might try adding a minute column with a list of either zeroes or 30s indicating whether the data is for the top of the hour (0) or bottom (30). I suspect that if you try that, you may get new errors about the other time stamp columns. The year column should be a numbers like 2017, month should be 1 through 12, and hour should be 0 through 23.
Let me know if you continue to have trouble with that.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman