We will be performing a major infrastructure and web site ugprades on Friday, September 27th 8:00 am - 5:00 pm MST (UTC -7).

The website will be down during that time.

TMY3 header format for India Solar Resource Files

  • akhileshmagal
  • Topic Author
More
31 Mar 2015 10:12 #3210 by akhileshmagal
I need to run a simulation for a location in India. For this, I am using the NREL India Resource Files (availabe at: rredc.nrel.gov/solar/new_data/India/nearestcell.cgi), which I import into SAM as a TMY3 (or CSV) format file.

The problem with the India specific TMY3 files is that the header is incomplete. Therefore, in the data field "City", "Data Source" and "Country" I get blanks.

I tried opening the .CSV file in a text editor and to manually add the header fields in the following format:

Location,City,Region,Country,Latitude,Longitude,Time Zone,Elevation,Source

However, this leads to an error and SAM refuses to read this file.

What am I missing? I need the complete fields for my reports. Is there some way I can edit these header files?

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

  • pgilman
More
31 Mar 2015 16:29 #3211 by pgilman

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

  • akhileshmagal
  • Topic Author
More
01 Apr 2015 11:45 #3212 by akhileshmagal
Replied by akhileshmagal on topic TMY3 header format for India Solar Resource Files
Thanks Paul,

The simulation works fine. The problem is with the missing data fields 'Country' and 'Data Source'. This does not make a report complete - one that I could present to the bank.
Is there some way I can add these fields into the header?

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

  • pgilman
More
01 Apr 2015 16:59 #3213 by pgilman
Sorry I misunderstood your original question. There are two parts to this question.
First, the file from the NREL India Solar Resource Database, which is in the NREL TMY3 format, does not have values for the Station Name and Station State fields, so SAM displays "satellitedata" and "??" for those fields. You can change the values of those fields in the header as you attempted to do. For example:
Original header:

075052505," ""satellitedata""", ??, 5.5, 25.05, 75.05, 419.0
Modified header:

075052505,"City Name", State Name, 5.5, 25.05, 75.05, 419.0
That will result in more meaningful information being displayed on the Location and Resource page City and State fields, and in the PDF report. However, the Country and Data Source fields on the Location and Resource page will still be empty. 
Second, the "Country" and "Data Source" fields are not part of the TMY3 file format. If you want those fields to appear on the Location and Resource page, you'll have to convert the file from the TMY3 format to the SAM CSV format, which you can do in these sixteen easy  steps:

  1. Create a folder on your computer to store your custom weather files.

  2. Make a copy of the original TMY3 format file in case you make a mistake and need to start over.

  3. Use a text editor to open the copy of the TMY3 format file, and change the Station Name and Station State values as I describe above. Enclose the station name in quotes, but not the state name or abbreviation. Avoid using Microsoft Excel for this step because it adds quotes and changes number formatting in ways that can render the file unreadable.

  4. Save the modified file to the folder you created in Step 1.

  5. In SAM, create or open a .sam file with a PVWatts case (or any other solar performance model) and any financial model.

  6. Click Macros at the bottom left of the window.

  7. Click Weather File Converter, and read the instructions to understand what the macro will do when you run it.

  8. Click Run macro near the top of the window.

  9. Open the file from Step 3. If all goes well, you'll see a message that says "Weather file successfully converted. Open it?" You will also see that the macro named the file something like USA IN Station Name (TMY3).csv.

  10. Click Yes to open the file in Excel. Alternatively, you can click No, and open it yourself with a text editor.

  11. Edit the second row of the header so that it looks something like this:


  12. Source,Location ID,City,State,Country,Latitude,Longitude,Time Zone,Elevation

    NREL,75052505,City Name,State Name,India,25.05,75.05,5.5,419


  13. Save and close the file. You can save it with a name like India Station Name (NREL).csv.

  14. On the Location and Resource page, click Folder Settings, and add the folder you created in Step 1 to the Solar Data File Folders list.

  15. Click Refresh library.

  16. You should see the file listed in the library toward the bottom.
There, wasn't that easy?
Note that I recommend not using Excel to edit the TMY3 format file in Step 3, but say it's OK in Step 10. That is because the SAM CSV format is more flexible than the TMY3 format, and Excel's automatic number or date formatting is less likely to cause problems with the SAM CSV format.
Best regards,

Paul.

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

  • rabia
More
24 Jan 2018 13:38 #3214 by rabia
Hello paul.please give me email address.i want to share some files with u.i have a problem

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

  • pgilman
More
24 Jan 2018 17:36 #3215 by pgilman
Please use the contact form to email me (you can find my email address there):

sam.nrel.gov/contact

Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum