[ncl-talk] possible bug gc_latlon function nan

Mary Haley haley at ucar.edu
Wed Sep 28 13:09:38 MDT 2016


Hi Andries,

Thanks for providing a concise description of the problem and a related
link.

I've created a ticket for this, NCL-2501. Hopefully we'll get a fix in for
6.4.0, but if not, then 6.4.1.

--Mary





On Tue, Sep 27, 2016 at 9:26 AM, Devries, Andries <a.devries at mpic.de> wrote:

> Dear NCL team,
>
> I just came across a possible bug in the gc_latlon function. Two points
> that are located very nearby can result in a "nan", see below. In a
> previous post a similar bug was reported (see link below) for two points
> with the exact same location. A solution was found for this issue, but
> possibly two points that are located very nearby each other may still
> suffer the same issue. Further I noticed that a slight change in any of the
> four coordinate values can result in a 0 value instead of a nan. A possible
> way to work around this could be using the "replace_ieeenan" function, but
> fixing the bug might be preferable.
>
> Looking forward to your response. Thanks!
> Cheers,
> Andries
> ------------------------------------------------------------
> --------------------------------------------------------------------------
>
>  Copyright (C) 1995-2015 - All Rights Reserved
>  University Corporation for Atmospheric Research
>  NCAR Command Language Version 6.3.0
>  The use of this software is governed by a License Agreement.
>  See http://www.ncl.ucar.edu/ for more details.
> ncl 0> print(gc_latlon(88.67137908935547,-179.9999847412109,88.
> 67137908935547,180,0,4))
>
>
> Variable: unnamed (return)
> Type: float
> Total Size: 4 bytes
>             1 values
> Number of Dimensions: 1
> Dimensions and sizes:    [1]
> Coordinates:
> Number Of Attributes: 4
>   units :    kilometers
>   gclon :    ( 180, 180 )
>   gclat :    ( 88.67138, 88.67138 )
>   spacing :    nan
> (0)    nan
>
> ------------------------------------------------------------
> --------------------------------------------------------------------------
> link to previously reported bug:
> https://www.ncl.ucar.edu/Support/talk_archives/2011/0317.html
> ------------------------------------------------------------
> --------------------------------------------------------------------------
>
>
> _______________________________________________
> 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/20160928/5e02c8ad/attachment.html 


More information about the ncl-talk mailing list