Fortran storage order has the left-most subscript "fastest", and
so loop nests should have the left-most subscript index as the
loop-index for nested loops.  This is most-important for arrays
on the left hand side of an "=" -- for performance, the ARRAY2MATRIX
subroutines should be coded

       DO j=0, nColumn-1
       DO i=0, nLine-1
          nppOutput(i,j) = npInput(i*nColumn + j)
       END DO
       END DO

instead of

       DO i=0, nLine-1
       DO j=0, nColumn-1
          nppOutput(i,j) = npInput(i*nColumn + j)
       END DO
       END DO

[Actually, the single-indexing scheme should perhaps be changed
throughout to "j*nLine+i" as well, or else the 2-D array dimensions
should be reversed...]

FWIW --

Carlie J. Coats, Jr. Ph.D.                      [EMAIL PROTECTED]
Chief Systems Architect                     [EMAIL PROTECTED]
Environmental Modeling Center
Baron Advanced Meteorological Systems, LLC.
920 Main Campus Drive, Suite 101
Raleigh, NC 27606           phone: (919)424-4444 / fax: (919)424-4401


_______________________________________________
METRo-developers mailing list
[email protected]
https://mail.gna.org/listinfo/metro-developers

Reply via email to