- 积分
- 93
- 贡献
-
- 精华
- 在线时间
- 小时
- 注册时间
- 2014-4-1
- 最后登录
- 1970-1-1
|
登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
do ias=1,f_num
open(20,file=trim(ff(ias)%hhh)//'.txt') ! open(20,file=trim(str(ias)))
len0=trim(ff(ias)%hhh)
len1=len0(1:4);len2=len0(5:6);len3=len0(7:8)
read(len1,"(i4)")year;read(len2,"(i2)")month;read(len3,"(i2)")day
!print*,year,month,day
!pause
read(20,'(a144)') tou(ias)
do i=1,(ff(ias)%chang-1) !读进来每个站中的一条记录,直接处理,这样就避免了大的数组的出现,只存结果
read(20,'(a144)') str(i)
lens(1)=trim(str(i)(1:11));lens(2)=trim(str(i)(12:22));lens(3)=trim(str(i)(23:33));lens(4)=trim(str(i)(34:44));lens(5)=trim(str(i)(45:55));lens(6)=trim(str(i)(56:66))
lens(7)=trim(str(i)(67:77));lens(8)=trim(str(i)(78:88)); lens(9)=trim(str(i)(89:99)); lens(10)=trim(str(i)(100:110))
lens(11)=trim(str(i)(111:121));lens(12)=trim(str(i)(122:132));lens(13)=trim(str(i)(133:144))
read(lens(1),"(i5)")zz(i)%hao;read(lens(2),"(i4)")zz(i)%nian;read(lens(3),"(i2)")zz(i)%yue;read(lens(4),"(i2)")zz(i)%ri
read(lens(5),"(f6.0)")zz(i)%w_d;read(lens(6),"(f6.0)")zz(i)%w_s;read(lens(7),"(a8)")zz(i)%tave;read(lens(8),"(a8)")zz(i)%tmax
read(lens(9),"(a8)")zz(i)%tmin;read(lens(10),"(f8.1)")zz(i)%h_ave;read(lens(13),"(f8.1)")zz(i)%ssh
if( lens(11)==" " ) then
lens(11)="999999"
read(lens(11),"(f8.0)") zz(i)%r20
else
read(lens(11),"(f8.0)")zz(i)%r20
endif
if( lens(12)==" " ) then
lens(12)="999999"
read(lens(12),"(f8.0)") zz(i)%r08
else
read(lens(12),"(f8.0)")zz(i)%r08
endif
|
|