tickmark labels

From: Kate Young <kbeierle_at_nyahnyahspammersnyahnyah>
Date: Mon, 23 Jan 2006 11:16:14 -0700

Hello,
I have created a vertical velocity contour plot with longitude vs
pressure, but the tickmarks on the x-axis are labeled 0-3. I would like
to changes these to the cooresponding longitude values, how do I do this?

Thanks!
Kate

;================================================;
; conwomap_2.ncl
;================================================;
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
; ================================================;
begin
;=================================================;
; open file and read in data
;=================================================;
  dir = "/scr/sci2/kbeierle/NARR_model_ncdc/040326/allLevels_subset/"
  f = addfile(dir+"narr-a_221_20040326_0000_000.grb","r")

  ;u = f->u(4,:,:)
  pvv = f->V_VEL_GDS3_ISBL ;;pressure vertical velocity
  pvv = -pvv * 10
  temp = f->TMP_GDS3_ISBL ;temperature
  pres = f->lv_ISBL3 ;isobaric levels

  alat1 = f->g3_lat_0
  alon1 = f->g3_lon_1
  lat2d = f->g3_lat_0
  lon2d = f->g3_lon_1

print(lat2d)
;print(lon2d)

  pvv_at_lat2d = alat1
  pvv_at_lon2d = alon1

;print(pvv)

;=================================================;
; PLOT 2
;=================================================;
  wks = gsn_open_wks("ps","conwomap") ; open a ncgm file
  gsn_define_colormap(wks,"gui_default") ; choose a colormap

  res = True ; plot mods desired
  res@gsnMaximize = True
  res@tiMainString = "NARR 03/26/2004 00Z ~" + lat2d(0,0) + " lat"
  res@gsnAddCyclic = False ; regional data

  res@cnFillOn = True ; turn on color
  res@gsnSpreadColors = True ; use full range of colormap
 
  res@vpWidthF = 0.5 ; change aspect ratio of plot
  res@vpHeightF = 0.3

  res@pmTickMarkDisplayMode = "Always" ; Switch to different tickmarks

  res@cnFillOn = True ; color plot desired
  res@cnLinesOn = True ; turn off cn lines

  res@lbOrientation ="Vertical"
  res@trYReverse = True

  plot = gsn_csm_contour(wks,pvv(:,0,:),res) ; contour the variable

  end

_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 23 2006 - 11:16:14 MST

This archive was generated by hypermail 2.2.0 : Tue Jan 24 2006 - 09:41:27 MST