ecastro
- 249
- 8
BvU said:Can you post your NaN disaster as a more concrete, traceable casus ?
Do you mean the line of processes for the NaN?
The 'refet' variable must have a quantitative value. If I traced it correctly, the 'refet' variable was divided with the 'seb' variable, which I have checked to be non-zero, so it can't cause the NaN. Before this, it was also calculated with 'romeas2' and 'coef'. Now, 'romeas2' is NaN.
The 'romeas2' variable is a result from 'ratm2', 'rsurf', and 'tgtot', and 'ratm2' is NaN (I haven't checked the other two variables yet).
The 'ratm2' variable is from the result of 'romix', 'rorayl', 'tgtot', and 'tgp1', and 'romix' is also NaN (I haven't also checked the three variables).
Now, 'romix' is an output of the 'interp' subroutine. Near the beginning of the code, the subroutine calculates a coefficient 'alphar', which uses the 'roatm' variable. This part causes the NaN because it is 0/0.
BvU said:Wasted some of my employers time dragging these source files into a DEC compiler (which, yuck, they call an Intel compiler nowadays) and got loads of errors (*), but some of them are pretty serious:
in AKTOOL.f subroutine dakg writes into u(30+) (up to 48) where the calling subroutine alkalbe declares uu(30), a(30)
Doesn't have to be a disaster (if the call isn't executed ever), but sure isn't very robust .
(*) well, 25 of them, and I compiled everything -- and there are clearly versions that probably shouldn't be used, like newMODIS ("subscript out of range: SR(13,...)" -- sr is declared SR (12,1501) ) etc.
I'm not familiar with gfortran, but if you can set compiler switches, you should do a maximum of checking.
Thank you for the trouble of compiling the codes. As of now, I do not use the subroutines you mentioned; I do not know for the other 24.