<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear NCL team,<br>
<br>
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.<br>
<br>
Looking forward to your response. Thanks!<br>
Cheers,<br>
Andries<br>
--------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
Copyright (C) 1995-2015 - All Rights Reserved<br>
University Corporation for Atmospheric Research<br>
NCAR Command Language Version 6.3.0<br>
The use of this software is governed by a License Agreement.<br>
See http://www.ncl.ucar.edu/ for more details.<br>
ncl 0> print(gc_latlon(88.67137908935547,-179.9999847412109,88.67137908935547,180,0,4))<br>
<br>
<br>
Variable: unnamed (return)<br>
Type: float<br>
Total Size: 4 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 4<br>
units : kilometers<br>
gclon : ( 180, 180 )<br>
gclat : ( 88.67138, 88.67138 )<br>
spacing : nan<br>
(0) nan<br>
<br>
--------------------------------------------------------------------------------------------------------------------------------------<br>
link to previously reported bug:<br>
<a href="https://www.ncl.ucar.edu/Support/talk_archives/2011/0317.html" target="_blank">https://www.ncl.ucar.edu/Support/talk_archives/2011/0317.html</a><br>
--------------------------------------------------------------------------------------------------------------------------------------<br>
<br>
</div>
</body>
</html>