- Posts: 2
Two identical weather files; one works, the other doesn't
- andrew_harris_serc
- Topic Author
Less
More
27 Jan 2016 13:19 #4031
by andrew_harris_serc
Two identical weather files; one works, the other doesn't was created by andrew_harris_serc
I've been trying to model a detailed photovoltaic system using data for Arcata California, downloaded from
www.nrel.gov/midc/hsu/
. I formatted the data to SAM CSV, and to test that the data worked, created a basic simulation that only specified the data file attached as FaultySamFile.csv), and left all other settings at default. I received the following error message:
exec fail(pvsamv1): could not determine number of records in CSV weather file
Simulation pvsamv1 failed.
SSC requires input 'hourly_energy', but was not found in the SAM UI or from previous simulations
Simulation singleowner failed.
I checked that my data file had the right number of lines, and then tried to debug my data file. I wound up copy/pasting the information into a new file (sorms-sam-final.csv), and to my shock, it worked perfectly. I use a text editor's compare tool to verify that both files were exactly the same.
My only thought is that during my initial debugging, I changed the file in some way that SAM did not recognize until I had created a new file.
I have a working weather file, so I can continue my simulations, but I am scratching my head as to why one file would cause SAM to crash, but an identical file works just fine.
exec fail(pvsamv1): could not determine number of records in CSV weather file
Simulation pvsamv1 failed.
SSC requires input 'hourly_energy', but was not found in the SAM UI or from previous simulations
Simulation singleowner failed.
I checked that my data file had the right number of lines, and then tried to debug my data file. I wound up copy/pasting the information into a new file (sorms-sam-final.csv), and to my shock, it worked perfectly. I use a text editor's compare tool to verify that both files were exactly the same.
My only thought is that during my initial debugging, I changed the file in some way that SAM did not recognize until I had created a new file.
I have a working weather file, so I can continue my simulations, but I am scratching my head as to why one file would cause SAM to crash, but an identical file works just fine.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
29 Jan 2016 10:48 #4032
by pgilman
Replied by pgilman on topic Two identical weather files; one works, the other doesn't
Dear Andrew,
The two files are not quite identical: The "faulty" file uses CR (carriage return) line endings, and the "working" file uses LF (line feed) line endings. SAM will accept files with LF or CR/LF line endings, but not CR line endings.
You should be able to use a good text editor to make the line endings visible and convert them. If you are editing the files on a Mac, be sure to save them in the Windows (CR/LF) or Unix (LF) format.
Best regards,
Paul.
The two files are not quite identical: The "faulty" file uses CR (carriage return) line endings, and the "working" file uses LF (line feed) line endings. SAM will accept files with LF or CR/LF line endings, but not CR line endings.
You should be able to use a good text editor to make the line endings visible and convert them. If you are editing the files on a Mac, be sure to save them in the Windows (CR/LF) or Unix (LF) format.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- JorgeFuentesCasillas
Less
More
- Posts: 4
08 Nov 2016 16:51 #4033
by JorgeFuentesCasillas
Replied by JorgeFuentesCasillas on topic Two identical weather files; one works, the other doesn't
Excellent Paul! Thank you very much.
I used TextWrangler app to save the file with the UNIX LF format, I deleted the extra information (W/m^2) and worked smoothly. Thanks a lot.
Kind regards,
Jorge.
I used TextWrangler app to save the file with the UNIX LF format, I deleted the extra information (W/m^2) and worked smoothly. Thanks a lot.
Kind regards,
Jorge.
Please Log in or Create an account to join the conversation.
Moderators: pgilman