Re: Base map problem (actually NaN's)

From: Dave Allured <dave.allured_at_nyahnyahspammersnyahnyah>
Date: Sun, 27 Nov 2005 17:31:13 -0700


You are completely right. There were two NaN's (Not A Number) in the
input file. When I corrected them, this problem disappeared. Thank you
very much.

In my case, NaN's in an input file always means an undiscovered problem
in another program. I think I will check for NaN's as a matter of
course from now on:

   if (any (isnan_ieee (pgrid))) then
      print ("*** Abort, input contains NaN's")
   end if


Saji N. Hameed wrote:

> hmmm,
> what if it is an error in your input data? I tried plotting your data
> in Ferret and got the same features that you described. Upon further
> examination, it seems there are some NaN's in the input data file. For
> example, extracting the data around 27 N using NCO (NetCDF Operators):
> %..............................
> ncks -v corr -d lat,27.0,27.0 -d lon,0,20 -H
> %...........................
> shows that
> lon=-111 has a NaN
> Hence it is likely a problem with the data than with the NCL plotting
> procedures.
> saji
> .................
> OUTPUT OF NCO command
> ncks -v corr -d lat,27.0,27.0 -d lon,0,20 -H
> lat[27]=27 lon[0]=-130 corr[2457]=-99
> lat[27]=27 lon[1]=-129 corr[2458]=-99
> lat[27]=27 lon[2]=-128 corr[2459]=-99
> lat[27]=27 lon[3]=-127 corr[2460]=-99
> lat[27]=27 lon[4]=-126 corr[2461]=-99
> lat[27]=27 lon[5]=-125 corr[2462]=-99
> lat[27]=27 lon[6]=-124 corr[2463]=-99
> lat[27]=27 lon[7]=-123 corr[2464]=-99
> lat[27]=27 lon[8]=-122 corr[2465]=-99
> lat[27]=27 lon[9]=-121 corr[2466]=-99
> lat[27]=27 lon[10]=-120 corr[2467]=-99
> lat[27]=27 lon[11]=-119 corr[2468]=-99
> lat[27]=27 lon[12]=-118 corr[2469]=-99
> lat[27]=27 lon[13]=-117 corr[2470]=-99
> lat[27]=27 lon[14]=-116 corr[2471]=-99
> lat[27]=27 lon[15]=-115 corr[2472]=-0.335749
> lat[27]=27 lon[16]=-114 corr[2473]=-0.323078
> lat[27]=27 lon[17]=-113 corr[2474]=-0.363189
> lat[27]=27 lon[18]=-112 corr[2475]=-0.367441
> lat[27]=27 lon[19]=-111 corr[2476]=nan
> lat[27]=27 lon[20]=-110 corr[2477]=-0.203034
> Saji N. Hameed
> Assistant Researcher
> International Pacific Research Center,
> 2525 Correa Road, Honolulu, HI 96822
> On Fri, 25 Nov 2005, Dave Allured wrote:
>> To NCL support team, mainly:
>> I am trying to make a fairly simple contour plot over North America.
>> The input data is a single 2D floating point array, 91 x 61. There
>> are lots of missing values, all ocean and some land.
>> The output plot contains many lines radiating off page from the Baja
>> vicinity. When I try to turn on color fill, NCL freezes in
>> gsn_csm_contour_map_ce. With certain other resource settings which I
>> have not included, NCL seg faults instead of freezing. Sweet!
>> The problems occur with both X11 and postscript output, also on two
>> different platforms, Sun Solaris 8 and MAC OS.
>> Debug information and the simplified script are attached below. The
>> input and output files are here:
>> For your immediate viewing pleasure, here is a GIF made from the
>> postscript output file. In my browser this does not show many of the
>> strange lines, but you might get the idea:
>> This seems like a bug in the NCL base map routines, but I'm not
>> sure. Do you see anything wrong in my script?
>> --Dave A.
>> Boulder, Colorado

ncl-talk mailing list
Received on Sun Nov 27 2005 - 17:31:13 MST

This archive was generated by hypermail 2.2.0 : Mon Nov 28 2005 - 08:00:19 MST