- 积分
- 36
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2011-12-13
- 最后登录
- 1970-1-1
|
发表于 2018-4-13 16:23:20
|
显示全部楼层
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.meteoinfo.data.ArrayUtil.numASCIICol(ArrayUtil.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.io.FileNotFoundException: java.io.FileNotFoundException: D: 123.txt (????????????????)
>>> run script...
Traceback (most recent call last):
File "<iostream>", line 9, in <module>
File "C:\MeteoInfo1\MeteoInfo\pylib\mipylib\dataset\midata.py", line 414, in numasciicol
ncol = ArrayUtil.numASCIICol(filename, delimiter, headerlines)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at org.meteoinfo.data.ArrayUtil.numASCIICol(ArrayUtil.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
java.io.FileNotFoundException: java.io.FileNotFoundException: D: 123.txt (????????????????)
王老师,我读txt文件时用numasciincol时总是报这个错们请教一下怎么回事
程序部分
fil='D:\t123.txt'
#Read station data
#f = addfile_lonlat(os.path.join(datadir, 'AERONET_Stations.csv'))
#sid = f['Site_Name'][:]
ncol = numasciicol(fil)
nrow = numasciirow(fil)
a=asciiread(fil,shape=(ncol,nrow))
lon = a[0,:]
lat = a[1,:]
pr = a[2,:]
数据文件部分:
127.45 50.25 .4
126.77 45.75 .7
75.98 39.47 1.0
98.48 39.77 .01
100.43 38.93 1.7
111.68 40.82 1.2
107.40 40.77 1.5
113.53 39.03 8.6
112.55 37.78 1.8
114.88 40.78 5.0
116.47 39.80 .01
116.98 36.68 3.9
102.90 35.00 5.6
103.83 30.70 79.4 |
|