li913 发表于 2020-5-27 22:13 学到了!!感谢 |
[Fortran] 纯文本查看 复制代码 program climate implicit none !声明变量 real::lon,lon1 real::lat,lat1 real(kind=8)::dataa,dataa1 integer::status1=0 integer::i,j !读取 OPEN(11,file='2013.txt',status='old') OPEN(12,file='2014.txt',status='old') OPEN(13,file='new2014.txt',status='replace') do j =1,4189,1 READ(11,*,iostat=status1)lon,lat,dataa if(status1/=0)exit do i =1,4548,1 READ(12,*,iostat=status1)lon1,lat1,dataa1 if(lat/=lat1.OR.lon/=lon1) cycle write(*,*)lon1,lat1,dataa1 write(13,*)lon1,lat1,dataa1 if(status1/=0)exit end do end do CLOSE(11) CLOSE(12) CLOSE(13) end program climate |
捐赠本站|Archiver|关于我们 About Us|小黑屋|Fcode ( 京ICP备18005632-2号 )
GMT+8, 2024-12-23 05:44