[ncl-talk] problem labelling longitudes with increment <1deg

Mary Haley haley at ucar.edu
Mon Jul 18 15:31:16 MDT 2016


Hi David,

Thanks for providing a script and data file.

The problem is that we have an internal function called "add_map_tickmarks"
and this one is conflicting with that one.

I suggest renaming the one in the tst1.ncl script to something else, like
"add_map_tickmarks2".  I have updated the mptick_9.ncl example to have a
different name for this function.

However, since you are dealing with a simple lat/lon projection, you don't
need your own copy of this routine. You should simply be able to set
tmXBValues/Labels and tmYLValues/Labels to the desired values.

See the attached modified script. I was unable to run the original script
because of some coding errors, so I had to fix these. For example, it had
the contour level spacing set to 0.0, which is invalid.

I didn't attempt to convert the degrees to minutes, so I just left them as
fractional values on the X and Y axis.

--Mary


On Mon, Jul 18, 2016 at 2:51 PM, Vollaro, David <dvollaro at albany.edu> wrote:

> Hi,
>
>
> I am trying to plot a contour map for a small area and am trying to get
> the Longitude labels to plot every tenth deg.  Setting
> res at gsnMajorLonSpacing    <1 results in an error.  Looking into the talk
> archives, I noticed a workaround using add_map_tickmarks.  This seems to
> work for the test version when I change the map area and lon labels to what
> I want.  However, when I try to incorperate it into a program that uses
> contour mapping(ie  gsn_csm_contour_map) I get the following errors,
> before it even reaches the add_map_tickmarks function:
>
>
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 5930 in
> file /man2/ncl63/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 7107 in
> file /man2/ncl63/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 10599 in
> file /man2/ncl63/lib/ncarg/nclscripts/csm/gsn_csm.ncl
>
> fatal:["Execute.c":8575]:Execute: Error occurred at or near line 343 in
> file tst1.ncl
>
> I am running ncl6.3.0 and am attaching the script.  Thanks for your help.
>
> Dave Vollaro
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160718/80a7e99a/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tst1_mod.ncl
Type: application/octet-stream
Size: 3949 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20160718/80a7e99a/attachment.obj 


More information about the ncl-talk mailing list