DKRZ NCL vector plot example#

DKRZ NCL example script:

;---------------------------------------------------
;  DKRZ NCL Examples:   NCL_vector_default.ncl
;
;  30.10.14 kmf
;---------------------------------------------------
;-- define file name
  diri = "./"
  fili = "rectilinear_grid_2D.nc"

;-- open file and read variables
  f    =  addfile(diri+fili, "r")
  u    =  f->u10(0,:,:)              ;-- first time step
  v    =  f->v10(0,:,:)              ;-- first time step

;-- define the workstation (graphic will be written to a file)
  wks =  gsn_open_wks("png","plot_vector_default")

;-- draw the vectors
  plot = gsn_csm_vector_map_ce(wks,u,v,False)

Result:

../../../../../../_images/plot_vector_default_w400.png