Re: Titles on Spectral Plot ?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 18 Feb 2009 08:05:34 -0700

NCL is case sensitive

You have
res_at_tiXaxisString = "Days"

It should be
res_at_tiXAxisString = "Days"

--- also with 'sm=1'

you are generating a periodogram.
I suggest that you set 'sm=3'

Helen Parish wrote:
> Does anyone know how to put titles on the axes of a spectral plot
> which uses "specx_anal" ?. I have tried using
>
> res_at_tiXaxisString = "Days"
>
> analogous to the example given in Application Examples, however I get
> the message :
>
> warning:tiXaxisString is not a valid resource in
> zeusranddaily7608.60km.spec.test_xy at this time
>
> Does anyone know what I need to use here to label the axes ?.
>
> I enclose my current script below.
>
> Thanks,
> Helen.
>
> ;***********************
> ; fourtest.ncl
> ;***********************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ;***********************
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
>
> begin
>
> ; Keep all files open when have a lot of files :
> setfileoption("nc","SuppressClose",False)
>
> diri = "./"
> ; fili = systemfunc("cd "+diri+" ; ls zeusorigspongej*.cam2.h0*nc")
> ; fili = systemfunc("cd "+diri+" ; ls
> zeusrand09125daily*.cam2.h0*nc")
> fili = systemfunc("cd "+diri+" ; ls
> zeusrand09125daily*.cam2.h0*76-08*nc")
>
> f = addfiles (fili,"r")
> U = addfiles_GetVar(f,fili,"U")
> lat = addfiles_GetVar(f,fili,"lat")
> lon = addfiles_GetVar(f,fili,"lon")
> lev = addfiles_GetVar(f,fili,"lev")
> printVarSummary( U )
>
> dimu = dimsizes( U )
> ntim = dimu(0)
> klvl = dimu(1)
> nlon = dimu(2)
> mlon = dimu(3)
>
> uavg = dim_avg_Wrap(U)
>
> ;***********************
> ; Create Plot
> ;***********************
> d = 1
> ; sm = 3
> sm = 1
> pct = 0.1
>
> ; kl = 10
> kl = 21
> nl = 96
> ml = 40
> nt = 0
> ; spec = specx_anal(u(lev_p|kl, lat|nl, lon|:, time|nt),d,sm,pct)
> spec = specx_anal(U(lev|kl, lat|nl, lon|ml, time|:),d,sm,pct)
>
> wks = gsn_open_wks ("pdf",
> "zeusranddaily7608.60km.spec.test" ) ; open workstation
> ; wks = gsn_open_wks ("ps", "rand09125k260117speca" ) ;
> open workstation
> gsn_define_colormap(wks,"rainbow") ; choose colormap
>
> res = True
> ; res_at_cnFillOn = True
> ; res_at_lbLabelAutoStride = True
> ; res_at_gsnMaximize = True ; if [ps, eps, pdf] make large
> ; res_at_gsnSpreadColors = True ; span color map
>
> res_at_gsnCenterString = "zeusranddaily7608.60km"
> res_at_tiXaxisString = "Days"
> ; res_at_tiYaxisString = "Variance"
>
> ; plot = gsn_csm_xy(wks,spec_at_frq,spec_at_spcx,res)
> plot = gsn_csm_xy(wks,1/spec_at_frq,spec_at_spcx,res)
>
> end
>
> _______________________________________________
> 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 Wed Feb 18 2009 - 08:05:34 MST

This archive was generated by hypermail 2.2.0 : Thu Feb 19 2009 - 09:54:51 MST