[ncl-talk] wind vector query

Kunal Bali kunal.bali9 at gmail.com
Thu May 21 23:58:14 MDT 2015


Dear NCL users i plotted the wind vector data but map is generated without
country boundaries. please see attached figure.

How to draw country lines ??



;----------------------------------------------------------------------

load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/shea_util.ncl"

begin
;---Read data
  a   = addfile("/home/kunal/Pictures/NCL_Scripts/plot/mar_wind.nc","r")

;---Read in zonal [u] and meridional [v] winds
   u = a->U(:,:)
   v = a->V(:,:)

 ; lat = a->u&lat
 ; lon = a->u&lon

;---Create plot
  wks_type = "pdf"
  wks_type at wkPaperSize = "A4"
  wks = gsn_open_wks(wks_type, "mar_wind")

 ; cmap = read_colormap_file("BlAqGrYeOrReVi200")

  res = True
  res at vcMinFracLengthF = 1.0                 ;-- length of min vector as
;-- fraction of reference vector
  res at vcRefMagnitudeF  = 3.0                 ;-- make vectors larger
  res at vcRefLengthF     = 0.045               ;-- ref vec length
  res at vcGlyphStyle     = "CurlyVector"       ;-- turn on curly vectors
  res at vcMinDistanceF   = 0.01             ;-- thin out vectors
 ; res at tiMainString     = "March_Wind"
  res at vcMonoLineArrowColor  = False

  plot=gsn_csm_vector(wks,u,v,res)  ; create plot


end






Kunal Bali
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150522/b64a3e26/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wind12.pdf
Type: application/pdf
Size: 1212179 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150522/b64a3e26/attachment-0001.pdf 


More information about the ncl-talk mailing list