[ncl-talk] Unable to plot vector wind for a regional domain

Kyle Griffin ksgriffin2 at wisc.edu
Tue May 26 08:29:01 MDT 2015


You might want to look at what some of your vc***** resources are actually
doing before using them in this manner. Your comments as to what they do
are not all correct.

res at vcMinFracLengthF             =1.0           ; Length of min vector

The above should probably be res at vcMinMagnitudeF.
vcMinFracLengthF, from the documentation:

Setting *vcMinFracLengthF*
<http://www.ncl.ucar.edu/Document/Graphics/Resources/vc.shtml#vcMinFracLengthF>
to
the value 1.0 causes all vectors to be drawn with the same length

http://www.ncl.ucar.edu/Document/Graphics/Resources/vc.shtml#vcMinFracLengthF

which I'm pretty sure defeats the purpose of plotting data at all.

You also set res at vcMinDistanceF = 0.01, which means you'll likely have
every single vector plotted on the domain, and might be what is happening
in your first attached image.

Since you are setting a handful of resources to values that don't
necessarily make sense, I would suggest setting only ONE resource out of
your vector resource settings and seeing what the default plot the NCL
produces looks like. This might be much better than what you have changed
it to.

res at vcGlyphStyle                 ="CurlyVector"

*However*, none of what I've written above is particularly relevant or
really matters because your entire script in its current form is
essentially a waste of code. You MUST actually use the 'res' variable (with
all your resources settings attached) in your plot! Your line

plot  = gsn_csm_vector_map(wks,Uwind,Vwind,True)

needs to have 'res' instead of 'True' for ANY of the resources to be
applied at all! As is, you are plotting the entire globe's worth of data
because none of your map limits, styles, or vector settings are being
passed to the plotting function! The second map you sent us plots as nicely
as it does because you actually give it 'res', not 'True'!

Good luck, and reply back to the list if you are still having problems.


Kyle

----------------------------------------
Kyle S. Griffin
Department of Atmospheric and Oceanic Sciences
University of Wisconsin - Madison
Room 1421
1225 W Dayton St, Madison, WI 53706
Email: ksgriffin2 at wisc.edu

On Tue, May 26, 2015 at 12:52 AM, Geeta Geeta <geetag54 at yahoo.com> wrote:

> Hi
> I have to plot 850hpa Vector wind for a regional domain (0-40N/50-100E).
> My dataset is FNL reanalysis. I tried following scripts. (png file is
> attached)
> ;
> 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/wrf/WRFUserARW.ncl"
> ; Open the file----------
> begin
> a = addfile("~/Mesomodel/gfs/test.nc","r")
> ;printVarSummary(a)
> ;
> ; -----Read data------
> Uwind = a->UGRD_P0_L100_GLL0(20,:,:); Read the variable to memory
> Vwind = a->VGRD_P0_L100_GLL0(20,:,:); Read the variable to memory
> Uwind at _FillValue = -999
> Vwind at _FillValue = -999
> printVarSummary(Uwind)
> printVarSummary(Vwind)
> ;
> ; ----Create Plot-----------------
> wks   = gsn_open_wks("png", "wind850")
> res                             = True
> res at tiMainString                = "WIND 850hPa "
> ;pltres                         = True
> ;
> ;               Map Resources
> mpres                           = True
> res at mpFillOn                    =False
> res at mpOutlineBoundarySets       ="National"
> res at mpGeophysicalLineColor      ="Black"
> res at mpMinLatF                   = 0.0
> res at mpMaxLatF                   = 40.0
> res at mpMinLonF                   = 50.0
> res at mpMaxLonF                   = 100.0
> res at mpDataBaseVersion           ="MediumRes"
> ;plot  = gsn_csm_map_ce(wks,res)        ;Draws a map
> ;plot  = gsn_csm_vector_map(wks,Uwind,Vwind,True)
> ;plot  = gsn_csm_map_ce(wks,True)
> ;
>
>
> ;vecres                           =True
> res at vcMinFracLengthF             =1.0           ; Length of min vector
> res at vcRefMagnitudeF              =3.0           ; Makes Vectors larger
> res at vcRefLengthF                 =0.045         ; ref vec Lengthlarger
> res at vcGlyphStyle                 ="CurlyVector" ; ref vec Lengthlarger
> res at vcMinDistanceF               =0.01          ; ref vec Lengthlarger
> res at vcMonoLineArrowColor         =False         ; ref vec Lengthlarger
>
> plot  = gsn_csm_vector_map(wks,Uwind,Vwind,True)
> end
>
> With this script, the problem is it is NOT Plotting the data for the
> regional domain.
>
>
> A little change in the above script (changes given below)
> plot  = gsn_csm_map_ce(wks,res)        ;Draws a map
>
> draws a regional map BUT without data.
>
> Both figures attatched.
>
> Any suggestions............
> Geeta.
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150526/1e3934f4/attachment.html 


More information about the ncl-talk mailing list