[ncl-talk] wind vector query

Kunal Bali kunal.bali9 at gmail.com
Thu May 21 06:37:41 MDT 2015


Dear NCL users


i am trying to plot the wind vector data using attached script but getting
errors (below the scripts )

variables are U and V

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

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/wind.nc","r")

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


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

  cmap = read_colormap_file("BlAqGrYeOrReVi200")

  res                                  = True
  res at vcMinFracLengthF    = 1.0                 ;-- length of min vector as
  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               = "DKRZ NCL Workshop: vector curly"


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


end








*fatal:Number of subscripts do not match number of dimensions of variable,
(3) subscripts used, (2) subscripts
expectedfatal:["Execute.c":8567]:Execute: Error occurred at or near line 12
in file wind.ncl*
*Kunal Bali*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150521/34aceb89/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: wind.ncl
Type: application/octet-stream
Size: 1129 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150521/34aceb89/attachment.obj 


More information about the ncl-talk mailing list