Re: Using fortran subroutine in NCL

From: Lei Meng <dream916_at_nyahnyahspammersnyahnyah>
Date: Sat Dec 26 2009 - 15:15:12 MST

Hi Dennis,
   Which editor did you use to create the two files? I used UltraEdit to
delete the lines after the last character and it did not work. However, when
I manually typed the codes via vi and saved them, it worked. It seems that
the error might be associated with the editor I used. Thanks,
   Lei

On Sat, Dec 26, 2009 at 3:01 PM, Dennis Shea <shea@ucar.edu> wrote:

> 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 15:15:19 2009

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