Sub-hourly generation data for wind in PySAM

  • Alex Badgett
  • Topic Author
More
15 Dec 2021 22:26 #10400 by Alex Badgett
Sub-hourly generation data for wind in PySAM was created by Alex Badgett
Hi all,

I am working on building models in PySAM that use sub-hourly resource data to estimate power output from a wind farm at various locations. My understanding of PySAM and sub-hourly input data is that the output generation data will be at the same interval as the weather input file. I get this behavior for the PVWatts model in PySAM but I cannot seem to get the wind output data at intervals less than hourly. 

I am attaching a basic file that pulls 5 minute resolution data and runs PySAM for a wind plant. It seems that the length of the generation output from the simulation is always 8,760. Does the wind module in PySAM have the ability to output sub-hourly generation, or am I missing a command for accessing that data? 

Thank you in advance for your help! 

Alex

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

  • Paul Gilman
More
16 Dec 2021 18:05 - 16 Dec 2021 18:06 #10408 by Paul Gilman
Replied by Paul Gilman on topic Sub-hourly generation data for wind in PySAM
Hi Alex,

After some digging around, I found that the FetchResourceFiles() class has a function csv_to_srw that resamples the wind resource data to hourly data. That code starts here:

github.com/NREL/pysam/blob/1e786dbda5f3d870b787cb6e0f17a06dbfde2a78/files/ResourceTools.py#L402

I'm not sure why that is necessary given that the wind model should work with subhourly data.

One solution would be to modify FetchResourceFiles() to skip the resampling step.

You could also create an issue for this at:

github.com/NREL/pysam/issues

Best regards,
Paul.
Last edit: 16 Dec 2021 18:06 by Paul Gilman.

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

  • Alex Badgett
  • Topic Author
More
20 Dec 2021 15:46 #10419 by Alex Badgett
Replied by Alex Badgett on topic Sub-hourly generation data for wind in PySAM
Thanks so much for your help and response Paul! For anyone else who might run into this issue, I was able to get things working by making the following changes in the ResourceTools.py file: 

Commented out line 406 which resampled the resource dataframe:
#df.df.resample('H').first()

Adjusted the dataframe shape command in line 425 to reflect the length of the dataframe passed
Original:
assert df.shape == (8760, 4)
To: 
assert df.shape == (len(df), 4)
Just want to note that I have not performed any detailed analysis into if this adjustment impacts any other calculations in the Wind PySAM module, but total energy generated and LCOE calculations seem to be consistent from hourly to 5min intervals. 

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

  • Paul Gilman
More
21 Dec 2021 01:00 #10422 by Paul Gilman
Replied by Paul Gilman on topic Sub-hourly generation data for wind in PySAM
Hi Alex,

Thanks for sharing that.

I created an issue on the PySAM GitHub repository in case any one would like to tackle fixing this:

github.com/NREL/pysam/issues/105

Best regards,
Paul.

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

Moderators: Paul Gilman
Powered by Kunena Forum