This is quite curious. The possibilities would seem to be
- subscript out of bounds in
fevgrn(c,r)
or Grid_Data%lufrac(c,r,l)
, which seems quite improbable given the loop-bounds in the enclosing loop-nest and the ALLOCATE
statements immediately above HGSIM.F line 174-176
; or
-
Grid_Data%lufrac(c,r,l)
not yet allocated (which seems unlkely, also.
BTW, this is lousy code that has the relationship between subscripts and loop-orders exactly backwards for good performance (and the bad performance will get worse and worse as the problem size gets larger and larger; for reasonable performance, the loop order should have been:
DO L = 1, N_LUFRAC
DO R = 1, NROWS
DO C = 1, NCOLS