Dear Srikanth,
I think you may have encountered a bug in the tickmarks, but, since you are drawing a cylindrical equidistant map, I believe that instead of this:
> res@tmXBMode = "Manual"
> res@tmXBTickStartF = -10.0
> res@tmXBTickEndF = 38.0
> res@tmXBTickSpacingF = 1.0
>
> res@tmYLMode = "Manual"
> res@tmYLTickStartF = 30.0
> res@tmYLTickEndF = 46.0
> res@tmYLTickSpacingF = 1.0
you can try this (UNTESTED):
lat_values = ispan(-10,38,1)
lat_labels = "" + abs(lat_values)
lat_labels = where(lat_values.lt.0,lat_labels+"S",lat_labels)
lat_labels = where(lat_values.gt.0,lat_labels+"N",lat_labels)
lon_values = ispan(30,46,1)
lon_labels = "" + abs(lon_values)
lon_labels = where(lon_values.gt.0,lon_labels+"E",lon_labels)
lon_labels = where(lon_values.lt.0,lon_labels+"W",lon_labels)
res@tmXBMode = "Manual"
res@tmXBValues = lon_values
res@tmXBLabels = lon_labels
res@tmYLMode = "Explicit"
res@tmYLValues = lat_values
res@tmYLLabels = lat_labels
Of course, you can change the labels as you see fit.
For a full example, see mptick_8.ncl at:
http://www.ncl.ucar.edu/Applications/mptick.shtml
--Mary
On Nov 23, 2012, at 5:07 AM, Srikanth Yalavarthi wrote:
> I am very new to NCL and I am trying to plot a contour of Topography (topo) data. Following is a section of the code which i wrote for it.
>
>
> wks_type = "png"
> wks_type@wkWidth = 2400
> wks_type@wkHeight = 2400
> wks = gsn_open_wks("png","plot_etopo2")
> gsn_define_colormap(wks,"amwg256")
>
> res = True
> res@gsnFrame = True
> res@gsnMaximize = True
> res@gsnAddCyclic = False
> res@gsnSpreadColors = True
> res@gsnSpreadColorStart = -1
> res@gsnSpreadColorEnd = 2
>
> res@mpLimitMode = "LatLon"
> res@mpMinLatF = min(lat)
> res@mpMaxLatF = max(lat)
> res@mpMinLonF = min(lon)
> res@mpMaxLonF = max(lon)
> res@mpLandFillColor = "Gray"
> res@mpDataBaseVersion = "MediumRes"
>
> res@cnFillOn = True
> res@cnInfoLabelOn = False
> res@cnLinesOn = False
> res@cnLevelSelectionMode = "ManualLevels"
> res@cnMinLevelValF = -5400.0
> res@cnMaxLevelValF = 4000.0
> res@cnLevelSpacingF = 500.0
>
> res@tmXBMode = "Manual"
> res@tmXBTickStartF = -10.0
> res@tmXBTickEndF = 38.0
> res@tmXBTickSpacingF = 1.0
>
> res@tmYLMode = "Manual"
> res@tmYLTickStartF = 30.0
> res@tmYLTickEndF = 46.0
> res@tmYLTickSpacingF = 1.0
>
> res@tiMainString = "Model Bathymetry from ETOPO5"
> res@lbLabelStride = 4
> res@lbOrientation = "Vertical"
> res@lbBoxLinesOn = False
>
> plot = gsn_csm_contour_map(wks,topo,res)
>
> While trying to plot, I am repeatedly encountering with the following error
>
> warning:TickMarkSetValues: A tick mark spacing must be assigned for manual mode, defaulting bottom ticks to automatic
> warning:TickMarkSetValues: A tick mark spacing must be assigned for manual mode, defaulting top ticks to automatic
> warning:TickMarkSetValues: A tick mark spacing must be assigned for manual mode, defaulting left ticks to automatic
> warning:TickMarkSetValues: A tick mark spacing must be assigned for manual mode, defaulting right ticks to automatic
>
> Can any on help me in this regard
>
>
> Regards
>
> Srikanth
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Nov 26 09:53:49 2012
This archive was generated by hypermail 2.1.8 : Fri Dec 07 2012 - 13:30:06 MST