Re: error in passing a string

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Sep 21 2010 - 13:30:26 MDT

If you explicitly define the length of the character array with something like "character*16" then you need to pass a character array to this routine, and not an NCL string.

Please see:

http://www.ncl.ucar.edu/Document/Tools/WRAPIT.shtml#Example_4

for an example of handling strings with WRAPIT.

--Mary

On Sep 21, 2010, at 12:00 PM, Mingxuan Chen wrote:

>
> Hello,
> I use WRAPIT calling a fortran subroutine.
> In the code I will pass a file name,
> ------------------------------------------------
> subroutine prt_snd(z,......,ouf)
> character(len=16),intent(in) :: outf
> .......
> end subroutine prt_snd
>
> C NCLFORTSTART
> subroutine prt_snd(z,.....,outf)
> ......
> character*16 outf
> ........
> C NCLEND
> ------------------------------------
> No error for using WRAPIT to get the .so file.
>
> In my ncl code define
> outf="ARM_0003_snd.dat"
>
> When callin subroutine
> prt_snd90::prt_snd(z,......,outf)
>
> I have error
> fatal:Number of elements of dimension (0) of argument (21) is (1) in function (prt_snd), expected (16) elements
> Where is wrong?
> Thanks for your help!
> Mingxuan
>
>
>
>
>
>
>
> _______________________________________________
> 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 Tue Sep 21 13:30:31 2010

This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 08:55:55 MDT