- Posts: 10
Hourly kWh load data not importing
- soular
- Topic Author
Less
More
12 Sep 2013 07:50 #1789
by soular
Hourly kWh load data not importing was created by soular
I've tried creating hourly electric load files in text format and loading them into SAM using the import command, but get an error message:
Data file does not contain 8760 data value lines, only 338 found.
The number 338 just happens to be for this particular file -- with different files it will find a different number of lines, but will exhibit the same problem. The files I'm using each have a header line and then 8760 data values (each on a separate line), created using Excel and saved in either .csv or .txt format. I've also tried loading the files into a text editor and saving them with that, to no avail.
Examples are attached.
Any help would be greatly appreciated!
Data file does not contain 8760 data value lines, only 338 found.
The number 338 just happens to be for this particular file -- with different files it will find a different number of lines, but will exhibit the same problem. The files I'm using each have a header line and then 8760 data values (each on a separate line), created using Excel and saved in either .csv or .txt format. I've also tried loading the files into a text editor and saving them with that, to no avail.
Examples are attached.
Any help would be greatly appreciated!
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
12 Sep 2013 09:26 #1790
by pgilman
Replied by pgilman on topic Hourly kWh load data not importing
Hello,
It looks like the problem is being caused by the precision of the values in your file. I've attached a file to your original message with the same data rounded to four decimal places (the original values had eight decimal places), and that seems to import fine.
I will bring this to the attention of the developers, and update the description in Help to explain this requirement.
Best regards,
Paul.
It looks like the problem is being caused by the precision of the values in your file. I've attached a file to your original message with the same data rounded to four decimal places (the original values had eight decimal places), and that seems to import fine.
I will bring this to the attention of the developers, and update the description in Help to explain this requirement.
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
- soular
- Topic Author
Less
More
- Posts: 10
16 Sep 2013 18:16 #1791
by soular
Replied by soular on topic Hourly kWh load data not importing
Thanks very much for your quick reply, Paul -- I'll round input data from now on. Do numbers that round with fewer than four digits in the fractional part have to include the trailing zero? (e.g., 34.5200 instead of 34.52).
Please Log in or Create an account to join the conversation.
- soular
- Topic Author
Less
More
- Posts: 10
18 Sep 2013 00:52 #1792
by soular
Replied by soular on topic Hourly kWh load data not importing
Paul,
I think I've discovered that the cause of the problem is not the precision of the data, but the format of the end of line characters. My file had Mac end of line characters; I assume yours was in Windows format.
I tried rounding the data to four places within Excel for Mac, saving as tab delimited .txt, and I get a file that shows no visible differences when compared with the one you uploaded here (FSR_load_BOS_rounded.txt). It gives me the same error, however, whereas yours does not.
I then used a freeware converter to convert the EOL characters in my file to windows format. The resulting file imported with no errors. I then discovered that Excel includes options to save as Windows .csv or Windows .txt, and those work fine as well.
Finally, I imported the data without rounding but in Windows .txt format, and it worked fine, displaying in the edit window the numbers rounded to 4 decimal places.
So perhaps the fix to SAM is to allow it to import text (or csv) files with EOL characters in Mac format. In the meantime, you could include a note in the documentation mentioning the limitation.
Thanks.
I think I've discovered that the cause of the problem is not the precision of the data, but the format of the end of line characters. My file had Mac end of line characters; I assume yours was in Windows format.
I tried rounding the data to four places within Excel for Mac, saving as tab delimited .txt, and I get a file that shows no visible differences when compared with the one you uploaded here (FSR_load_BOS_rounded.txt). It gives me the same error, however, whereas yours does not.
I then used a freeware converter to convert the EOL characters in my file to windows format. The resulting file imported with no errors. I then discovered that Excel includes options to save as Windows .csv or Windows .txt, and those work fine as well.
Finally, I imported the data without rounding but in Windows .txt format, and it worked fine, displaying in the edit window the numbers rounded to 4 decimal places.
So perhaps the fix to SAM is to allow it to import text (or csv) files with EOL characters in Mac format. In the meantime, you could include a note in the documentation mentioning the limitation.
Thanks.
Please Log in or Create an account to join the conversation.
- pgilman
Less
More
- Posts: 5423
19 Sep 2013 09:42 #1793
by pgilman
Replied by pgilman on topic Hourly kWh load data not importing
Thank you for this very helpful feedback. I'll pass this on to the developers.
Sorry for all of the trouble getting your file to work!
Best regards,
Paul.
Sorry for all of the trouble getting your file to work!
Best regards,
Paul.
Please Log in or Create an account to join the conversation.
Moderators: pgilman