First, I would like to say that I have very little experience with Fortran 77.
I found a precision problem with this code. It uses a implicit double precision (a-h,o-z)
definition for all the variables inside the igrf12syn
subroutine.
However, when trying to debug this code, I noticed that most values lose precision at some point and using the terminator D0 at the end of the static definitions solve this problem.
But how can I define that the values on my dimension variable gh are explicitly double? I tried to add D0 at the end of the static values in the Data declarations but I got a compiler error.
Edit:
Compiler error after adding the "d0" to the end of a value.
Note that this error does not happen while adding "d0" to other values in the code, outside an array.
igrf.f:527.10:
data g0/ -31543.d0,-2298., 5922., -677., 2905.,-1061., 924., 1121
1
Error: DATA statement at (1) has more variables than values
TL/DR; A Fortran code is having precision problems and I need to add D0 to the end of statically defined values in the code. However, when adding D0 to the values inside the array, I got a compiler error.