- Posts: 4
Discrepancy in Wind Weather File between SAM GUI and API
- Abenezer Achmano
- Topic Author
        Less
        More
        
            
    
        
            
        
                03 Oct 2022 14:53                #11515
        by Abenezer Achmano
    
    
 	
					
                                	
			
				    
            
            
            
            
            
                                
    
                                                
    
        Discrepancy in Wind Weather File between SAM GUI and API was created 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
    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
Attachments:
            	      
												
            	
            	Please Log in or Create an account to join the conversation.
- Paul Gilman
        Less
        More
        
            
    
        - Posts: 5665
            
        
                03 Oct 2022 18:17                #11516
        by Paul Gilman
    
    
            
            
            
            
            
                                
    
                                                
    
        Replied by Paul Gilman on topic Discrepancy in Wind Weather File between SAM GUI and API            
    
        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.
    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
        Less
        More
        
            
    
        - Posts: 4
            
        
                04 Oct 2022 07:23         -  04 Oct 2022 17: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:
Thanks,
Abenezer
    Thanks for your timely response. Here is the URL my R code produces:
Code:
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 17:08  by Paul Gilman.            
            Please Log in or Create an account to join the conversation.
- Paul Gilman
        Less
        More
        
            
    
        - Posts: 5665
            
        
                04 Oct 2022 17:41         -  05 Oct 2022 15:24        #11521
        by Paul Gilman
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by Paul Gilman on topic Discrepancy in Wind Weather File between SAM GUI and API            
    
        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.
    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 15:24  by Paul Gilman.            
            Please Log in or Create an account to join the conversation.
- Abenezer Achmano
- Topic Author
        Less
        More
        
            
    
        - Posts: 4
            
        
                05 Oct 2022 10: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
    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
        Less
        More
        
            
    
        - Posts: 14
            
        
                03 Nov 2022 00:23         -  03 Nov 2022 11:37        #11644
        by Hamza Ali 
    
    
    
            
            
            
            
                                
    
                                                
    
        Replied by Hamza Ali  on topic Discrepancy in Wind Weather File between SAM GUI and API            
    
        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.
    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 11:37  by Paul Gilman.            
            Please Log in or Create an account to join the conversation.
        Moderators: Paul Gilman    
 
  
 















