-
Notifications
You must be signed in to change notification settings - Fork 2
/
advect_all_scalars.f90
67 lines (47 loc) · 1.48 KB
/
advect_all_scalars.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
subroutine advect_all_scalars()
use vars
use microphysics
use sgs
use tracers
use params, only: dotracers
implicit none
real dummy(nz)
integer k
!---------------------------------------------------------
! advection of scalars :
call advect_scalar(t,tadv,twle,t2leadv,t2legrad,twleadv,.true.)
!
! Advection of microphysics prognostics:
!
do k = 1,nmicro_fields
if( k.eq.index_water_vapor &! transport water-vapor variable no metter what
.or. docloud.and.flag_precip(k).ne.1 & ! transport non-precipitation vars
.or. doprecip.and.flag_precip(k).eq.1 ) then
if(flag_advect(k).eq.1) &
call advect_scalar(micro_field(:,:,:,k),mkadv(:,k),mkwle(:,k),dummy,dummy,dummy,.false.)
end if
end do
!
! Advection of sgs prognostics:
!
if(dosgs.and.advect_sgs) then
do k = 1,nsgs_fields
call advect_scalar(sgs_field(:,:,:,k),sgsadv(:,k),sgswle(:,k),dummy,dummy,dummy,.false.)
end do
end if
!
! Precipitation fallout:
!
precinst(:,:) = 0.
if(doprecip) then
total_water_prec = total_water_prec + total_water()
call micro_precip_fall()
total_water_prec = total_water_prec - total_water()
end if
! advection of tracers:
if(dotracers) then
do k = 1,ntracers
call advect_scalar(tracer(:,:,:,k),tradv(:,k),trwle(:,k),dummy,dummy,dummy,.false.)
end do
end if
end subroutine advect_all_scalars