> I am learning how to use the wavelet script along with a wrf idealized model
> run.
> My question concerns the use of a variable and its association with time as in
> the following from the wavelet_1.ncl script:
>
> power&time = time
>
> What does this statement actually do?
>
> Is "time" supposed to be defined in the netcdf file as an attribute?
> Thanks for any insight.
==========================================================
The wavelet example
f = addfile ("/cgd/cas/shea/TEST/wavelet/NAO_b053.03_0000-0999.nc","r")
nao = f->NAO ; one value/year
time = nao&time ; time values
w = wavelet(nao.....)
power = onedtond(w_at_power,(/jtot,N/))
You could plot 'power' directly without creating coordinate
variables.
plt = gsn_csm_contour(wks,power,res)
It just makes for a nicer plot to include coordinate information.
=========
A quick lesson on NCL variables.
NCL variables are based upon the netCDF variable model:
(a) an array or scalar; (b) [possibly] attributes; (c)
[possibly] named dimensions; (d) [possibly] coordinate variables.
A brief descripion of netCDF files and variables is at:
http://www.ncl.ucar.edu/Training/Workshops/lectures.shtml
netCDF (describes netCDF)
[A 'picture' of NCL variables may be seen as the
5th power point slide.]
;************************************
; manually create coordinate arrays [will be used by gsn_csm_comtour]
;************************************
power!0 = "period" ; Y axis
power&period = w_at_period
power!1 = "time" ; X axis
power&time = time ; assign time values
; to the named dimension
; will be used for plot
[SNIP]
;************************************
; NCL's gsn_csm* are 'meta-data aware'
; They will use the coordinate values for plotting.
;************************************
plot(0) = gsn_csm_contour(wks,power,res)
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Jan 12 2007 - 09:24:48 MST
This archive was generated by hypermail 2.2.0 : Tue Jan 16 2007 - 14:49:45 MST