Re: ascii read proble

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu, 20 Jul 2006 11:47:02 -0600

Hi Chao,

The first thing I would do is this:

temp = asciiread("./annl_avg_emi95.dat", -1 ,"float")
printVarSummary(temp)

and see what the dimension sizes of the temp array is.

If the dimension size = 72x46x48 - 1, then I would make sure that a
carriage return has been used at the end of the last row of the ascii
file. (Open the ascii file in a text editor, and see if the cursor will
drop to the row below your data. If not, go to the end of the last row
and hit enter.. Then save the file and try again.)

If the dimension size is not equal to 72x46x48 or 72x46x48-1, write us
back and give us the printVarSummary(temp) output..
Adam

cluo_at_uci.edu wrote:
> Hi all,
>
> I am trying to read three dimension (72x46x48) asc data from asc file.
> but got error like:
>
> fatal:Number of dimensions on right hand side do not match number of
> dimension in left hand side,
> but print out vary info is correct:
> Variable: data
> Type: float
> Total Size: 635904 bytes
> 158976 values
> Number of Dimensions: 3
> Dimensions and sizes: [72] x [46] x [48]
> Coordinates:
> Number Of Attributes: 1
> _FillValue : -999
>
> Following is part of code I used. Any help and suggestions are very
> appreciated!
>
>
> spe_nbr = 48
> lat_nbr = 46
> lon_nbr = 72
> data=new((/lon_nbr,lat_nbr,spe_nbr/),float)
> printVarSummary(data)
> data = asciiread("./annl_avg_emi95.dat", -1 ,"float")
>
> Chao
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
--------------------------------------------------------------
Adam Phillips			             asphilli_at_ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
ESSL/CGD/CAS                               fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000	  http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Jul 20 2006 - 11:47:02 MDT

This archive was generated by hypermail 2.2.0 : Thu Jul 20 2006 - 14:36:52 MDT