Discrepancy in Wind Weather File between SAM GUI and API

  • Abenezer Achmano
  • Topic Author
More
03 Oct 2022 20:53 #11515 by Abenezer Achmano
Hello,

I am encountering numeric differences between wind weather files I downloaded using the sam gui and directly from the api using R for the same location and year. I am attaching 2009 weather file downloaded through the api and directly through sam gui to showcase the numeric difference between the two files as an example.

Thanks,
Abenezer  

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

  • Paul Gilman
More
04 Oct 2022 00:17 #11516 by Paul Gilman
Hi Abenezer,

Can you send me the URL your R code generates so I can investigate?

You can see how the URL that SAM uses is constructed in the webapis.conf file in your SAM installation folder or on GitHub here: github.com/NREL/SAM/blob/develop/deploy/runtime/webapis.conf.

Best regards,
Paul.

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

  • Abenezer Achmano
  • Topic Author
More
04 Oct 2022 13:23 - 04 Oct 2022 23:08 #11520 by Abenezer Achmano
Replied by Abenezer Achmano on topic Discrepancy in Wind Weather File between SAM GUI and API
Hi Paul,

Thanks for your timely response. Here is the URL my R code produces:
https://developer.nrel.gov/api/wind-toolkit/v2/wind/wtk-srw-download?api_key=<key>&lat=39.83188&lon=-88.0723&year=2009&email=<email>&utc=true

Thanks,
Abenezer
Last edit: 04 Oct 2022 23:08 by Paul Gilman.

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

  • Paul Gilman
More
04 Oct 2022 23:41 - 05 Oct 2022 21:24 #11521 by Paul Gilman
Hi Abenezer,

Thank you for sending the URL. This was a bit of a puzzle to solve!

SAM makes the API call with no 'utc' parameter, so it is set to the default 'utc=false'. Your URL sets 'utc=true'. If you compare the data between the two files, you should see the data is offset by the difference between UTC and local time.

Note that there are two similar WIND Toolkit API endpoints that appear to return the same data in different formats. They also have different default values for the 'utc' parameter, so if you happen to be working with the  'wtk-download' endpoint, be aware of that difference:

developer.nrel.gov/docs/wind/wind-toolkit/wtk-srw-download/ (this is the one SAM uses, with "srw" in the name)

developer.nrel.gov/docs/wind/wind-toolkit/wtk-download/ (this one returns CSV files)

Best regards,
Paul.
Last edit: 05 Oct 2022 21:24 by Paul Gilman.

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

  • Abenezer Achmano
  • Topic Author
More
05 Oct 2022 16:03 #11526 by Abenezer Achmano
Replied by Abenezer Achmano on topic Discrepancy in Wind Weather File between SAM GUI and API
Hi Paul,

That explains it! Thank you so much for the thorough answer, I really appreciate it!

Thanks,
Abenezer

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

  • Hamza Ali
More
03 Nov 2022 06:23 - 03 Nov 2022 17:37 #11644 by Hamza Ali
Hello Abenezer Achmano, I am Hamza Ali. I am doing my research on Wind by using SAM.

I am linked up with Sir Paul Gilman. I also want to connect with you.

I want to ask queries from you as well, it will be highly appreciated. 

Waiting for your response. 
Last edit: 03 Nov 2022 17:37 by Paul Gilman.

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

Moderators: Paul Gilman
Powered by Kunena Forum