1 | MODULE advec_v_pw_mod |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------! |
---|
4 | ! Actual revisions: |
---|
5 | ! ----------------- |
---|
6 | ! vynp eliminated |
---|
7 | ! |
---|
8 | ! Former revisions: |
---|
9 | ! ----------------- |
---|
10 | ! $Id: advec_v_pw.f90 75 2007-03-22 09:54:05Z raasch $ |
---|
11 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
12 | ! |
---|
13 | ! Revision 1.15 2006/02/23 09:46:08 raasch |
---|
14 | ! nzb_2d replaced by nzb_v_inner |
---|
15 | ! |
---|
16 | ! Revision 1.1 1997/08/11 06:09:57 raasch |
---|
17 | ! Initial revision |
---|
18 | ! |
---|
19 | ! |
---|
20 | ! Description: |
---|
21 | ! ------------ |
---|
22 | ! Advection term for v velocity-component using Piacsek and Williams. |
---|
23 | ! Vertical advection at the first grid point above the surface is done with |
---|
24 | ! normal centred differences, because otherwise no information from the surface |
---|
25 | ! would be communicated upwards due to w=0 at K=nzb. |
---|
26 | !------------------------------------------------------------------------------! |
---|
27 | |
---|
28 | PRIVATE |
---|
29 | PUBLIC advec_v_pw |
---|
30 | |
---|
31 | INTERFACE advec_v_pw |
---|
32 | MODULE PROCEDURE advec_v_pw |
---|
33 | MODULE PROCEDURE advec_v_pw_ij |
---|
34 | END INTERFACE advec_v_pw |
---|
35 | |
---|
36 | CONTAINS |
---|
37 | |
---|
38 | |
---|
39 | !------------------------------------------------------------------------------! |
---|
40 | ! Call for all grid points |
---|
41 | !------------------------------------------------------------------------------! |
---|
42 | SUBROUTINE advec_v_pw |
---|
43 | |
---|
44 | USE arrays_3d |
---|
45 | USE control_parameters |
---|
46 | USE grid_variables |
---|
47 | USE indices |
---|
48 | |
---|
49 | IMPLICIT NONE |
---|
50 | |
---|
51 | INTEGER :: i, j, k |
---|
52 | REAL :: gu, gv |
---|
53 | |
---|
54 | |
---|
55 | gu = 2.0 * u_gtrans |
---|
56 | gv = 2.0 * v_gtrans |
---|
57 | DO i = nxl, nxr |
---|
58 | DO j = nys, nyn |
---|
59 | DO k = nzb_v_inner(j,i)+1, nzt |
---|
60 | tend(k,j,i) = tend(k,j,i) - 0.25 * ( & |
---|
61 | ( v(k,j,i+1) * ( u(k,j-1,i+1) + u(k,j,i+1) - gu ) & |
---|
62 | - v(k,j,i-1) * ( u(k,j-1,i) + u(k,j,i) - gu ) ) * ddx & |
---|
63 | + ( v(k,j+1,i) * ( v(k,j+1,i) + v(k,j,i) - gv ) & |
---|
64 | - v(k,j-1,i) * ( v(k,j,i) + v(k,j-1,i) - gv ) ) * ddy & |
---|
65 | + ( v(k+1,j,i) * ( w(k,j-1,i) + w(k,j,i) ) & |
---|
66 | - v(k-1,j,i) * ( w(k-1,j-1,i) + w(k-1,j,i) ) ) & |
---|
67 | * ddzw(k) & |
---|
68 | ) |
---|
69 | ENDDO |
---|
70 | ENDDO |
---|
71 | ENDDO |
---|
72 | |
---|
73 | END SUBROUTINE advec_v_pw |
---|
74 | |
---|
75 | |
---|
76 | !------------------------------------------------------------------------------! |
---|
77 | ! Call for grid point i,j |
---|
78 | !------------------------------------------------------------------------------! |
---|
79 | SUBROUTINE advec_v_pw_ij( i, j ) |
---|
80 | |
---|
81 | USE arrays_3d |
---|
82 | USE control_parameters |
---|
83 | USE grid_variables |
---|
84 | USE indices |
---|
85 | |
---|
86 | IMPLICIT NONE |
---|
87 | |
---|
88 | INTEGER :: i, j, k |
---|
89 | REAL :: gu, gv |
---|
90 | |
---|
91 | |
---|
92 | gu = 2.0 * u_gtrans |
---|
93 | gv = 2.0 * v_gtrans |
---|
94 | DO k = nzb_v_inner(j,i)+1, nzt |
---|
95 | tend(k,j,i) = tend(k,j,i) - 0.25 * ( & |
---|
96 | ( v(k,j,i+1) * ( u(k,j-1,i+1) + u(k,j,i+1) - gu ) & |
---|
97 | - v(k,j,i-1) * ( u(k,j-1,i) + u(k,j,i) - gu ) ) * ddx & |
---|
98 | + ( v(k,j+1,i) * ( v(k,j+1,i) + v(k,j,i) - gv ) & |
---|
99 | - v(k,j-1,i) * ( v(k,j,i) + v(k,j-1,i) - gv ) ) * ddy & |
---|
100 | + ( v(k+1,j,i) * ( w(k,j-1,i) + w(k,j,i) ) & |
---|
101 | - v(k-1,j,i) * ( w(k-1,j-1,i) + w(k-1,j,i) ) ) & |
---|
102 | * ddzw(k) & |
---|
103 | ) |
---|
104 | ENDDO |
---|
105 | |
---|
106 | END SUBROUTINE advec_v_pw_ij |
---|
107 | |
---|
108 | END MODULE advec_v_pw_mod |
---|
109 | |
---|