Dear NCL users,
I have a* .nc* file (*met_em_files* after WPS) which have U (wind) and V
(Wind) values for the domain 7N-20N; 70E-80E and which is staggered. I want
to extract and unstagger them (only u and v) and then plot (u,v) vector
for the domain *8N; 76E-77E* and *18N; 73E-74E* (domain attached *doc1.pdf*).
The below is my approach (I modified the domain from 73E-77E and 78N-18N).
But the issues are:
1). The vectors are not as expected. I have values at all grid points but
only few vectors r there.
2). Not able to generate the box I wanted (as highlighted in doc1.pdf).
3). I wanted to plot the (u,v) vector at the four corners of the box.
Can anyone suggest a solution to this?
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/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"
begin
a = addfile("met_em.d01.2009-04-01_00:00:00.nc","r")
uu = wrf_user_getvar(a, "UU", 0)
ua = uu(1,:,:)
u = wrf_user_unstagger(ua,ua@stagger)
vv = wrf_user_getvar(a, "VV", 0)
va = vv(1,:,:)
v = wrf_user_unstagger(va,va@stagger)
wks = gsn_open_wks("ps", "uv_plot") ; open ps file
gsn_define_colormap(wks,"gui_default") ; choose colormap
res = True ; plot mods desired
res@gsnMaximize = True ; maximize size
res@gsnSpreadColors = True ; use full colormap
res@gsnSpreadColorEnd = -2
res@lbOrientation = "vertical" ; vertical label bar
res@mpFillOn = True ; no map fill
res@vcRefMagnitudeF = 5 ; make vectors larger
res@vcRefLengthF = 0.025 ; ref vec length
res@vcMinDistanceF = 0.025 ; thin out vectors
res@vcGlyphStyle = "CurlyVector" ; choose wind barbs
res@vcLabelsOn = True
res@vcMonoLineArrowColor = False ; color barbs by scalar
minlat = 8
maxlat = 18
minlon = 73
maxlon = 77
res@mpMinLatF = minlat
res@mpMaxLatF = maxlat
res@mpMinLonF = minlon
res@mpMaxLonF = maxlon
res@mpOutlineBoundarySets = "National"
res@pmTickMarkDisplayMode = "Always"
res@mpFillOn = False ; turn off map fill
res@mpOutlineDrawOrder = "PostDraw"
plot=gsn_csm_vector_map_ce(wks,u,v,res)
end
*-- *
***Regards,*
*A.R.Ragi*
*Research Scholar
*
*Centre for Atmospheric Sciences
IIT Delhi, Hauz Khas
New Delhi, India.
*
**
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT