Re: How to plot scatter vectors?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Tue, 31 Oct 2006 11:00:56 -0700 (MST)

>
>Any one could tell me how to plot scatter vectors of observation data?
>Knowing the station's latitude, longitude, wind speed and direction.
>_______________________________________________

Well, if meteorological wind barbs will do, the
following may be used:

http://www.ncl.ucar.edu/Document/Functions/Built-in/wmbarbmap.shtml

If you have wind speed (wspd[*]) and direction (wdir[*]):

  rad = 4.*atan(1.)/180.
  
  u = -wspd*sin(rad*dir) ; array syntax
  v = -wspd*cos(rad*dir)

---
load "$NCARG_ROOT/lib/ncarg/nclex/gsun/gsn_code.ncl"
  wks = gsn_open_wks("x11","test")
  mpres              = True
  mpres_at_gsnFrame     = False
  mpres_at_mpLimitMode  = "LatLon"
  mpres_at_mpMinLonF    = -40.
  mpres_at_mpMaxLonF    =  20.
  mpres_at_mpMinLatF    =  55.
  mpres_at_mpMaxLatF    =  85.
  mpres_at_mpCenterLatF =  70.
  mpres_at_mpCenterLonF = -10.
  map = gsn_map(wks,"CylindricalEquidistant",mpres)
 ;wmsetp("col", 2)    ; Draw in red.
 ;wmsetp("wbs", .06)  ; Increase the size of the barb.
  wmbarbmap(wks, lat, lon,  u, v)  ; Plot barbs.
  frame(wks)          ; Advance the frame.
----
good luck
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Oct 31 2006 - 11:00:56 MST

This archive was generated by hypermail 2.2.0 : Wed Nov 01 2006 - 11:37:05 MST