Asciiread

From: Ivanna Mo <newivanna_at_nyahnyahspammersnyahnyah>
Date: Fri Aug 03 2012 - 03:26:47 MDT

Hi,
I want to read a data file (all numeric) with and non-uniform number of
column:

1 2 3
4 5
7 8 9
------------------------------------
and when I use asciiread:

f= asciiread("data",-1,"float")
print(f)

the output is:

Variable: f
Type: float
Total Size: 4 bytes
            1 values
Number of Dimensions: 1
Dimensions and sizes: [1]
Coordinates:
(0) 1
-----------------------------------------

a=asciiread("data",(/3,3/),"float")
print(a)

the output is:
Variable: a
Type: float
Total Size: 36 bytes
            9 values
Number of Dimensions: 2
Dimensions and sizes: [3] x [3]
Coordinates:
Number Of Attributes: 1
  _FillValue : -999
(0,0) 1
(0,1) -999
(0,2) -999
(1,0) -999
(1,1) -999
(1,2) -999
(2,0) -999
(2,1) -999
(2,2) -999
---------------------------------------------
But what I want is an array like this:
(0,0) 1
(0,1) 2
(0,2) 3
(1,0) 4
(1,1) 5
(1,2) -999
(2,0) 7
(2,1) 8
(2,2) 9

can anyone help?

Thank you very much!
Ivanna

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri Aug 3 03:27:00 2012

This archive was generated by hypermail 2.1.8 : Fri Aug 03 2012 - 14:39:58 MDT