Error Executing Windpower Module with Downloaded SRW Files

  • slowder
  • Topic Author
More
06 Jul 2023 16:21 #12282 by slowder
When following the documentation example for PySAM.ResourceTools.FetchResourceFiles (github.com/NREL/pysam/blob/main/Examples/FetchResourceFileExample.py), the script successfully downloads the wind SRW file, but fails to execute the Windpower module. I receive the following error (using PySAM 4.1.0):

Exception: windpower execution error.
        exec fail(windpower): failed to read local weather file: number of columns in header line 5 must match line 3: 4 required but 9 found

I've attached a screenshot of the SRW file in question.

 

I do not encounter the same issue with downloading solar files and executing the PvWatts module.

As a workaround, converting the SRW file to a wind data dictionary (ResourceTools.SRW_to_wind_data) and assigning that to the 'wind_resource_data' variable seems to work (at least in this example). Is there something more obvious that I'm missing when downloading the SRW files and trying to execute them directly, or should I be converting all of them to data dictionaries as above prior to executing the Windpower module? If the latter, is there a similar way to do this in PySSC (currently use 'ssc.data_set_string( data, b'wind_resource_filename', bytes(wtk_fp, encoding = 'utf8')), but not finding anything in a quick search of the documentation for setting resource_data this way)?

Thanks in advance.
 
Attachments:

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

  • pgilman
More
07 Jul 2023 23:46 #12291 by pgilman
Hi,

One quick thing to try is removing the trailing commas from the end of each line in the SRW file.

Let me know if that does not work and I will investigate further.

Best regards,
Paul.

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

  • slowder
  • Topic Author
More
10 Jul 2023 14:57 #12301 by slowder
Hi Paul,

Thanks for the quick response. Stripping the trailing commas seems to work; just didn't expect to have to do that since in previous PySAM releases that co-workers use it isn't necessary.

Thanks again and no need for further investigation.

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

Moderators: pgilman
Powered by Kunena Forum