

Alternatively you can restructure the data declaration with more continuation lines to fit it all into the 72 column limit. To fix this you can increase the fixed-form line length with compiler options, but you will need to make sure the trailing values (e.g. Secondly, when you add D0 to these numbers you are pushing the last actual value past column 72 where it is then truncated and now you have less values than the variables. The 72nd character is the last comma and these remaining numbers are truncated. The values 1900 are not part of the array. See for example how g0 is handled in the source: dimension gh(3451),g0(120) !. Your problem is due to the constrains of fixed-format Fortran, which only allows 72 characters on the line.

However, when adding D0 to the values inside the array, I got a compiler error. 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. Note that this error does not happen while adding "d0" to other values in the code, outside an array. 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.īut 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.Ĭompiler error after adding the "d0" to the end of a value. It uses a implicit double precision (a-h,o-z) definition for all the variables inside the igrf12syn subroutine. I found a precision problem with this code.

First, I would like to say that I have very little experience with Fortran 77.
