Fortran Wrapper and 2D array passing

From: Paul Nutter (pnutter AT XXXXXX)
Date: Thu Sep 04 2003 - 16:55:44 MDT

  • Next message: Xuexi Tie: "ncl"

    Hi- I'm encountering an error while trying to call an external
    Fortran77 routine:

    ..................
    fatal:BLKTRI: dimension size of dimension (1) of Y must be equal to the
    value of IDIMY
    ..................

    Here is the Fortran subroutine statement (wrapper) - I simply added the
    NCL statements and compiled using "WRAPIT":
    ..................
    C NCLFORTSTART
           SUBROUTINE BLKTRI (IFLG,NP,N,AN,BN,CN,MP,M,AM,BM,CM,IDIMY,Y,
          1 IERROR,W)
           DIMENSION AN(*) ,BN(*) ,CN(*) ,AM(*) ,
          1 BM(*) ,CM(*) ,Y(IDIMY,*) ,W(*)
    C NCLEND
    ..................

    Here are relevant NCL snippets:
    ..................
       external BLKTRI "./blktri.so"

       W1 = new( (/M,N/), float )
       BLKTRI::blktri(0,1,N,AN,BN,CN,1,M,AM,BM,CM,M,W1,ierr,W2)
    ..................

    You see, 'M' is passed to the dummy value IDIMY to indicate the first
    dimension of the array W1 - for which 'Y' is the dummy name.

    Does anyone understand what is the error? I"ve tried switching 'M' for
    'N' and had the same error.

    Paul Nutter

    _______________________________________________
    ncl-talk mailing list
    ncl-talk AT ucar.edu
    http://mailman.ucar.edu/mailman/listinfo/ncl-talk



    This archive was generated by hypermail 2b29 : Fri Sep 05 2003 - 13:46:40 MDT