[Fortran] 纯文本查看 复制代码
REAL, ALLOCATABLE, DIMENSION(:,:) :: AVE_DENSI, VAR_DENSI
DO ILLL = 0, TIME_STEP
WRITE(2116,*) 'TIME = ', ILLL*DELT_T*dt
WRITE(2117,*) 'TIME = ', ILLL*DELT_T*dt
DO ILL = 0, 20
WRITE(2116,*) ILL, AVE_DENSI(ILLL, ILL)/NRMAX
WRITE(2117,*) ILL, VAR_DENSI(ILLL, ILL)/NRMAX -
& (AVE_DENSI(ILLL, ILL)/NRMAX)**2
enddo
enddo
[Fortran] 纯文本查看 复制代码
REAL, ALLOCATABLE, DIMENSION(:,:) :: AVE_DENSI, VAR_DENSI
integer :: time_step = 3 , NRMAX = 1
allocate(AVE_DENSI(3,3), VAR_DENSI(3,3))
AVE_DENSI = 1
VAR_DENSI=1
DO ILLL = 0, TIME_STEP
WRITE(*,*) 'TIME = ', ILLL*DELT_T*dt
WRITE(*,*) 'TIME = ', ILLL*DELT_T*dt
DO ILL = 0, 3
WRITE(*,*) ILL, AVE_DENSI(ILLL, ILL)/NRMAX
WRITE(*,*) ILL, VAR_DENSI(ILLL, ILL)/NRMAX - &
(AVE_DENSI(ILLL, ILL)/NRMAX)**2
enddo
enddo
end program