pySAM: weather data from dictionary

  • David Mulcahy
  • Topic Author
More
27 Sep 2019 22:05 #7684 by David Mulcahy
pySAM: weather data from dictionary was created by David Mulcahy
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

Please Log in or Create an account to join the conversation.

  • Paul Gilman
More
01 Oct 2019 23:37 #7689 by Paul Gilman
Replied by Paul Gilman 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.

Please Log in or Create an account to join the conversation.

Moderators: Paul Gilman
Powered by Kunena Forum