- Posts: 2
TMY3 header format for India Solar Resource Files
- akhileshmagal
- Topic Author
Less
More
31 Mar 2015 04:12 #3210
by akhileshmagal
TMY3 header format for India Solar Resource Files was created 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?
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
Less
More
- Posts: 5423
31 Mar 2015 10:29 #3211
by pgilman
Replied by pgilman on topic TMY3 header format for India Solar Resource Files
Please Log in or Create an account to join the conversation.
- akhileshmagal
- Topic Author
Less
More
- Posts: 2
01 Apr 2015 05: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?
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
Less
More
- Posts: 5423
01 Apr 2015 10:59 #3213
by pgilman
Replied by pgilman on topic TMY3 header format for India Solar Resource Files
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:
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.
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:
Create a folder on your computer to store your custom weather files.
Make a copy of the original TMY3 format file in case you make a mistake and need to start over.
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.
Save the modified file to the folder you created in Step 1.
In SAM, create or open a .sam file with a PVWatts case (or any other solar performance model) and any financial model.
Click Macros at the bottom left of the window.
Click Weather File Converter, and read the instructions to understand what the macro will do when you run it.
Click Run macro near the top of the window.
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.
Click Yes to open the file in Excel. Alternatively, you can click No, and open it yourself with a text editor.
Edit the second row of the header so that it looks something like this:
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
Save and close the file. You can save it with a name like India Station Name (NREL).csv.
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.
Click Refresh library.
You should see the file listed in the library toward the bottom.
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
Less
More
- Posts: 2
24 Jan 2018 06:38 #3214
by rabia
Replied by rabia on topic TMY3 header format for India Solar Resource Files
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
Less
More
- Posts: 5423
24 Jan 2018 10:36 #3215
by pgilman
Replied by pgilman on topic TMY3 header format for India Solar Resource Files
Please use the contact form to email me (you can find my email address there):
sam.nrel.gov/contact
Best regards,
Paul.
sam.nrel.gov/contact
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman