Hello,
1. Go to the
LK samples
, and download the hourly_to_15min.lk file.
2. Locate the hourly weather file you want to convert. If it is one of the files that comes with SAM, you can find those files in the
solar_resource folder of your SAM installation (
C:/SAM/2016.3.14/solar_resource by default in windows, see
this post
to find the folder in OS X).
3. Copy the file from Step 2 to your SAM weather file folder. If you do not have such a folder, create one in your Documents folder or a folder that you have full access to.
4. Start SAM, and on the Welcome page, click
Open script, and open the .lk file you downloaded in Step 1. If SAM is already running, you can open the file from the
File menu.
5. In the Script window, click
Run at the top of the window, and open the weather file from Step 3. The script will work with any hourly weather file, as long as it is in the SAM CSV format. (You can use the Solar Resource File converter macro that comes with SAM to convert a file from some common formats to SAM CSV.) The script displays a message in the console telling you whether it converted the file, and that it saved it in the same folder as the hourly file.
6. In SAM, open your .sam file (or create a new one) and go to the Location and Resource page. If you created a new folder for the weather file, click
Folder settings and add that folder to the list of folders SAM searches for weather files, and then click
Refresh library.
7. Choose the converted 15-minute weather file from the solar resource library list. If you do not see the file, you may need to refresh the library to ensure that SAM adds it to the solar resource library.
You can see the converted data by clicking
View data on the Location and Resource page, or by opening the file in a spreadsheet program or text editor.
The script works by making a four copies of each hourly record to represent the 15-minute data. For example, if the direct normal irradiance (DNI) for Noon on January 1 in the hourly file is 200 W/m2, the DNI in the 15-minute converted file will by 200 W/m2 for 12:00, 12:15, 12:30 and 12:45.
If you are comfortable with scripting or programming languages, you can modify the .lk script to convert to different time steps, or to use a different method for the conversion.
Best regards,
Paul.