use work_arrays !在datamod.f90中定义
use dfport
implicit none
!
...
!
write(*,'("请输入河道水位流量关系数组大小ng:",$)')
read(*,*) ng
allocate(h(ng),q(ng),stat=error)
if(error/=0) then
write(*,*) "数组分配失败!"
stop
endif
...
end
!****************************************************************
!datamod.f90
module work_arrays
implicit none
integer ng
real,allocatable::h(,q(:)
end module work_arrays