5-minute time resolution for wind resource files

  • jbrauch
  • Topic Author
More
20 Dec 2023 00:09 - 03 Jan 2024 00:08 #12771 by jbrauch
Hello,

I am trying to use the ResourceTools module within PySAM to download resource files for wind and solar, to eventually use in PySAM modeling. Specifically, I want to pull wind resource files with a 5-minute time resolution using the code at the end of this post. Based on the documentation here , I have tried to use both 'psm3-5min' and an empty string as the resource_type argument, and I've also tried leaving that argument out. In any case, it still downloads the data at a 60-minute resolution instead of 5-minutes.

Is there a way to get 5-minute time resolution files from the WIND Toolkit using FetchResourceFiles?

Thanks!

 
Attachments:
Last edit: 03 Jan 2024 00:08 by pgilman. Reason: Insert image as attachment

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

  • pgilman
More
03 Jan 2024 00:38 - 03 Jan 2024 00:38 #12796 by pgilman
Hi Joe,

Assuming you set 'api_key' and 'api_email' to valid values for your NREL Developer API account, the following code should work:

lon = -105.22
lat = 39.75

wtkfetcher = tools.FetchResourceFiles( tech = 'wind',
                                       resource_year = '2014',
                                       resource_interval_min = '5',
                                       resource_height = '80',
                                       nrel_api_key = api_key,
                                       nrel_api_email = api_email )

lon_lats = [(lon, lat)]
wtkfetcher.fetch(lon_lats)


 
Last edit: 03 Jan 2024 00:38 by pgilman.

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

  • jbrauch
  • Topic Author
More
04 Jan 2024 20:40 #12801 by jbrauch
Hi Paul,

Thanks for your response. I tried your code, and copied it over below in case there is a mistake I am not seeing. I am still not able to get 5-minute profiles for wind. Is your tools object an instance of PySAM.ResourceTools? I'm assuming that the email and API key are working because it does download a weather profile, but even with the time set to 5 minutes, the file only contains 8760 data entries. Is there something else I might be missing?
wind_resource = PySAM.ResourceTools.FetchResourceFiles(
    tech='wind',
    resource_year='2014',
    resource_interval_min='5',
    resource_height='80',
    nrel_api_key=joe_api_key,
    nrel_api_email=joe_email,
    )
lon = -105.22
lat = 39.75
wind_resource.fetch([(lon,lat)])

Thanks!

Joe

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

  • pgilman
More
05 Jan 2024 04:07 #12806 by pgilman
Hi Joe,

You might have better luck working directly with the WIND Toolkit API itself so you can have full control over the API call. The documentation is here:

developer.nrel.gov/docs/wind/wind-toolkit/wtk-download/

It should be straightforward to code the URL for your request. You can test the URL in a web browser to make sure it works as expected and then code it up in Python.

Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum