How to read files while running fortran program?

I am trying to run a simulation written mostly in Fortran on Linux. The User's Manual says that "To run a simulation one needs to read several input files." Then, it lists a bunch of files. I was wondering what it means by that and how I "read" the files?

Staff: Mentor

@jtbell, thank you but no. I'm not trying read files within the program. The program is all completely written. But now when I run it, I think I need to link to those files or something, I'm not sure.

"Link" has a very specific meaning in compiled programming languages such as Fortran, and is not applicable in your case. Your program needs to open the files and read from them, as described in the link that jtbell provided.

Your program needs to know the names of the files that it will be getting input from. The names of these files could be hardcoded in strings in the program, taken as input at run time, or passed on the command line when the program begins running. Without seeing the source code of your program, we can't say what you need to do to run it.