Hi
Thanks, I was able to do the fist step...adding multiple files.
The data were 4x Daily.
Now I'm trying to use this function month_to_season, but I'm finding
difficulties for 4 dimensions (time,lev,lat,lon)
I am sending my script and if need any extra information, I'll provide
later.
Please help
Vp
;*************************************************
; wind.ncl (1998-2004)
;************************************************
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"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
;************************************************
begin
;************************************************
; read in netCDF file
;************************************************
diru ="/home/Vishali/Documents/dadosVentos/"
filu = systemfunc("cd "+diru+" ; ls uwnd*nc")
print(filu)
fu = addfiles(diru+filu, "r")
dirv ="/home/Vishali/Documents/dadosVentos/"
filv = systemfunc("cd "+dirv+" ; ls vwnd*nc")
print(filv)
fv = addfiles(dirv+filv, "r")
;************************************************
; read in zonal [u] and meridional [v] winds
;************************************************
u = short2flt(fu[:]->uwnd(1,0,:,:))
v = short2flt(fv[:]->vwnd(1,0,:,:)) ; Get u, v, time
(1),level (1000hpa),latitude(-90:90) and longitude(0:360) data.
printVarSummary(u)
printVarSummary(v)
speed = sqrt(u^2+v^2) ; wind speed magnitude
;************************************************
; create plot
;************************************************
wks = gsn_open_wks("ps","vector_w") ; open a ps file
gsn_define_colormap(wks,"BlAqGrYeOrRevi200") ; choose color map
vcres = True ; plot mods desired
vcres@gsnFrame = False ; so we can draw time
stamp
vcres@gsnSpreadColors = True ; use full colormap
vcres@gsnSpreadColorEnd = -2 ; don't use added gray
i = NhlNewColor(wks,0.8,0.8,0.8) ; add gray to colors
vcres@vcRefAnnoOrthogonalPosF = -1.0 ; move ref vector up
vcres@vcRefMagnitudeF = 10.0 ; define vector ref mag
vcres@vcRefLengthF = 0.045 ; define length of vec
ref
vcres@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
vcres@vcMinDistanceF = 0.017
vcres@vcMonoLineArrowColor = False ; create color vectors
vcres@pmTickMarkDisplayMode = "Always" ; turn on tickmarks
;vcres@lbOrientation = "vertical" ; vertical label bar
;vcres@pmLabelBarDisplayMode = "Always" ; Turn on a label bar.
;vcres@pmLabelBarWidthF = 1
;************************************************
; Choose a subregion
;************************************************
vcres@mpFillOn = False ; turn off gray fill
vcres@mpOutlineBoundarySets = "National" ; turn on country
boundaries
vcres@mpGeophysicalLineColor = "Navy" ; color of cont. outlines
vcres@mpGeophysicalLineThicknessF = 1.5 ; thickness of outlines
vcres@mpMaxLatF = 0 ;maximum latitude
vcres@mpMinLatF = -45 ;minimum latitude
vcres@mpMaxLonF = 55 ;maximum longitude
vcres@mpMinLonF = 5 ;minimum longitude
vector = gsn_csm_vector_map_ce(wks,u,v,vcres)
;************************************************
; add time stamp to plot
;************************************************
; infoTimeStamp(wks,0.025,"*wnd*.nc") ; arguments are workstation
; size of text desired, and
; right string.
frame (wks)
end
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 27 06:37:18 2010
This archive was generated by hypermail 2.1.8 : Thu Sep 09 2010 - 05:56:39 MDT