Re: wrapit and complex number

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Aug 07 2011 - 07:29:04 MDT

Since w and z are not arguments, NCL does not have
to deal with them. Place the declaration after
the C NCLEND

C NCLFORTSTART
         subroutine respBF2(n,dt,w1,w2,a,b1,b2,h)
C NCLEND
         complex w,z !Work array

On 8/7/11 1:42 AM, Coly SAR wrote:
> This is the header of the code with wrapit:
> C NCLFORTSTART
>
> subroutine respBF2(n,dt,w1,w2,a,b1,b2,h)
> complex w,z !Work array
> C NCLEND
>
>
> 2011/8/6 Dennis Shea <shea@ucar.edu <mailto:shea@ucar.edu>>
>
> If you are not returning a complex number to NCL
> then you do not have to deal with it. The code snippet
> is not very revealing. If you are returning "h" it is real.
>
> WRAPIT **only** deal with the arguments of the the subroutine.
>
>
> On 8/6/11 11:55 AM, Coly SAR wrote:
>
> I have a subroutine with a complex part and need guidance
> on how I could use it with wrapit.
> Below is the section which have a complex part
>
> do 10 i=1,n
> omg=2.*pi/float(i)
> omg=omg*dt
>
> z=exp(cmplx(0,-omg))
> w=a*(1-z**2)/(1.+b1*z+b2*z**2)
> h(i)=abs(w)**2
>
> 10 continue
> return
> end
>
> Thanks
>
> CS
>
>
> _________________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/__mailman/listinfo/ncl-talk
> <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
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Aug 7 07:29:11 2011

This archive was generated by hypermail 2.1.8 : Fri Aug 12 2011 - 11:48:30 MDT