[ncl-talk] asciiread
Adam Phillips
asphilli at ucar.edu
Thu Aug 20 14:33:24 MDT 2015
Hi Ed,
First of all, version 6.0.0 is over 5 years old so we highly recommend you
upgrade to the newest version (6.3.0). This is likely not the cause of the
issue though.
As far as I know asciiread does not have a limit on the size of the file or
on the dimensions of the data array.
Does your ascii file contain anything other than float values? Also, what
happens if you read in the data with a (/-1/) as opposed to (/mn,ml/), do
you get all the data?
As always when you respond please include the ncl-talk email list in your
reply.
Adam
On Wed, Aug 19, 2015 at 7:25 PM, Yang Yang <yang123yang at yahoo.com> wrote:
>
>
>
>
> Dear Sir/Madam:
> I have a text file with 13376 col. I used the following script to read:
>
> ------------------------------------------------------------------------------------------------------------
> mn = numAsciiRow("NIWA_Haast_20140624.dat")
> ml = numAsciiCol("NIWA_Haast_20140624.dat")
> data = asciiread("NIWA_Haast_20140624.dat", (/mn,ml/),"float")
> print(mn)
> print(ml)
> print(data(mn-1,10))
>
> ------------------------------------------------------------------------------------------------------------
>
> After ran the script, I got:
>
>
> ----------------------------------------------------------------------------
> Variable: mn
> Type: integer
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> (0) 13376
>
> Variable: ml
> Type: integer
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> (0) 21
>
> Variable: data (subsection)
> Type: float
> Total Size: 4 bytes
> 1 values
> Number of Dimensions: 1
> Dimensions and sizes: [1]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : 9.96921e+36
> (0) 9.96921e+36
>
> ------------------------------------------------------------------------------------------------------
> The data(mn-1,10) is not a missing value. Actually, more than 100 col
> numbers from the end of the file were not read correctly. What is the
> problem? I used nclv.6.0.0
> What is the maximum value of the column of a text file allowed in
> asciiread?
>
> Thank you very much!
>
> Regards
> Ed
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
--
Adam Phillips
Associate Scientist, Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/ 303-497-1726
<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150820/ad821ec8/attachment.html
More information about the ncl-talk
mailing list