Does anyone know how to generate a contour of the magnitude of the
spectra of a time series of netcdf files, plotted as a function of
period and altitude/pressure level, at a give latitude ?.
I would also like to plot a contour of the spectral magnitude as a
function of period and latitude, at a given altitude.
I have produced spectra for the time series at a fixed latitude and
fixed altitude, using specx_anal, but I am not sure if I can use the
same routine to produce a magnitude contour as a function of period
and altitude, and I could not find any examples where this was done.
Does anyone know how to do this ?.
I enclose my current script for specx_anal 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 zeusrand09125*.cam2.h0*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
pct = 0.1
kl = 49 ; 0 km altitude
nl = 27 ; 65 deg latitude
ml = 144
nt = 0
spec = specx_anal(U(lev|kl, lat|nl, lon|ml, time|:),d,sm,pct)
wks = gsn_open_wks ("eps", "spectrum.0km.65lat" ) ;
open workstation
gsn_define_colormap(wks,"rainbow") ; choose colormap
res = True
res@gsnCenterString = "Zonal wind spectrum, 0 km altitude,
65~S~0~N~ latitude"
res@tiXAxisString = "Period (Earth years)"
res@tiYAxisString = "Variance (m~S~2~N~ s~S~-2~N~)"
plot = gsn_csm_xy(wks,1/spec@frq,spec@spcx,res)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat Nov 6 01:15:40 2010
This archive was generated by hypermail 2.1.8 : Mon Nov 15 2010 - 12:45:32 MST