forked from KuangLab-Harvard/SAM_SRCv6.11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
advect_mom.f90
55 lines (39 loc) · 847 Bytes
/
advect_mom.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
subroutine advect_mom
use vars
use params, only: docolumn
implicit none
integer i,j,k
real du(nx,ny,nz,3)
if(docolumn) return
call t_startf ('advect_mom')
if(dostatis) then
do k=1,nzm
do j=1,ny
do i=1,nx
du(i,j,k,1)=dudt(i,j,k,na)
du(i,j,k,2)=dvdt(i,j,k,na)
du(i,j,k,3)=dwdt(i,j,k,na)
end do
end do
end do
endif
call advect2_mom_xy()
call advect2_mom_z()
if(dostatis) then
do k=1,nzm
do j=1,ny
do i=1,nx
du(i,j,k,1)=dudt(i,j,k,na)-du(i,j,k,1)
du(i,j,k,2)=dvdt(i,j,k,na)-du(i,j,k,2)
du(i,j,k,3)=dwdt(i,j,k,na)-du(i,j,k,3)
end do
end do
end do
call stat_tke(du,tkeleadv)
call stat_mom(du,momleadv)
call setvalue(twleadv,nzm,0.)
call setvalue(qwleadv,nzm,0.)
call stat_sw1(du,twleadv,qwleadv)
endif
call t_stopf ('advect_mom')
end subroutine advect_mom