Re: grid lines and tick marks

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Fri Jan 24 2014 - 10:58:05 MST

Hi Brian,

Map tickmarks in NCL are not easy to customize, but it is possible.

The issue is that with some WRF map projections, both lat and lon grid lines may intersect with the X and Y axes, so how do you want this to be labeled?

You can do some customization of map tickmarks on *rectangular* map projections using an add_map_tickmarks function I wrote for the map tickmarks page:

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

See examples 9 and 10.

I've attached a sample of how this might work with a WRF map projection. The main code is called "wrf_map.ncl" and it loads "map_tickmarks.ncl".

Note that the WRF output file I used here has a lambert conformal projection, and the lat/lon lines cross both axes.

The key to this script is to set tmXBValues and tmYLValues to the lat/lon values you want on these axes. In the wrf_map.ncl script, I retrieved the map tickmark spacing to try to guess at the correct spacing for the new map tickmarks. You may need to change this if you don't like the values it uses.

--Mary

On Jan 24, 2014, at 5:56 AM, Brian McNoldy <bmcnoldy@rsmas.miami.edu> wrote:

> Hello,
> I am working on a map and am running into the same problem demonstrated in this example:
> http://www.mmm.ucar.edu/wrf/OnLineTutorial/Graphics/NCL/Examples/SPECIAL/olr.htm
>
> The grid lines are every 5 degrees, while the tick marks are every 2 degrees (or sometimes randomly every 5). When using the zoomin option, is there a way to set the tick mark spacing? It seems mpGridSpacingF works for the grid lines, but gsnMajorLatSpacing (etc) is not a valid resource.
>
> Thank you,
> Brian
> --
> Brian McNoldy
> Senior Research Associate
> ============================
> University of Miami
> Rosenstiel School of Marine & Atmospheric Science
> Phone: (305) 421-4272
> http://andrew.rsmas.miami.edu/bmcnoldy/
> _______________________________________________
> 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

wrf_map1.png wrf_map2.png
Received on Fri Jan 24 10:58:17 2014

This archive was generated by hypermail 2.1.8 : Fri Feb 07 2014 - 16:39:11 MST