Rotating a vector plot

From: rK Aditya <aditya.rk_at_nyahnyahspammersnyahnyah>
Date: Thu Dec 19 2013 - 12:30:26 MST

Dear all,

I am able to rotate a contour plot according to the following example:

http://www.ncl.ucar.edu/Applications/Scripts/rotatedltln_1.ncl

But I am looking a way to rotate a vector plot. I used all the graphic
interfaces for streamlines and vector ("gsm_csm_* ). But they are failed to
have a similar capability as "gsm_csm_contour_map" does. It seems difficult
to rotate a vector then scalar plot, I think.

If you don't mind to direct me to any "resources" or "graphic interfaces"
that possibly to rotate a vector, I am very grateful.

Thank you for your help.

Kindest regards,
-r/K-

res = True
  res@gsnMaximize = True ; maxmize plot in frame

  res@cnFillOn = True ; turn on color
  res@cnLinesOn = False ; no contour lines
  res@cnLineLabelsOn = False ; no contour labels

  res@gsnSpreadColors = True ; use full color map
  res@gsnSpreadColorEnd = -3 ; don't use added gray

;---Turn on tickmarks. 'conditional' prevents more than one tickmark object.
  res@pmTickMarkDisplayMode = "conditional"

  res@gsnAddCyclic = False
  res@gsnRightString = ""

;
; Since the Y-Axis of these data goes from north to south, the Y-Axis
; needs to be reversed to plot it correctly in a "native" projection.
;
; res@trYReverse = False

;
; To draw these contours on another map projection, the
; 2D (unrotated) lat/lon coordinates are required.
;
   res@tfDoNDCOverlay = False ; transform to standard lat/lon

  res@sfXArray = lon
  res@sfYArray = lat

;---Zoom in on map
  res@mpLimitMode = "Corners"
  res@mpLeftCornerLatF = 10 ;lat(nlat-1,0) - 10
  res@mpLeftCornerLonF = 32 ;lon(0,0) -10
  res@mpRightCornerLatF = 30 ;lat(0,nlon-1) + 5
  res@mpRightCornerLonF = 47.5 ; lon(nlat-1,nlon-1) + 10

;---Regular lat/lon plot when center lat is 0

  res@cnFillDrawOrder = "Predraw" ; draw contours first
  res@tiMainString = "velocity (m/s)"
  res@mpDataBaseVersion = "MediumRes" ; use GMT coastline

; plot = gsn_csm_contour_map(wks,velu(1,:,:),res)

; plot=gsn_csm_vector_scalar_map_ce(wks,velu(1,:,:),velv(1,:,:),\
; tracer(1,:,:),res)

  plot=gsn_streamline(wks,velu(1,:,:),velv(1,:,:),res) ; create plot
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Dec 19 12:30:38 2013

This archive was generated by hypermail 2.1.8 : Mon Jan 06 2014 - 13:02:23 MST