| 
 
	积分4593贡献 精华在线时间 小时注册时间2012-10-2最后登录1970-1-1 
 | 
 
| 
第一张图第一列是站名,我现在想根据站名来将该站的经纬度、海拔高度及降水数据提取出来,我写了程序,但是一直在报错,请教各位大神要怎么改这个程序?
x
登录后查看更多精彩内容~您需要 登录 才可以下载或查看,没有帐号?立即注册 
  program chazhao
 implicit none
 integer num1, num2
 character n
 integer aa(9)
 character(len=76) str
 logical :: alive
 inquire(file = 'E:\\paper\\data\\1991data.txt', exist = alive)
 open (unit = 30, file = 'E:\\paper\\data\\1991tiqudata.txt')
 if (alive) then
 open (unit = 10, file = 'E:\\paper\\data\\1991data.txt', access = 'sequential', status = 'old')
 read(10,*) n
 read(10,*) num1,num2
 if (n .EQ. str) then
 write(30,*) "sta   ", "lat  ", "lon    ", "high ","year ", "month ", "20-8h  ", "8-20h ","20-20h"
 else if (num2 .EQ. 50247) then
 read (30,*) aa(9)
 write(30,*) aa(9)
 else
 write(*,*) "E:\\paper\\data\\1991data.txt", "doesn't exist"
 end if
 end if
 close(10,status = 'KEEP' )
 close(30,status = 'KEEP' ) !close and keep two files
 stop
 end
 
 | 
 |