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