新手,怎么把一个25*238*280的三维二进制文件转为十进制文件输出,下面的代码问题在哪[Fortran] 纯文本查看 复制代码
PROGRAM LIAN
IMPLICIT NONE
INTEGER,PARAMETER::m=25,n=238,p=280
INTEGER::j,K,l
REAL::rain(m,n,p)
OPEN(1,FILE='C:\Users\zjc02\Desktop\shuju\EM.bin',CONVERT='big_endian',FORM='unformatted',ACCESS='direct',ACTION='read',RECL=p*n*m)
DO j=1,m
DO K=1,n
DO l=1,p
READ(1,rec=1) (rain(j,k,l))
END DO
END DO
END DO
OPEN(2,FILE='C:\Users\zjc02\Desktop\em.txt',FORM='formatted',ACTION='write')
DO j=1,m
DO K=1,n
DO l=1,p
WRITE(2)(rain(j,k,l))
END DO
END DO
END DO
CLOSE(1)
CLOSE(2)
END
|