Hi
I am really not a Fortran expert and I needed some help. A request for assistance with the program at the below link (actually an old USGS program). It was sent from a researcher on on a geological mailing list - it computes the salt norm for a given sample solution. I was given a copy of the original .FOR file (SNORM2.FOR) and used gfortran to compile under linux - however I think there is some problem in the code when compiled under linux - it seems to accept user input from the terminal up to a point then produces the below error. It was previously compiled under windows and wonder if there is a subtle change to the code I need to apply throughout to overcome any issues with user input.
The .FOR code, a database of constants needed by the software (neodat), the compiled program (.exe) and sample analysis file (QD1) are available at the below link. Follow the same steps below to generate the error and you will likely hit the same problem - struggling to understand the issue.
https://www.dropbox.com/sh/mzutakv65xv2jbd/AAD0ZQmSkaxX17G2dh6r8RsDa?dl=0
Help much appreciated.
Kind Regards,
Mike
pi@Razberry4:~/Programs/SNORM files/SNORM files $ sudo ./SNORM_1.exe INPUT DATA SOURCE, OUTPUT OPTIONS, AND NEW INPUT DATA ENTRY
(After each line of entry -- enter <RETURN>)
Status of water analyses for salt norm calculation (ENTER one code integer):
"0" Analyses currently in a file in the user's directory
"1" Analyses to be entered and written to a new data file
1
ENTER NAME of proposed input data file (up to 10 character string):
QD1
YOU ALREADY HAVE A FILE WITH THIS NAME!!
File name = QD1
Creation of a new file with this name will overwrite
and destroy the existing file! ENTER one code integer:
"0" REENTER file name,
"1" CONTINUE and destroy existing file
"2" CALCULATE salt norm for the existing file
"3" TERMINATE this run
2
Listing of samples in file?? "0" = no; "1" = yes
1
qd
1. qd1
Selection of samples in file for output:
"0" All samples in file.
"1" Only those to be listed by position in file.
"2" Only those with solutes to be specified.
"3" Both "1" and "2" above.
0
Your output file = QD1.out
ENTER ONE desired option identifier integer:
[If entry >0, additional options can be subsequently selected]
"0" NO FURTHER OPTIONS DESIRED
"1" Print-out of SNORM solute and salt data bank
"2" Salts in units other than those of water analysis
"3" Salt equivalencies rather than mole quantities
"4" Dissolved nitrate recast as ammonium
"5" Dissolved ammonium recast as nitrate
"6" Dissolved nitrate replaced by bicarbonate
"7" Selected solutes reset to 0.0 concentration
At line 816 of file SNORM.FOR (unit = 5, file = 'fort.5')
Fortran runtime error: End of file