将格点txt文件批量转换成grd文件
原始程序是这样的
program txt2grid
implicit none
integer i,j
integer,parameter::xn=73,yn=57
real t2m
character*32 prefile,infile,outfile
Open(10,file='E:/data/ec/30/06Z20JUN2016_no2Tsfc.txt',status='old')
open(1,file='E:/data/ec/30/0620.grd',status='replace',form='binary')
do i=1,yn
do j=1,xn
read(10,*)t2m
write(1)t2m
enddo
enddo
close(1)
end