[ncl-talk] T-test for filtered time series
Lyndz
olagueralyndonmark429 at gmail.com
Fri Dec 28 04:41:16 MST 2018
*Dear NCL-experts,*
I want to perform a *t*-test similar to example 4 in the NCL webpage: (
https://www.ncl.ucar.edu/Document/Functions/Built-in/ttest.shtml), but in
this case,
I will be using a different equivalent sample size (degrees of freedom)
following Davis (1976) (below image explains the details and also attached
in this email):
[image: Screenshot from 2018-12-28 18-33-00.png]
*Sources:*
*Davis, R. E., 1976: Predictability of sea surface temperature and sea
level pressure anomalies over the North Pacific Ocean. J. Phys. Oceanogr.,
6, 249–266.*
Below are the links to my data sets. I also attached here the script. I
want to save the output as a netcdf file with the test statistics and
pvalues.
*Link to File 1:*
https://www.dropbox.com/s/cmjpmvcw9i4qxo0/rhum_P45P50_1979-1993_filt_850hPa.nc?dl=0
*Link to File 2:*
https://www.dropbox.com/s/o8dtkt2yznlgvql/rhum_P45P50_1994-2008_filt_850hPa.nc?dl=0
*PROBLEMS*:
1. I got the following warning message:
* warning:ttest: encountered 10512 cases where s1 and/or s2 were
less than 2. Output set to missing values in these cases*
I am not sure if this should be ignored or this indicates a mistake in my
code.
2. I also got the following error message after running the script:
* fatal:Number of dimensions on right hand side do not match number
of dimension in left hand side*
* fatal:["Execute.c":8640]:Execute: Error occurred at or near line
58 in file ttest_filtered.ncl*
Any idea how to solve this?
I would like to ask for your suggestions on how to do this correctly in NCL.
I'll appreciate any help.
Sincerely,
*Lyndz*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181228/43288e35/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2018-12-28 18-33-00.png
Type: image/png
Size: 102810 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181228/43288e35/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot from 2018-12-28 18-33-00.png
Type: image/png
Size: 102810 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181228/43288e35/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ttest_filtered.ncl
Type: application/octet-stream
Size: 1932 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20181228/43288e35/attachment.obj>
More information about the ncl-talk
mailing list