- 积分
- 677
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2013-5-21
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
现在txt里面前25行既有数字也有字符串,还有空格,不知道跳过这25行开始处理数据的话,怎么书写跳过的语句喃,现在有很多txt需要处理,看了相关的帖子还是有点疑问,Copyright (C) 1995-2013 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 6.1.2
The use of this software is governed by a License Agreement.
See http://www.ncl.ucar.edu/ for more details.
Variable: h2o
Type: float
Total Size: 357120 bytes
89280 values
Number of Dimensions: 4
Dimensions and sizes: [time | 1] x [levsoi | 10] x [lat | 72] x [lon | 124]
Coordinates:
time: [9.96921e+36..9.96921e+36]
levsoi: [0..2]
lat: [19.74306..54.25694]
lon: [73.74596..134.254]
Number Of Attributes: 6
long_name : volumetric soil water
units : mm3/mm3
cell_method : time: mean
FillValue : 1e+36
missing_value : 1e+36
_FillValue : 1e+36
0.3276034
0.4129702
0.4114943
0.3983252
0.3980107
0.3981399
0.3982514
0.3980571
0.3984232
0.3207843
0.320251
前面25行全部是开头信息,这是我的fortran程序,结果一直显示list directed i/o syntax error,unit 13,file F:\work\ch4.2\0.1\1.txt,请大神指点一下很急。
program change
implicit none
integer,parameter::n=89280
real a(n)
integer i,j
character(len=50)temp
!********************************
open(13,file="F:\work\ch4.2\0.1\1.txt")
do j=1,25
read(13,*)temp
end do
do i=1,n
read(13,*)a(i)
end do
close(13)
!*******************************
open(14,file="F:\work\ch4.2\0.1\2.txt")
do i=1,n
if(a(i)==1e+36)then
a(i)=-999
end if
write(14,*)a(i)
end do
close(14)
end
|
|