Re: Question on the trXMinF/trXMaxF resource for wavelet power contour !

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Tue, 30 Jan 2007 10:39:47 -0700

Hi Lin,

After talking it over with one of the ncl developers, the only solution
to this is to copy your data into an array that has the time coordinates
that you want.

The inability of gsn_csm_contour to allow you to specify axis min/max's
outside of your coordinate variable range is unfortunately a limitation
of the gsn_csm_contour plotting function... Thanks to Dave Brown for
diagnosing all of this...

So, the workaround is:

time = fspan(1901,2002,ntime)
w =
wavelet(nino_ano,mother,dt,param,s0,dj,jtot,npad,noise,isigtest,siglvl,nadof)

   power = onedtond(w_at_power,(/jtot,N/))
   power!0 = "period" ; Y axis
   power&period = w_at_period
; convert period to units of years
   power!1 = "time" ; X axis
   power&time = time

   res = True
.....
   res_at_trXMinF = 1900
   res_at_trXMaxF = 2005

   power2 = \
new((/dimsizes(w_at_period),res_at_trXMaxF - res_at_trXMinF+1/),typeof(power))
   power2!0 = "period"
   power2&period = w_at_period
   power2!1 = "time"
   power2&time = ispan(res_at_trXMinF,res_at_trXMaxF,1)

   ......
   plot = gsn_csm_contour(wks,power2,res)

Good luck,
Adam

LEO_ARIES wrote:
> hi, all
>
> Here are some part of codes for a wavelet power contour!
>
> ..................
> time = fspan(1901,2002,ntime)
>
> w =
> wavelet(nino_ano,mother,dt,param,s0,dj,jtot,npad,noise,isigtest,siglvl,nadof)
>
> power = onedtond(w_at_power,(/jtot,N/ <mailto:w_at_power,(/jtot,N/>))
> power!0 = "period" ; Y axis
> power&period = w_at_period <mailto:w_at_period> ;
> convert period to units of years
> power!1 = "time" ; X axis
> power&time = time
> .....
> res_at_trXMinF <mailto:res_at_trXMinF> = 1900
> res_at_trXMaxF <mailto:res_at_trXMaxF> = 2005
> .....
>
> plot = gsn_csm_contour(wks,power,res)
>
> ............
>
>
> I got a warning message as below :
>
> warning:ContourPlotSetValues: current transformation requires trXMinF to
> be within data coordinate range: resetting
> warning:ContourPlotSetValues: current transformation requires trXMaxF to
> be within data coordinate range: resetting
>
> and it seems that trXMinF and trXMaxF do not work because of irregular y
> (period) coordinate, although the x-coordinate
> (time) is regular.
>
> Can I still get a contour map in a time domain of 1900-2005 in this
> case? Thank.
>
>
>
> Good Luck
>
> Lin
>
>
>
>
> ------------------------------------------------------------------------
> LEO_ARIES
> 2007-01-30
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Jan 30 2007 - 10:39:47 MST

This archive was generated by hypermail 2.2.0 : Tue Feb 06 2007 - 15:01:34 MST