- #1
1994Bhaskar
- 134
- 0
Hey everybody, I am a mechanical engineer and new to Fortran(I have decent experience in programming in C, Matlab and understand languages similar to them). However the Fortran programming structure is new to me. Hence I am facing problems debugging a Fortran code.
Here is the link of the code which I want to run.
http://www2.meteo.uni-bonn.de/forsch...rtran/coad1d.f
I am using a Plato Fortran Compiler.
It runs without showing error, but when I enter the values initially asked, the program stops mid-way showing an error:
Run-time Error
*** Error 112, Reference to undefined variable, array element or function result (/UNDEF)
COURANT - in file help.for at line 149 [+01de]
main - in file help.for at line 45 [+05dc]
So there is an error in the Courant subroutine or error in calling it. Again i am a little unfamiliar to fortran subroutines but is it possible for any of you to also check what the problem here is ?
As far as i could see the variables inside the subroutine were declared beforehand. And the logic looks correct.
Also is the declaration line 45 calling courant subroutine done correctly ?
Any help is appreciated. I have already received awesome help from you all here.
Here is the link of the code which I want to run.
http://www2.meteo.uni-bonn.de/forsch...rtran/coad1d.f
I am using a Plato Fortran Compiler.
It runs without showing error, but when I enter the values initially asked, the program stops mid-way showing an error:
Run-time Error
*** Error 112, Reference to undefined variable, array element or function result (/UNDEF)
COURANT - in file help.for at line 149 [+01de]
main - in file help.for at line 45 [+05dc]
So there is an error in the Courant subroutine or error in calling it. Again i am a little unfamiliar to fortran subroutines but is it possible for any of you to also check what the problem here is ?
As far as i could see the variables inside the subroutine were declared beforehand. And the logic looks correct.
Also is the declaration line 45 calling courant subroutine done correctly ?
Any help is appreciated. I have already received awesome help from you all here.
Last edited by a moderator: