Re: possible bug in gsn_polygon

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 30 Apr 2009 15:37:39 -0600 (MDT)

Michael,

One more thing: I think also the issue is that you are trying to draw
a filled area that is *very* small relative to the area you are
plotting on.

If you zoom in on the map, for example, with:

   res_at_mpLimitMode = "LatLon"
   res_at_mpMinLatF = 50
   res_at_mpMaxLatF = 80
   res_at_mpMinLonF = -20
   res_at_mpMaxLonF = 20

then your original values for cx and cy will work.

I imagine, however, that you want to plot several of these little
triangles, correct? If so, you will probably have to decrease the
resolution of cx/cy.

I'll still run this by the developers.

--Mary

On Thu, 30 Apr 2009, Michael Duda wrote:

> Hi, Folks,
>
> I'm using NCL 5.1.0 on NCAR's bluefire (although the problem appears on other
> machines, too), and I'm running into a error when using gsn_polygon(...) to add
> a polygon to a map. The error message I see is:
>
> Copyright (C) 1995-2009 - All Rights Reserved
> University Corporation for Atmospheric Research
> NCAR Command Language Version 5.1.0
> The use of this software is governed by a License Agreement.
> See http://www.ncl.ucar.edu/ for more details.
> fatal:MapDataPolygon: ARPRAM - ALGORITHM FAILURE
>
> However, if I just changing the center lat or lon of the map (mpCenterLatF or
> mpCenterLonF) by even one degree, the problem disappears and the polygon appears
> on the plot as expected. Appended below is the script I'm using. Could anyone,
> especially an NCL developer, comment on whether this is a bug? Any other
> suggestions on a workaround would also be great.
>
> Best regards,
> Michael
>
> --------------------------------------------------------
>
>
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
>
> begin
>
> wks = gsn_open_wks("pdf","triangle")
> gsn_define_colormap(wks,"gui_default")
>
> res = True
> res_at_gsnMaximize = True
>
> res_at_mpProjection = "Satellite"
> res_at_mpDataBaseVersion = "MediumRes"
> res_at_mpCenterLatF = 45.0
> res_at_mpCenterLonF = 0.0
> res_at_gsnFrame = False
>
> map = gsn_csm_map(wks, res)
>
> lres = False
>
> cx = new((/4/), float)
> cy = new((/4/), float)
>
> cx(0) = -2.356872735192781
> cx(1) = -4.627934296211549
> cx(2) = -2.270649143374328
> cx(3) = -2.356872735192781
>
> cy(0) = 65.91331700014982
> cy(1) = 65.43284608178955
> cy(2) = 64.91495523013631
> cy(3) = 65.91331700014982
>
> lres = True
> lres_at_gsFillColor = 2
> gsn_polygon(wks, map, cx, cy, lres)
>
> frame(wks)
> end
>
> _______________________________________________
> 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 Thu Apr 30 2009 - 15:37:39 MDT

This archive was generated by hypermail 2.2.0 : Thu Apr 30 2009 - 15:56:01 MDT