- Posts: 1
SAM LK script to download weather data
- jsjackson604
- Topic Author
Less
More
07 Jul 2021 12:40 #9795
by jsjackson604
SAM LK script to download weather data was created by jsjackson604
Hi everyone! I have quite a few TMY2 files. I want to extract the data from them into excel. I can do this manually, but an LK script would be much faster.
A quick search online didn't yield anything. Does anyone have any idea whether this is possible or not? Thanks!
A quick search online didn't yield anything. Does anyone have any idea whether this is possible or not? Thanks!
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
07 Jul 2021 13:42 #9798
by pgilman
Replied by pgilman on topic SAM LK script to download weather data
Hi Jacob,
You can use the Solar Resource File Converter macro to convert the file from the TMY2 format to the SAM CSV format. To use the macro, click Macros under the Simulate button and then click Solar Resource File Converter.
The macro is an LK script, you can see the code by clicking View code on the Macro page.
Also, the sample LK script solar-resource-convert-multiple-files-to-samcsv.lk will do the conversion. It's available at github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM .
Best regards,
Paul.
You can use the Solar Resource File Converter macro to convert the file from the TMY2 format to the SAM CSV format. To use the macro, click Macros under the Simulate button and then click Solar Resource File Converter.
The macro is an LK script, you can see the code by clicking View code on the Macro page.
Also, the sample LK script solar-resource-convert-multiple-files-to-samcsv.lk will do the conversion. It's available at github.com/NREL/SAM/tree/develop/samples/LK%20Scripts%20for%20SAM .
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman