登录后查看更多精彩内容~
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
本帖最后由 nickbsb 于 2012-6-21 09:55 编辑
program main
implicit none
real uwnd(144,29,17,3630)
integer i,j,nz,nday
open(50,file='E:\uwndfield\uwnd.grd',form='binary')
read(50) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=1,3630)
open(11,file='e:\uwndfield\readuwnd\uwnd1.grd',form='binary')
write(11) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=1,121)
open(12,file='e:\uwndfield\readuwnd\uwnd2.grd',form='binary')
write(12) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=122,242)
open(13,file='e:\uwndfield\readuwnd\uwnd3.grd',form='binary')
write(13) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=243,363)
open(14,file='e:\uwndfield\readuwnd\uwnd4.grd',form='binary')
write(14) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=364,484)
open(15,file='e:\uwndfield\readuwnd\uwnd5.grd',form='binary')
write(15) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=485,605)
open(16,file='e:\uwndfield\readuwnd\uwnd6.grd',form='binary')
write(16) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=606,726)
open(17,file='e:\uwndfield\readuwnd\uwnd7.grd',form='binary')
write(17) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=727,847)
open(18,file='e:\uwndfield\readuwnd\uwnd8.grd',form='binary')
write(18) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=848,968)
open(19,file='e:\uwndfield\readuwnd\uwnd9.grd',form='binary')
write(19) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=969,1089)
open(20,file='e:\uwndfield\readuwnd\uwnd10.grd',form='binary')
write(20) ((((uwnd(i,j,nz,nday),i=1,144),j=1,29),nz=1,17),nday=1090,1210)
以此类推 一直到nday=3510,3630
我这样把一个grd文件分解为多个grd 文件,并写入相应文件中 这样写格式正确吗
|