program co2h20n2
implicit none
integer,parameter::M=2966296,N=2,L=1227852
integer::cob(60000000,2)
real::co2(L,N)
real::h2o(M,N)
real::k
integer::i,j,q,p
open(unit=10,file='T_1800_P_25.0_CO2Mol_0.1_N2mol_0.9.data')
do i=1,1227852
do j=1,2
read(10,*)co2(i,j)
end do
end do
close(10)
open(unit=11,file='T_1800_P_25.0_H2OMol_0.1_N2mol_0.9.data')
do i=1,2966296
do j=1,2
read(11,*)h2o(i,j)
end do
end do
close(11)
q=1
do k=0,6000,0.000001
do p=1,1227852
if (abs(co2(p,1)-k)<=0.0001)then
cob(q,2)=co2(p,2)
end if
end do
q=q+1
end do
q=1
do k=0,6000,0.000001
do p=1,2966296
if (abs(h2o(p,1)-k)<=0.0001)then
cob(q,2)=cob(q,2)+h2o(p,2)
end if
end do
q=q+1
end do
open(unit=12,file='hecheng.txt')
do i=1,60000000
do j=1,2
write (12,*)cob(i,j)
end do
end do
close(12)
end
1609989696(1).jpg (49.4 KB, 下载次数: 246)
1609989679(1).jpg (57.45 KB, 下载次数: 252)
1609989039(1).jpg (51.24 KB, 下载次数: 222)
vvt 发表于 2021-1-7 11:57
do j=1,2
read(10,*)co2(i,j)
end do
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |