Sie sind hier: Startseite / Services / Data Analysis and Visualization / Visualization / Software / NCL / examples / source_code / DKRZ NCL vector plot example
Info
Alle Inhalte des Nutzerportal sind nur auf Englisch verfügbar.

DKRZ NCL vector plot example

NCL script to plot vectors.

DKRZ NCL example script:

;---------------------------------------------------
;  DKRZ NCL Examples:   NCL_vector_default.ncl
;
;  30.10.14 kmf
;---------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"

begin
;-- 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)

end

Artikelaktionen