I was trying to read photon spectrum from a text file. The program works perfectly when I am using spectrum2.txt but if I use spectrum.txt, the input is not running and these errors are shown in log file.
the spectrum file – which you have a problem with – has some non-printable characters at the end of the lines, making it impossible to successfully read the file.
In Linux you can print the non-printable characters with:
cat -v spectrum.txt
This will show you two non printable characters in your spectrum file:
^M: this represents the “carriage return” character, which is used in Windows before a new line. Having this character is not a problem.
M-BM- : this is a character of a “non-breaking space”. This character cannot be read correctly with the Fortran code, and has to be removed. To do so, just open the spectrum file in a text editor, and remove the spaces at the end of each line.