Re: wrapit and complex number

From: Coly SAR <colysar_at_nyahnyahspammersnyahnyah>
Date: Sun Aug 07 2011 - 10:06:21 MDT

Thanks Denis, after doing your suggestion WRAPIT compiled Ok.

My next step is to try to call this filter (I need to call the response
filter subroutine and then the the filter itself) and apply it to a netcdf
file of u and v wind, write the output in another netcdf file.
Hope to have indications on the manual or help from the experienced users.

CS

2011/8/7 Dennis Shea <shea@ucar.edu>

> 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>
>> <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<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 10:06:28 2011

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