Re: Using fortran subroutine in NCL

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sat Dec 26 2009 - 13:01:26 MST

I just copied the codes. I used the gfortran, intel and portland_group
fompilers. Every thing worked fine. For example:

%> WRAPIT -gf -fPIC quad90.stub quad.f90

WRAPIT Version: 091416
COMPILING quad.f90
LINKING
END WRAPIT

====

Sometime there are unseen characters [eg: ^M] so I suggest
manually deleteing everything after the last character.

Good luck

Lei Meng wrote:
> Hi,
> I am testing a fortran subroutine in NCL using the following two
> files (see below). I used "WRAPIT quad90.stub quad.f90" to compile it.
> An error messange"
> - - - - - - - - -
> WRAPIT Version: 091416
> A syntax error occurred while parsing:
> COMPILING quad.f90
> LINKING
> END WRAPIT
> - - - - - - -- - - -
> It did not provide any hints on what is the syntax error. Is there
> anything wrong with my WRAPIT version? Thanks,
>
> ----------------quad90.stub---------------
> C NCLFORTSTART
> subroutine cquad(a,b,c,nq,x,quad)
> real a,b,c
> integer nq
> dimension x(nq),quad(nq)
> C NCLEND
> --------------------------------------
> ---------------------quad.f90------------
> subroutine cquad(a,b,c,nq,x,quad)
> implicit none
> integer, intent(in) ::nq
> real, intent(in) ::a,b,c,x(nq)
> real, intent(out) ::quad(nq)
> integer ::i
>
> quad = a*x**2+b*x+c
> return
> end subroutine cquad
> ------------------------------------------
> Thanks,
> Lei
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Dec 26 13:02:43 2009

This archive was generated by hypermail 2.1.8 : Tue Dec 29 2009 - 10:29:16 MST