Re: How to Extract and plot wind vectors in a box

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Sun Apr 08 2012 - 08:59:10 MDT

Before proceeding: you did not answer the question that was asked.

Is the file you are reading generated by the WRF model?

If so, Please ftp the file to

ftp ftp.cgd.ucar.edu
anonymous
<use your email address for the password>
cd incoming
put met_em.d01.2009-04-01_00:00:00.nc
quit

Send email to ncl-talk (you must subscribe first) with the following
information:

     Send an email after you have successfully completed the transfer.

     The version of NCL you are running (ncl -V).
     The type of system you are on (uname -a).

On 4/8/12 1:22 AM, Ragi A.R wrote:
> Sir,
>
> I tried removing that line but still am getting the same plot /.
>
> -- /
> ///Regards,/
> /A.R.Ragi/
> /Research Scholar
> /
> /Centre for Atmospheric Sciences
> IIT Delhi, Hauz Khas
> New Delhi, India.
> /
> //
>
>
>
>
> On Sat, Apr 7, 2012 at 19:11, Dennis Shea <shea@ucar.edu
> <mailto:shea@ucar.edu>> wrote:
>
> You have used a graphical option (resource)
>
>
> res@vcMinDistanceF = 0.025 ; thin out vectors
>
> that does exactly what the the comment states ...
> it 'thins' the vectors.
>
> Comment or eliminate that line
>
> ;res@vcMinDistanceF = 0.025
>
>
> On 4/7/12 2:01 AM, Ragi A.R wrote:
>
>
>
>
>
> 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
> <http://00.nc> <http://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
> <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 Sun Apr 8 08:59:20 2012

This archive was generated by hypermail 2.1.8 : Mon Apr 09 2012 - 13:43:03 MDT