Fwd: Streamline Plots - NCL

From: Lauren Wheeler <lauren.bronwyn.wheeler_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 18 2014 - 09:23:46 MST

I am struggling to find an example of how to use the VectorPlot resources
in my NCL script.
I haven't found anything in the example scripts and I'm lost as to how I
implement these.

I want to plot streamlines for WRF output. The domain is an idealized 3D
simulation so it doesn't fit onto any of the map overlays.
Using the example script I modified the file name and the time and pressure
level that I wanted these streamlines from (see below).

;----------------------------------------------------------------------
; stream_5.ncl
;
; Concepts illustrated:
; - Drawing a black-and-white streamline plot
;----------------------------------------------------------------------
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
  f = addfile("wrfout_d01_0001-01-01_00:00:00"+".nc","r")
  u = f->U(7,6,:,:) ; read in example data [2D only here]
  v = f->V(7,6,:,:)
; =================================================;
; create plots
; =================================================;
  wks = gsn_open_wks("pdf","stream-3") ; open a ps plot

  plot = gsn_csm_streamline(wks,u,v,False)
end
;----------------------------------------------------------------------

I receive the following errors when I submit the above script.

fatal:VectorFieldInitialize: dimensions of vfUDataArray and vfVDataArray
are inconsistent
fatal:Unable to initialize layer-Can't Create
fatal:Unable to access object with id:-4
fatal:Unable to access object with id:-4
warning:Unable to add DataItem "(null)" to DataList "stVectorFieldData"
fatal:CompileDataList:DataList has no valid members

Could you possibly guide me or send me an example that would help me define
the DataArrays that NCL requires to build this plot?

Thanks,
Lauren Wheeler

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Feb 18 09:23:58 2014

This archive was generated by hypermail 2.1.8 : Wed Feb 19 2014 - 15:58:35 MST