-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtrac.f90
executable file
·69 lines (46 loc) · 1.29 KB
/
trac.f90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
subroutine trac(RHS_x)
!----------------------------------- !
! M. Faganello, 2007 !
! !
! Trasporto passivo: calcolo di !
! !
! -(U * Nabla) Tracciante !
! !
!----------------------------------- !
!**************************************************
! MPI PARALLEL VERSION: VALENTINI-FAGANELLO 2009
! 3D PARALLEL VERSION: FAGANELLO 2010
!**************************************************
use parameter_mod
use box_mod
use deriv_mod
use fields_DP_mod
use fields_UJ_mod
use dom_distr_mod, only: nxl, nyt, nzl
IMPLICIT NONE
integer :: ix, iy, iz
REAL(dp),DIMENSION (nxl,ny,nz) :: RHS_x
REAL(dp), ALLOCATABLE :: Trt(:,:,:)
REAL(dp), ALLOCATABLE:: zy(:), zx(:), zz(:)
ALLOCATE( Trt( nx, nyt,nz ) ) ! nyt ~ ny/nproc
allocate(zx(nx),zy(ny),zz(nz))
CALL traspdist( Tracciante, Trt, 1 )
do iz = 1, nz
do iy = 1, nyt
call derx_1( Trt(:,iy,iz), zx )
Trt(:,iy,iz) = zx
enddo
enddo
CALL traspdist( RHS_x, Trt, -1 )
RHS_x = - Ux * RHS_x
do iz = 1, nz
do ix = 1, nxl
call dery_1(Tracciante(ix,:,iz), zy)
RHS_x(ix,:,iz) = RHS_x(ix,:,iz) - Uy(ix,:,iz) * zy
enddo
enddo
deallocate(zx)
deallocate(zy)
deallocate(zz)
deallocate(Trt)
end subroutine