Re: Fwd: Streamline Plots - NCL

From: Alan Brammer <abrammer_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 18 2014 - 10:20:39 MST

quick guess, and I’m not familiar with WRF idealised simulations but this works with my real data cases. 

You just need to make the dimensions of u & v the same by unstaggering the variables. 

Hopefully below is clear. 

load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
begin
 f = addfile("wrfout_d01_0001-01-01_00:00:00"+".nc","r")

 uIn    = f->U(7,6,:,:)    ; read in example data [2D only here]
 vIn    = f->V(7,6,:,:)     ; These arrays are different sizes in X and Y. 

print( all(dimsizes(uIn).eq.dimsizes(vIn)) )   ; False

u = wrf_user_unstagger( uIn, uIn@stagger)
v= wrf_user_unstagger( vIn, vIn@stagger)

print( all(dimsizes(u).eq.dimsizes(v)) )   ; True

; =================================================;
; create plots
; =================================================;
  wks  = gsn_open_wks("pdf","stream-3")             ; open a ps plot

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

Alan

On February 18, 2014 at 11:23:54 AM, Lauren Wheeler (lauren.bronwyn.wheeler@gmail.com) wrote:

 plot = gsn_csm_streamline(wks,u,v,False)

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

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