Error in Macro: As Built-complete.sam using a PVsyst CSV file

  • emejia
  • Topic Author
More
03 Aug 2023 12:17 - 07 Aug 2023 16:05 #12370 by emejia
Using different PVsyst CSV weather files trying to use the macro referred in the subject, I get the following recurring error: 

 

I wish to know what this means and how to solve it. Specially since this same CSV files can be used in PVsyst (I've already used them on different projects on the aforementioned software). Thanks in advance for all replies. I include as an attachment a screenshot of the entire SAM screen with the error.

 
Last edit: 07 Aug 2023 16:05 by pgilman.

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

  • pgilman
More
07 Aug 2023 16:07 #12389 by pgilman
Hi Emiliano,

Would it be possible for you to share a copy of the PVsyst weather file you are trying to convert? It may be that the file format has changed since we wrote that macro.

If you prefer not to post it to the forum, please This email address is being protected from spambots. You need JavaScript enabled to view it..

Best regards,
Paul.

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

  • emejia
  • Topic Author
More
08 Aug 2023 08:31 #12392 by emejia
Thank you for your reply Paul, yes, I just added one of the CSV I've been trying to use. I'm currently waiting on another PVsyst CSV file to use on a project soon but for that's one of the files I tried to use so finding a solution with this file may help me use the Macro with the CSV I'll try to utilize.

Thanks in advance, 
Emiliano

Pd: I'm currently using the latest version of SAM running on MacOS with Apple Silicon (just mentioning it if it somehow has something to do with it).

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

  • pgilman
More
08 Aug 2023 11:51 - 08 Aug 2023 11:52 #12395 by pgilman
Hi Emiliano,

There are several problems with the file you attached (some of these problems are only visible in a text editor):
  1. There is only one solar irradiance column for GHI. SAM's photovoltaic models requires any two of GHI, DNI, and DHI.
  2. There is no wind speed data. SAM's PV models require wind speed data in m/s.
  3. The ambient temperature column for many time steps contains a set of values in quotes like "5,883,333,333,333,330", which is not valid temperature data.
  4. The first row of data is for Hour 23 of December 31, 2020. The data should start at Hour 0 of January 1. Note that the last row of data is for Hour 23 of December 31, 2021, which is correct. For hourly data, the file should contain 8760 rows of data (plus header rows).
  5. There are rows of commas (empty cells) from Row 8774 to 19452 that may cause problems for the macro.
  6. There is a comma at the end of each row that may cause problems.
From the name of the file, it appears that it may be from Solcast. They provide data in the SAM CSV format, so you might try requesting the data in that format so you don't have to run the Weather File Converter macro in SAM.

Best regards,
Paul.
Last edit: 08 Aug 2023 11:52 by pgilman.

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

  • emejia
  • Topic Author
More
11 Aug 2023 09:26 - 11 Aug 2023 10:57 #12407 by emejia
Thanks Paul for your answer. I'm attaching a new Pmacm Vsyst CSV file if you could help me out with why the macro isn't running. I added both the DNI and DHI as well as the wind speed as you mentioned. I've also corrected the starting time to be at the beginning of the year. This time SAM shows me the following error:



Thanks in advance and best regards,
Emiliano 
Last edit: 11 Aug 2023 10:57 by pgilman.

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

  • pgilman
More
11 Aug 2023 17:55 #12410 by pgilman
Hi Emiliano,

Thank you for sharing the PVsyst meteo file.

There are a couple of problems with the file causing SAM's Solar Resource File Converter macro to fail:
  • The column delimiters are semicolons. Although the PVsyst format allows for either semicolon or comma delimeters, the SAM macro can only convert files with comma delimiters.
  • The column heading for wind data is "Wind". The heading described in the PVsyst documentation and expected by the macro is "WindVel": www.pvsyst.com/help/index.html?meteo_pvsyst_standard_format.htm

The macro should work if you replace semicolons in the file with commas, and change "Wind" in Row 11 to "WindVel".

The macro checks the data in the file after the format conversion. In my tests, the weather file checker found problems with the solar resource data, so I was not able to run a simulation in SAM with the converted file.

We will make some changes to the macro so it provides better feedback about delimiters.

github.com/NREL/SAM/issues/1429

Best regards,
Paul.

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

Moderators: pgilman
Powered by Kunena Forum