Hello,
I looked closer on Nag compiler, actually the error occurs in bord3d.f, when reading on the formatted file 1, in the first loop from 1 to NPLAN, when you try to read 164 numbers (NPTFRL). This would be too long for the input buffer. This is not where you told us so I suspect several problems. The fact that you have an error in another subroutine and that it works with Intel compiler hints that there is a memory error. For example the test IF(TIME.EQ.T2DTS) THEN allocate... is dangerous (comparison of 2 double precision numbers), though here it seems to work on Nag because I see the allocation.
Sorry I have to leave to Manchester now...
REgards,
Jean-Michel