Weather File Converter Error

  • gprovost
  • Topic Author
More
21 May 2015 17:41 #3369 by gprovost
Weather File Converter Error was created by gprovost
I am struggling to make the Weather File Converter Macro work on anything. I have tried NSRDB TMY3 files (both recently downloaded, and files downloaded before the 2015 update), as well as TMY3 formated files from SolarAnywhere. I always receive the error message: "exec fail(wfcsvconv): could not convert C:\Users...csv to C:\Users...(?).csv." Any idea what is going wrong?

I am also having issues with the Weather File Checker Macro. Some of the files I have tried pass with no errors, but others result in the error message "could not determine number of records in CSV weather file."

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

  • pgilman
More
22 May 2015 15:04 #3370 by pgilman
Replied by pgilman on topic Weather File Converter Error

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

  • MNwild
More
05 Sep 2019 09:54 #7657 by MNwild
Replied by MNwild on topic Weather File Converter Error
Getting same error.  I tried converting a TMY3 formatted file that was downloaded from solaranywhere v 3.2.  Yes, it wasn't in solaranywhere "format".  It was in TMY3 format. 

Also, PVsyst is able to import this TMY3 file fine.  Problem is i don't trust my workaround of pulling csv data from PVsyst and importing back into SAM to convert that csv from PVsyst to SAM format.  I did not try because I don't trust the black box processing that PVsyst might do when it imports a weather file.

Error: exec fail(wfcsvconv): could not read input file:

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

  • pgilman
More
05 Sep 2019 11:11 #7658 by pgilman
Replied by pgilman on topic Weather File Converter Error
Hi Aaron,

SAM's weather file converter macro algorithms for converting TMY3 format files are based on the format used for NREL's National Solar Radiation Database. TMY3 files from other sources may be different from the NREL format and cause the algorithm to fail. The SolarAnywhere "TMY3" format is different from the original NREL TMY3 format.

Please try running the Macro with Weather file to format set to SolarAnywhere instead of TMY3. The macro is designed to detect the SolarAnywhere version of the TMY3 format, so it should work to convert your file.

If that does not work, would you mind attaching a copy of the SolarAnywhere TMY3 file you are trying to convert?

Best regards,
Paul.

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

  • MNwild
More
05 Sep 2019 14:28 - 06 Sep 2019 15:50 #7659 by MNwild
Replied by MNwild on topic Weather File Converter Error
Thanks for quick reply appreciate the help.  I did locate the thread about your macro that was expressly for this purpose.  After figuring out how to exactly download aka copy and past script txt file and rename kl.  I was able to open through Macros button in sam, and succussfully import TMY3 ish format that solaranywhere puts out.

Just for the record, and everyone else who might want to know:  What is the difference between the psm tmy from NSRDB viewer, the original TMY3 files that used to be pulled from the met station locations, and solaranywhere's TMY3 format that is an option to download? I thought formats are invented so they stay consisitant!

solaranywhere weather data compatibility issue?
I should probably start a new thread but I have a related question:
For the same coordinate lat long:
1. SAM will list a PSM TMY location that I can Download a PSM TMY file but...
2. NRSDB viewer refuses to show me an option to download the same PSM TMY under the "PSM v3 Tab".  On the PSM v3 tab, no TMY file is listed as an option check boxes for each year.  (I realize there is another tab named PSM TMY (not named PSM  v3 TMY3) and there are options to select tgy tdy with little or no documentation of what the website is showing today vs a year ago)  The white papers is general provides very usefull and informative resources but does not give a sense for the timeline of how everything has changed and what I'm actually seeing on the website today.  So if there is a quicker answer since you understand the nuance that would very helpful.

I did verify awkwardly a reverse check using SAMs pull of a lat long which reports only 2 decimals in the lat long once pulled.  I took these 2 decimaled lat,long and typed in NSRDB dataviewer and pulled all the PSM TMY tab fields of tmy-2 016, tmy-2 017, tdy-2 .017, and tgy-2 017, select ghi and dni.  The PSM v3 tab didn't have any TMY checkbox options to download so i ignored.  I then compared the data pulled through SAM to actually get a PSM TMY file, to the tmy/tdy/tgy files from dataviewer and they in general agreed very closely summing up the 8760 hours.  It was just painful.

Last edit: 06 Sep 2019 15:50 by pgilman.

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

  • pgilman
More
06 Sep 2019 16:37 #7660 by pgilman
Replied by pgilman on topic Weather File Converter Error
Hi Aaron,

I'm glad you found a solution. Please note that it is no longer necessary to download the LK script as described in the older post you linked to -- the Solar Resource File Converter macro in newer versions of SAM should handle that conversion from both the SolarAnywhere format and the "SolarAnywhere TMY3" format. I updated the old post to mention that as well. Sorry you had to go that effort.

As for your questions about file formats, I agree that it would be helpful to have a single standard format for all solar resource data. Even within NREL, the formats have changed over the years as computer and database technology has evolved.

There is a difference between the format of the file and the type of data it contains. Unfortunately, terms like TMY2 and TMY3 are sometimes used to describe a file format and sometimes to describe the data they contain. I will try to describe each below. They are described in more detail on the NSRDB website description of NSRDB versions  and description of typical meteorological year (TMY) .

NREL's National Solar Radiation Database (NSRDB) 1961 - 1990 update included typical meteorological year (TMY) files that were called "TMY2" to distinguish them from the TMY files distributed in the original NSRDB Version 1.1.  The TMY2 files are stored in .tm2 files and use a non comma-delimited text format where data is identified by its column position. The method used to develop TMY files was also different from Version 1. The NSRDB currently refers to this data as Meteorological Statistical Model (MTS) 1.

For subsequent updates to the NSRDB, called the 1991 - 2005 update and  1991 - 2010 update, the TMY files were often referred to as "TMY3". The TMY files for these datasets were stored in .csv files using a comma-separated format that we often call the TMY3 format. The NSRDB currently refers to these updates as MTS2 and MTS3. The method for developing TMY files in these updates was updated from the earlier method.

Finally, the current data from the NSRDB is called the Physical Solar Model (PSM) and is currently at Version 3, hence the name PSM v3. The NSRDB currently uses the same file format as SAM, which is a simple CSV format with column headings identifying the columns. In theory all of the legacy data should be available from the NSRDB in this simple CSV format.

The download tools on SAM's Location and Resource page are intended to give you access to all of the NSRDB datasets, but there are currently some issues with the database, so for now, only downloads for the PSM v3 work reliably.

As for downloading files from the NSRDB website, the PSM v3 tab is for downloading single-year data (as opposed to typical year data). The PSM TMY tab provides access to different typical year files.  Each tmy option has a year indicating the most recent year used to build the typical year file. So, "tmy-2016" is built from 1998 - 2016 data, and "tmy-2017" is built from 1998 - 2017 data. The text wrapping makes it look like the option is tmy-2 016, but it should be read as tmy-2016. By default, SAM downloads the latest TMY year, so the "tmy-2017" file should give you the same file as SAM.

Sorry that is all so complicated!

Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum