Re: Explicitly label map coordinates

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue Feb 26 2013 - 08:40:01 MST

Hi Nikola,

Map tickmarks are not easy to customize in NCL, unless you have a cylindrical equidistant map.

Since you have a Lambert Conformal Projection, see the first frame of example "mptick_9.ncl" at:

    http://www.ncl.ucar.edu/Applications/mptick.shtml

This example has an "add_map_tickmarks" function that allows you to customize your axes for a rectangular map projection.

Since you are using wrf_map_overlays, which removes the overlaid plots after it is done, you will have to "trick" it into not doing this by setting the special "PanelPlot" resource to True.

For example:

      pltres = True
      pltres@PanelPlot = True
      mpres = True
      map = wrf_map_overlays(a,wks,(/contour_tc,contour_psl,vector/),pltres,mpres)

Now, you can take this "map" id and pass it to "add_map_tickmarks" to apply the tmXBValues and tmXBLabels that you want:

     mpres@tmXBValues = …your array of tickmark values...
     mpres@tmXBLabels =…your array of tickmark labels…
     mpres@tmXBLabelFontHeightF = 0.015 ; if desired

     map = add_map_tickmarks(wks,map,mpres)
     draw(map)
     frame(wks)

If you are successful with this, then it would make a great example for this page, since we don't have any that show how to do this with WRF data and/or labels of "km".

Let me know if you can contribute it, and I'll write up the explanation. I will need the full script (cleaned up if possible) and a PS file.

Thanks,

--Mary

On Feb 25, 2013, at 6:44 PM, Nikola Marjanovic wrote:

>
> I can't seem to explicitly label the X and Y axes of my figure created using wrf_map_overlays. The figure is created with latitude and longitude labels. I would like to change these to distance labels (km). However when I try to use setvalues to change tmXBValues and tmXBLabels, they are not considered valid resources. Which resources hold the latitude and longitude values I would like to change? My map projection is Lambert Conformal.
>
> Any help would be appreciated.
>
> Thanks,
> Nikola
> _______________________________________________
> 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 Tue Feb 26 08:40:11 2013

This archive was generated by hypermail 2.1.8 : Thu Feb 28 2013 - 14:47:31 MST