Re: ARSCAM/ARPRAM - ALGORITHM FAILURE

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Thu, 17 May 2007 17:59:35 -0600 (MDT)

Hi Saji,

Unfortunately, there's no "easy" explanation of this infamous error
message. As you discovered, and as we've found from past cases,
tweaking certain things like the size of the plot, the contour levels,
or the number of contours might help you get rid this error message.
We are planning to overhaul some code which we hope will get rid of
this problem, or at least decrease its frequency.

I consulted with Dave Kennison for a detailed answer, and he gave me
the description below (which I modified to include some NCL info).
I've added this to our new "tips and quirks" page:

   http://www.ncl.ucar.edu/qtips.shtml

Meanwhile, you can help us debug the problem by setting an additional
resource along with your other contour resources:

   res_at_cnDumpAreaMap = True

When you run your script, it should echo a message like:

    Dumping areamap to file NhlAreaMap.0

Please send the "NhlAreaMap.0" file to me and we'll take a look. We
may also contact you to ask for more information.

Detailed description
--------------------

     There's a low-level package called AREAS that accepts as input
     groups of boundary lines in a plane (for example, contour lines
     generated by CONPACK/CONPACKT or geopolitical boundaries generated
     by EZMAP), puts them in a structure called an "area map", and then
     processes that structure to determine the collection of areas
     formed by the superimposed groups of lines. One of the routines of
     AREAS, called ARPRAM, performs a multi-step process to prepare the
     area map for use during subsequent calls to other routines of
     AREAS. The algorithm used by ARPRAM is inherently geometric in nature
     and would be exact if carried out using infinite-precision real
     arithmetic; unfortunately, it is not exact when carried out using
     the available limited-precision arithmetic. Practically speaking,
     what this means is that one of the steps leaves the area map in a
     state such that, when the next step is attempted, something
     unexpected happens, something that should not be possible,
     something that prevents that step, and subsequent steps, from
     being completed correctly and makes it unsafe to allow other AREAS
     routines to be called (because they might loop forever or produce
     completely incorrect results). At the moment, we understand what
     happens well enough to detect when it happens, to produce an error
     message (the infamous "ALGORITHM FAILURE"), and to quit trying to
     process the area map, but not well enough to fix whatever has gone
     wrong.

     We have plans to look into this situation. Initially, we need to
     build tools allowing us to see exactly what it is that goes wrong
     in the area map to cause a failure. The resulting insight may
     allow us to either amend the algorithms to entirely avoid failures
     or to take remedial action allowing all the steps of the algorithm
     to complete (perhaps at the expense of a small glitch in the
     resulting output).

--Mary

On Thu, 17 May 2007, Saji Njarackalazhikam Hameed wrote:

> Dear All,
>
> I get the following error when creating a Latitude Longitude plot of
> precipitation with gsn_csm_contour_map
>
> fatal:ContourPlotDraw: ARSCAM/ARPRAM - ALGORITHM FAILURE
> fatal:ContourPlotDraw: draw error
>
> Please help to interpret this error message. We examined the data
> separately using other browsing software and using ncdump but cannot
> find any obvious problems.
>
> One interesting observation is that if we add a small value to the
> variable to be plotted, say variable=variable+0.01, the plot comes
> out fine.
>
> Any tips would be appreciated. (running NCL version 4.3.0)
>
> saji
>
> --
> Saji N. Hameed
>
> APEC Climate Center +82 51 668 7470
> National Pension Corporation Busan Building 12F
> Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 saji_at_apcc21.net
> KOREA
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 17 2007 - 17:59:35 MDT

This archive was generated by hypermail 2.2.0 : Fri May 18 2007 - 09:11:09 MDT