give tick marks on a longitude-time plot

From: Yi-Chih Huang <dscpln_at_nyahnyahspammersnyahnyah>
Date: Fri Nov 01 2013 - 17:18:50 MDT

Hello,

    I am working on a longitude-time plot. The values of time are from
66505 to 67204. So I want to give 1-48 (months) instead on y-axis. I have
read and tried the examples on NCL web site. However, the y axis is still
blank. Could you tell me what is wrong with the syntaxs below?

    Thanks much,

            Yi-Chih

####
load "$SysE/lib/ncl/helper_libs.ncl"

begin
  in= addfile("/fs3/yhuang/precip.mon.mean.nc","r") ; 197901-201306
  precip= in->precip

  precs= precip(time|:,{lat|5:-5},{lon|120:240}) ; Indian Ocean
  prect= precs(37:60,:,:) ; 1982-1983
  pcp= dim_avg_n_Wrap( prect,1 )
printVarSummary(pcp)

  wks= gsn_open_wks("X11","pcpTime")
  gsn_define_colormap(wks,"BlueRed")

  res = True
  res@gsnAddCyclic = False
  res@cnFillOn = True
  res@gsnSpreadColors = True
  res@gsnSpreadColorStart = 10
  res@gsnSpreadColorEnd = 250
  res@cnSpanFillPalette = True
  res@cnLinesOn = False
  res@gsnDraw = True
  res@tmYLLabelsOn = True
  yr = ispan(1,48,1)
  yl= tostring(yr)
  res@tmYLMode = "Explicit"
  res@tmYLValues = yr
  res@tmYLMinorValues = yr
  res@tmYLLabels = "" + res@tmYLValues

  res@lbLabelBarOn = True
  res@pmLabelBarWidthF= 0.6

  plot = gsn_csm_hov(wks, pcp, res)
end

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Nov 1 17:19:00 2013

This archive was generated by hypermail 2.1.8 : Mon Nov 11 2013 - 09:45:34 MST