Help:Is there a bug in function "readAsciiTable" or I use this function wrong?

From: lxf <heaven_bird334_at_nyahnyahspammersnyahnyah>
Date: Sun Apr 25 2010 - 12:37:36 MDT

Dear all,
       I'm not sure if there is a bug in function "readAsciiTable" or I use this function wrong.

       When using "readAsciiTable" like this:

                data = readAsciiTable("t.txt", ncol, "float", (/0,1/))

       The returned "data" seems not ignore the last line (row) at the end of the file of "t.txt".
       While using it like "data = readAsciiTable("t.txt", ncol, "float", (/1,1/)) " or "data = readAsciiTable("t.txt", ncol, "float", 1 " will be all right (on the conditions of that the "t.txt" should also be changed right) .
       Any help or suggestion is appriciated!
                    
The following is my script details:
       

lxf@sun04:/home/lxf[1861]ncl -x t.ncl
 Copyright (C) 1995-2010 - All Rights Reserved
 University Corporation for Atmospheric Research
 NCAR Command Language Version 5.2.0
 The use of this software is governed by a License Agreement.
 See http://www.ncl.ucar.edu/ for more details.
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
+
Loading file "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
+
+ begin
+ ncol = 13
+ data = readAsciiTable("t.txt", ncol, "float", (/0,1/))
+ printVarSummary(data)
+ print(data(:,0)+" "+data(:,1)+" "+data(:,2)+" "+data(:,3))
+ end
warning:asciiread: End of file reached and only (26) elements were read from the file, filling remaining elements with the default missing value for the requested type

Variable: data
Type: float
Total Size: 156 bytes
            39 values
Number of Dimensions: 2
Dimensions and sizes: [3] x [13]
Coordinates:
Number Of Attributes: 1
  _FillValue : -999
(0) 1951 5.3 5.1 7
(1) 1952 6.7 7.1 8.3
(2) -999 -999 -999 -999
lxf@sun04:/home/lxf[1862]cat t.txt
1951 5.3 5.1 7.0 9.4 11.9 11.2 13.3 13.2 12.5 11.4 9.5 8.9
1952 6.7 7.1 8.3 10.3 10.3 12.5 13.0 12.6 12.1 9.9 7.7 8.4
YEAR JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
lxf@sun04:/home/lxf[1863]

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sun Apr 25 12:37:47 2010

This archive was generated by hypermail 2.1.8 : Thu Apr 29 2010 - 08:05:27 MDT