Re: Is that a bug in function "specx_anal"?

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Sun, 1 Apr 2007 17:33:48 -0600 (MDT)

Dear Li,

It would help if you could provide us with the values for "nami".

Can you add the following to your code:

   print(nami(0:50,:))

and personally email me the output?

Thanks

--Mary

On Sun, 1 Apr 2007, lxf wrote:

> Hi,
> Today, when I use the function "specx_anal" in my script,I found the return value of it was
> a constant even if I input different length of arrays. However, "The return value is a scalar
> representing the degrees of freedom", so it should be different when the length of input arrays
> are different.
> Can somebody help me?
>
> The folowing is the segment of my script and the output information:
> ====================script===================================
> ;
> ; set function arguments
> ; detrending opt: 0=>remove mean 1=>remove mean and detrend
> d = 0
> ; smoothing periodogram: (0 <= sm <= ??.) should be at least 3 and odd
> ; sm = 3
> sm = 0
> ; percent tapered: (0.0 <= pct <= 1.0) 0.10 common.
> pct = 0.10
> ;
> ; calculate spectrum(chunck spectrum)
> ;
> data1=ndtooned(nami(0,:))
> data2=ndtooned(nami(0:1,:))
> data3=ndtooned(nami(0:2,:))
> data4=ndtooned(nami(0:50,:))
>
> sdof1 = specx_anal(data1,d,sm,pct)
> sdof2 = specx_anal(data2,d,sm,pct)
> sdof3 = specx_anal(data3,d,sm,pct)
> sdof4 = specx_anal(data4,d,sm,pct)
>
> print(dimsizes(data1)+" "+sdof1)
> print(dimsizes(data2)+" "+sdof2)
> print(dimsizes(data3)+" "+sdof3)
> print(dimsizes(data4)+" "+sdof4)
> ==================output information====================================
> Copyright (C) 1995-2006 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 4.2.0.a034
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
>
> (0) 365 1.89553
> (0) 730 1.89553
> (0) 1095 1.89553
> (0) 18615 1.89553
>
>
> Best regards,
> li
> 2007-04-01
>
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Apr 01 2007 - 17:33:48 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 02 2007 - 08:01:14 MDT