Dear NCL users:
I would like to eventually call a fortran 90 script from
my ncl script. To do this, I followed Dennis's earlier
notes where I have created a shell script containing my
NCL code and fortran 90 code. However early on,
I am getting a parsing error when when using WRAPIT.
I am using the portland group f90 compiler and I have
NCL version a023. I can't seem to create the shared
object w/ WRAPIT (.so file). However, I can compile
my fortran 90 code fine doing pgf90 -c interp.f90 where
interp.f90 is my fortran subroutine. To start with a simple
question, does it matter if my comment notation is (! instead
of C) in fortran 90 as pgf90 seems to complain when I
use C instead of !.
Any suggestions as to why WRAPIT might be complaining.
many thanks,
Matt
Here is my fortran 90 code:
! NCLFORTSTART
  subroutine interp(nx,ny,inlen,nhrlen,agglen,aggcnt,fvar, &
                    rA,rB,wgtA,wgtB,varhour,varhold)
  character(len=3)                 :: fvar
  integer                       :: nhrlen,nx,ny,agglen,aggcnt
  real,dimension(ny,nx)         :: rA,rB
  real,dimension(nhrlen)        :: wgtA,wgtB
  real,dimension(inlen,ny,nx)   :: varhold
  real,dimension(agglen,ny,nx)  :: varhour
! NCLEND
  integer                       :: nind
  if(fvar.ne."gpr") then
     do i=0,inlen-2
       varhour(aggcnt,:,:)=varhold(i,:,:)
       do j=0,nhrlen-1
         rA(:,:)=wgtA(j)
         rB(:,:)=wgtB(j)
         aggcnt=aggcnt+1
varhour(aggcnt,:,:)=rB(:,:)*varhold(i,:,:)+rA(:,:)*varhold(i+1,:,:)
       end do
       aggcnt=aggcnt+1
     end do
     varhour(aggcnt,:,:)=varhold(inlen-1,:,:)
  else
     varhour(::6,:,:)=varhold(:,:,:)
     nind=1
     do i=0,inlen-1
       varhour(nind,:,:)=varhold(i,:,:)
       nind=nind+1
       varhour(nind,:,:)=varhold(i,:,:)
       nind=nind+1
       varhour(nind,:,:)=varhold(i,:,:)
       nind=nind+1
       varhour(nind,:,:)=varhold(i,:,:)
       nind=nind+1
       varhour(nind,:,:)=varhold(i,:,:)
       nind=nind+2
     end do
  end if
  return
  end
_______________________________________________
ncl-talk mailing list
ncl-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2b29 : Fri Jun 21 2002 - 15:32:50 MDT