Re: pmTickMarkDisplayMode not display lat/lon tickmarks

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Mon Sep 10 2012 - 10:32:57 MDT

Hi Agnes,
No, I do not believe there is. As Mary has remarked in previous ncl-talk
replies, the way NCL does a masked Lambert Conformal projection is a bit
kludgy, as the entire hemisphere is drawn and then the unwanted areas
are masked out. It is also not as easy to manipulate the lat/lon labels
and tickmarks on a masked Lambert Conformal plot as it is on other
projection types.

Example #4 on the Lambert Conformal page includes a procedure
(add_lc_labels) that you can use to draw the labels (but not the
tickmarks).
http://www.ncl.ucar.edu/Applications/lcmask.shtml#ex4
add_lc_labels could be modified to draw tickmarks, as it is already
calculating the positions near where you would want the tick marks. I
will add this as an example that has been requested, but I unfortunately
do not have to time to modify add_lc_labels myself. Adam

On 09/07/2012 04:49 PM, Agnes Lim wrote:
> Hi,
>
> I have set pmTickMarkDisplayMode to True so that my plots has tickmarks
> of latitude and longitude being displayed.
> This does not work when I set gsnMaskLambertConformal to True.
>
> Is there a way to get the tickmarks to come out other than to use
> annotation to actually add them in?
>
> Thanks
>
> Agnes
>
> My code segment for plotting looks like this
> res = True
> res@gsnFrame = False ; So we can draw markers
> res@gsnMaximize = True
> res@gsnSpreadColors = True
> res@trGridType = "TriangularMesh" ; The
> default if you have 1D data
> res@cnLevelSelectionMode = "ExplicitLevels"
> res@cnLevels = (/1,2,3,4,10,20,30/)
> res@cnFillOn = True
> res@cnLinesOn = False
> res@cnLineLabelsOn = True
> res@lbBoxLinesOn = False
> res@tiMainString = "Rain Gauge 21 July 2012 (01Z)"
> res@sfXArray = lon
> res@sfYArray = lat
> res@mpProjection = "LambertConformal"
> res@mpFillOn = False ; turn off
> map fill
> res@mpLambertParallel1F = 20
> res@mpLambertParallel2F = 40
> res@mpLambertMeridianF = 110
> res@mpMinLatF = 18 ; min lat to mask
> res@mpMaxLatF = 55 ; max lat to
> mask
> res@mpMinLonF = 75 ; min lon to mask
> res@mpMaxLonF = 140 ; max lon to mask
> res@gsnMaskLambertConformal = True
> res@mpOutlineDrawOrder = "PostDraw"
> res@mpFillDrawOrder = "PreDraw"
> res@mpOutlineBoundarySets = "AllBoundaries"
> res@mpDataBaseVersion = "mediumres" ;
> select database
> res@mpDataSetName = "Earth..1"
> res@tmXTOn = True ; Turn off
> top tickmarks and labels
> res@tmYROn = True ; Turn off left
> tickmarks and labels
> res@lbBoxLinesOn = True
> res@pmTickMarkDisplayMode = "Always"
>
> map = gsn_csm_contour_map(wks,precip,res)
>
> x_lat=20.0
> x_lon=120.0
>
> mkres = True
> mkres@gsMarkerIndex = 18 ; Filled circle
> mkres@gsMarkerSizeF = 0.03
> mkres@gsMarkerColor = "red"
>
> gsn_polymarker(wks,map,x_lon,x_lat,mkres)
>
> frame(wks) ; Now advance the frame.
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 10 10:33:06 2012

This archive was generated by hypermail 2.1.8 : Tue Sep 11 2012 - 15:30:41 MDT