Re: On the significant test of the wavelet analysis

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu May 30 2013 - 11:36:44 MDT

It depends on what you mean by "directly". We can create contours of unstructured data via a triangular mesh algorithm. See our "Contouring one-dimensional data" page:

http://www.ncl.ucar.edu/Applications/contour1d.shtml

The key is that you have to set:

res@sfXArray
res@sfYArray

to the lon/lat arrays that represent your 1D data. You will also likely need:

res@gsnAddCyclic = False

--Mary

On May 24, 2013, at 7:32 AM, 朱学明 wrote:

> Hello everyone,
> I am a newer to NCL. Could you tell me whether NCL can deal with the unstructured grid data directly, such FVCOM model output? And we don't neet to do interpolate. Thanks.
>
> Xueming Zhu 朱学明
> Key Laboratory of Research on Marine Hazards Forecasting(LoMF),SOA
> National Marine Environmental Forecasting Center(NMEFC)
> No.8, Dahuisi Road, Haidian District, Beijing , 100081
> People's Republic of China
> Tel:+86-10-82481923
>
> 于 2013/5/24 14:29, liuyong 写道:
>> Dear everyone,
>> I encounter one problem on the significant test of the wavelet analysis. Based on description of the NCL website, the wavelet function is to calculates the wavelet transform of a time series and significance levels, and the return values contain the wave@power, wave@scale, wave@signif, wave@dof, and, etc. The wave@sigif is one dimensional array of length jtot (same type as wave) containing significance level versus scale. So I think the significance level of the wavelet result can be achieved from the two values (wave@scale, wave@signif). While, the examples of the wavelet analysis give me a different way to calculate the significance, which is shown as follows:
>>
>> This example reads a time series of seasonal mean sea surface temperatures. It mimics the example provided at the above URL.
>>
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
>> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>>
>> begin
>> f = addfile ("/fs/cgd/home0/shea/ncld/test/sst_nino3.nc", "r")
>> x = f->SST
>> N = dimsizes(x) ; number of elements [here 504]
>>
>> mother = 0 ; Morlet wavelet
>> param = 6.0 ; common for Morlet
>> dt = 0.25
>> s0 = 0.25
>> dj = 0.25 ; 4 sub-octaves per octave
>> jtot = 44 ; =subScale*11
>> npad = 1024 ; pad with extra zeros
>> nadof = new( 2,float) ; ignored
>>
>> noise = 1 ; test vs red noise
>> siglvl = 0.05
>> isigtest= 0
>>
>> w = wavelet (x,mother,dt,param,s0,dj,jtot,npad, \
>> noise,isigtest,siglvl,nadof)
>>
>> ; create coordinate arrays for plot
>> power = onedtond( w@power, (/jtot,N/) )
>> power!0 = "period" ; Y axis
>> power&period = w@period
>> power!1 = "time" ; X axis
>> power&time = x&time
>> power@long_name = "Power Spectrum"
>> power@units = "C^2"
>>
>> ; compute significance ( >= 1 is significant)
>> SIG = power ; transfer metadata
>> SIG = power/conform (power,w@signif,0)
>>
>> wks = gsn_open_wks("x11","example")
>> ; PLOT (only up to periods of 64)
>> ; power
>> res = True
>> res@cnFillOn = True
>> res@trYReverse = True
>> res@gsnSpreadColors = True
>> plot = gsn_csm_contour(wks,power({0:64},:),res)
>>
>> ; significance
>> RES = True
>> RES@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels
>> RES@cnMinLevelValF = 1.0 ; set min contour level
>> RES@cnMaxLevelValF = 4.0 ; set max contour level
>> RES@cnLevelSpacingF = 3.0 ; set contour spacing
>> RES@trYReverse = True
>> pSIG = gsn_contour(wks,SIG({0:64},:),RES)
>>
>> end
>>
>> The example tells us the SIG = power/conform (power,w@signif,0), and SIG >= 1 is significant at 0.95 level. However, what the value of SIG corresponds to the significance at 0.99 or 0.90 level. So my question is “is there an universal way to calculate the significance of the wavelet analysis”
>>
>> -------------------------------------------------------
>> -------------------------------------------------------
>> Liu Yong
>> Center for Monsoon Research Center, Institute of the Atmospheric Physics,
>> Chinese Academy of Sciences, Beijing, China
>> EMAIL: liuyong@mail.iap.ac.cn
>> PHONE: 82995289/62659180
>> -------------------------------------------------------
>> -------------------------------------------------------
>>
>>
>>
>> _______________________________________________
>> 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

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 30 11:37:14 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT