gsn_csm_vector overlay on gsn_csm_contour_map

From: Xin Xi <xxi_at_nyahnyahspammersnyahnyah>
Date: Tue Jun 24 2014 - 10:48:10 MDT

Hi I want to overlay a wind data onto a terrain map. There is a mismatch
between them (see attached). Can you point out what I did wrong? Thanks!
Here are the res:

  mpres = True
  mpres@gsnMaximize = True
  mpres@gsnDraw = False
  mpres@gsnFrame = False

  mpres@mpGeophysicalLineColor = "Black"
  mpres@mpGridLineColor = "Black"
  mpres@mpLimbLineColor = "Black"
  mpres@mpNationalLineColor = "Black"
  mpres@mpPerimLineColor = "Black"
  mpres@mpUSStateLineColor = "Black"
  mpres@mpOutlineOn = True
  mpres@mpDataBaseVersion = "MediumRes"
  mpres@mpOutlineBoundarySets = "AllBoundaries"
  mpres@mpNationalLineThicknessF = 1.0
  mpres@mpGeophysicalLineThicknessF = 1.0

  ;mpres@mpProjection = "Mercator"

  WRF_map_c(wrf_file[0],mpres,0)

    mpres@mpLimitMode = "Corners"
    mpres@mpLeftCornerLatF = lat2d(0,0)
    mpres@mpLeftCornerLonF = lon2d(0,0)
    mpres@mpRightCornerLatF = lat2d(nlat-1,nlon-1)
    mpres@mpRightCornerLonF = lon2d(nlat-1,nlon-1)

  mpres@tfDoNDCOverlay = True
  mpres@gsnAddCyclic = False

  mpres@cnFillOn = True
  mpres@cnLinesOn = False
  mpres@cnLevelSelectionMode = "ExplicitLevels"
  mpres@cnLevels = fspan(0,3000,31) ; Set the levels

  mpres@lbLabelBarOn = True
  mpres@pmLabelBarWidthF = 0.6
  mpres@pmLabelBarHeightF = 0.04
  mpres@pmLabelBarOrthogonalPosF = 0.1
  mpres@lbLabelFontHeightF = 0.008
  mpres@lbTitleOn = "True"
  mpres@lbTitleString ="Terrain (m)"
  mpres@lbTitleFontHeightF = 0.015

  mp_plt = gsn_csm_contour_map(wks,hgt,mpres)
  draw(mp_plt)

  cn1res = True
  cn1res@gsnAddCyclic = False ; regional data
  cn1res@vcRefMagnitudeF = 5.0 ; define vector ref mag
  cn1res@vcRefLengthF = 0.05 ; define length of vec
ref
  cn1res@vcGlyphStyle = "CurlyVector" ; turn on curly vectors
  cn1res@vcMinDistanceF = 0.03 ; thin vectors
  cn1res@vcRefAnnoOrthogonalPosF = -.1 ; move ref vector down
  cn1res@vcRefAnnoParallelPosF = 0.9

  cn1_plt = gsn_csm_vector(wks,u10,v10,cn1res)

  overlay(mp_plt,cn1_plt)

 frame(wks)

Received on Tue Jun 24 04:48:22 2014

This archive was generated by hypermail 2.1.8 : Wed Jul 23 2014 - 15:33:46 MDT