module sub
implicit none
integer :: nx, ny
real, allocatable :: B(:, :)
contains
subroutine cal_u
real :: A(0:nx+1, 0:ny+1)
A = 1
Call advect(A)
end subroutine
subroutine advect(AA)
!real :: AA(:, :)
real :: AA(0:nx+1, 0:ny+1)
B = AA+1
end subroutine
end module
program main
use sub
nx=3
ny=4
allocate(B(nx, ny))
B=1.0
call cal_u
write(*, *) B
end program
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |