[1873] | 1 | !> @file diffusion_w.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[1036] | 3 | ! This file is part of PALM. |
---|
| 4 | ! |
---|
[2000] | 5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
| 6 | ! terms of the GNU General Public License as published by the Free Software |
---|
| 7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
| 8 | ! version. |
---|
[1036] | 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
[2101] | 17 | ! Copyright 1997-2017 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[1341] | 22 | ! |
---|
[2119] | 23 | ! |
---|
[1321] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: diffusion_w.f90 2119 2017-01-17 16:51:50Z lvollmer $ |
---|
| 27 | ! |
---|
[2119] | 28 | ! 2118 2017-01-17 16:38:49Z raasch |
---|
| 29 | ! OpenACC version of subroutine removed |
---|
| 30 | ! |
---|
[2038] | 31 | ! 2037 2016-10-26 11:15:40Z knoop |
---|
| 32 | ! Anelastic approximation implemented |
---|
| 33 | ! |
---|
[2001] | 34 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
| 35 | ! Forced header and separation lines into 80 columns |
---|
| 36 | ! |
---|
[1874] | 37 | ! 1873 2016-04-18 14:50:06Z maronga |
---|
| 38 | ! Module renamed (removed _mod) |
---|
| 39 | ! |
---|
[1851] | 40 | ! 1850 2016-04-08 13:29:27Z maronga |
---|
| 41 | ! Module renamed |
---|
| 42 | ! |
---|
[1683] | 43 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 44 | ! Code annotations made doxygen readable |
---|
| 45 | ! |
---|
[1375] | 46 | ! 1374 2014-04-25 12:55:07Z raasch |
---|
| 47 | ! vsws + vswst removed from acc-present-list |
---|
| 48 | ! |
---|
[1354] | 49 | ! 1353 2014-04-08 15:21:23Z heinze |
---|
| 50 | ! REAL constants provided with KIND-attribute |
---|
| 51 | ! |
---|
[1341] | 52 | ! 1340 2014-03-25 19:45:13Z kanani |
---|
| 53 | ! REAL constants defined as wp-kind |
---|
| 54 | ! |
---|
[1323] | 55 | ! 1322 2014-03-20 16:38:49Z raasch |
---|
| 56 | ! REAL constants defined as wp-kind |
---|
| 57 | ! |
---|
[1321] | 58 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 59 | ! ONLY-attribute added to USE-statements, |
---|
| 60 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 61 | ! kinds are defined in new module kinds, |
---|
| 62 | ! revision history before 2012 removed, |
---|
| 63 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 64 | ! all variable declaration statements |
---|
[1] | 65 | ! |
---|
[1258] | 66 | ! 1257 2013-11-08 15:18:40Z raasch |
---|
| 67 | ! openacc loop and loop vector clauses removed, declare create moved after |
---|
| 68 | ! the FORTRAN declaration statement |
---|
| 69 | ! |
---|
[1132] | 70 | ! 1128 2013-04-12 06:19:32Z raasch |
---|
| 71 | ! loop index bounds in accelerator version replaced by i_left, i_right, j_south, |
---|
| 72 | ! j_north |
---|
| 73 | ! |
---|
[1037] | 74 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 75 | ! code put under GPL (PALM 3.9) |
---|
| 76 | ! |
---|
[1017] | 77 | ! 1015 2012-09-27 09:23:24Z raasch |
---|
| 78 | ! accelerator version (*_acc) added |
---|
| 79 | ! |
---|
[1002] | 80 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 81 | ! arrays comunicated by module instead of parameter list |
---|
| 82 | ! |
---|
[979] | 83 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 84 | ! outflow damping layer removed |
---|
| 85 | ! kmxm_x/_z and kmxp_x/_z change to kmxm and kmxp |
---|
| 86 | ! kmym_y/_z and kmyp_y/_z change to kmym and kmyp |
---|
| 87 | ! |
---|
[1] | 88 | ! Revision 1.1 1997/09/12 06:24:11 raasch |
---|
| 89 | ! Initial revision |
---|
| 90 | ! |
---|
| 91 | ! |
---|
| 92 | ! Description: |
---|
| 93 | ! ------------ |
---|
[1682] | 94 | !> Diffusion term of the w-component |
---|
[1] | 95 | !------------------------------------------------------------------------------! |
---|
[1682] | 96 | MODULE diffusion_w_mod |
---|
| 97 | |
---|
[1] | 98 | |
---|
[1320] | 99 | USE wall_fluxes_mod, & |
---|
[2118] | 100 | ONLY : wall_fluxes |
---|
[56] | 101 | |
---|
[1] | 102 | PRIVATE |
---|
[2118] | 103 | PUBLIC diffusion_w |
---|
[1] | 104 | |
---|
| 105 | INTERFACE diffusion_w |
---|
| 106 | MODULE PROCEDURE diffusion_w |
---|
| 107 | MODULE PROCEDURE diffusion_w_ij |
---|
| 108 | END INTERFACE diffusion_w |
---|
| 109 | |
---|
| 110 | CONTAINS |
---|
| 111 | |
---|
| 112 | |
---|
| 113 | !------------------------------------------------------------------------------! |
---|
[1682] | 114 | ! Description: |
---|
| 115 | ! ------------ |
---|
| 116 | !> Call for all grid points |
---|
[1] | 117 | !------------------------------------------------------------------------------! |
---|
[1001] | 118 | SUBROUTINE diffusion_w |
---|
[1] | 119 | |
---|
[1320] | 120 | USE arrays_3d, & |
---|
[2037] | 121 | ONLY : ddzu, ddzw, km, tend, u, v, w, drho_air_zw, rho_air |
---|
[1320] | 122 | |
---|
| 123 | USE control_parameters, & |
---|
| 124 | ONLY : topography |
---|
| 125 | |
---|
| 126 | USE grid_variables, & |
---|
| 127 | ONLY : ddx, ddy, fwxm, fwxp, fwym, fwyp, wall_w_x, wall_w_y |
---|
| 128 | |
---|
| 129 | USE indices, & |
---|
| 130 | ONLY : nxl, nxr, nyn, nys, nzb, nzb_w_inner, nzb_w_outer, nzt |
---|
| 131 | |
---|
| 132 | USE kinds |
---|
[1] | 133 | |
---|
| 134 | IMPLICIT NONE |
---|
| 135 | |
---|
[1682] | 136 | INTEGER(iwp) :: i !< |
---|
| 137 | INTEGER(iwp) :: j !< |
---|
| 138 | INTEGER(iwp) :: k !< |
---|
[1320] | 139 | |
---|
[1682] | 140 | REAL(wp) :: kmxm !< |
---|
| 141 | REAL(wp) :: kmxp !< |
---|
| 142 | REAL(wp) :: kmym !< |
---|
| 143 | REAL(wp) :: kmyp !< |
---|
[1001] | 144 | |
---|
[1682] | 145 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: wsus !< |
---|
| 146 | REAL(wp), DIMENSION(nzb:nzt+1,nys:nyn,nxl:nxr) :: wsvs !< |
---|
[1] | 147 | |
---|
| 148 | |
---|
[56] | 149 | ! |
---|
| 150 | !-- First calculate horizontal momentum flux w'u' and/or w'v' at vertical |
---|
| 151 | !-- walls, if neccessary |
---|
| 152 | IF ( topography /= 'flat' ) THEN |
---|
[1320] | 153 | CALL wall_fluxes( wsus, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp, nzb_w_inner, & |
---|
[56] | 154 | nzb_w_outer, wall_w_x ) |
---|
[1320] | 155 | CALL wall_fluxes( wsvs, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp, nzb_w_inner, & |
---|
[56] | 156 | nzb_w_outer, wall_w_y ) |
---|
| 157 | ENDIF |
---|
| 158 | |
---|
[1] | 159 | DO i = nxl, nxr |
---|
| 160 | DO j = nys, nyn |
---|
| 161 | DO k = nzb_w_outer(j,i)+1, nzt-1 |
---|
| 162 | ! |
---|
| 163 | !-- Interpolate eddy diffusivities on staggered gridpoints |
---|
[1322] | 164 | kmxp = 0.25_wp * & |
---|
[978] | 165 | ( km(k,j,i)+km(k,j,i+1)+km(k+1,j,i)+km(k+1,j,i+1) ) |
---|
[1322] | 166 | kmxm = 0.25_wp * & |
---|
[978] | 167 | ( km(k,j,i)+km(k,j,i-1)+km(k+1,j,i)+km(k+1,j,i-1) ) |
---|
[1322] | 168 | kmyp = 0.25_wp * & |
---|
[978] | 169 | ( km(k,j,i)+km(k+1,j,i)+km(k,j+1,i)+km(k+1,j+1,i) ) |
---|
[1322] | 170 | kmym = 0.25_wp * & |
---|
[978] | 171 | ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) |
---|
[1] | 172 | |
---|
| 173 | tend(k,j,i) = tend(k,j,i) & |
---|
[978] | 174 | & + ( kmxp * ( w(k,j,i+1) - w(k,j,i) ) * ddx & |
---|
| 175 | & + kmxp * ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1) & |
---|
| 176 | & - kmxm * ( w(k,j,i) - w(k,j,i-1) ) * ddx & |
---|
| 177 | & - kmxm * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 178 | & ) * ddx & |
---|
[978] | 179 | & + ( kmyp * ( w(k,j+1,i) - w(k,j,i) ) * ddy & |
---|
| 180 | & + kmyp * ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1) & |
---|
| 181 | & - kmym * ( w(k,j,i) - w(k,j-1,i) ) * ddy & |
---|
| 182 | & - kmym * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 183 | & ) * ddy & |
---|
[1322] | 184 | & + 2.0_wp * ( & |
---|
[1] | 185 | & km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & |
---|
[2037] | 186 | & * rho_air(k+1) & |
---|
[1] | 187 | & - km(k,j,i) * ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & |
---|
[2037] | 188 | & * rho_air(k) & |
---|
| 189 | & ) * ddzu(k+1) * drho_air_zw(k) |
---|
[1] | 190 | ENDDO |
---|
| 191 | |
---|
| 192 | ! |
---|
| 193 | !-- Wall functions at all vertical walls, where necessary |
---|
[1340] | 194 | IF ( wall_w_x(j,i) /= 0.0_wp .OR. wall_w_y(j,i) /= 0.0_wp ) THEN |
---|
[51] | 195 | |
---|
[1] | 196 | DO k = nzb_w_inner(j,i)+1, nzb_w_outer(j,i) |
---|
| 197 | ! |
---|
| 198 | !-- Interpolate eddy diffusivities on staggered gridpoints |
---|
[1322] | 199 | kmxp = 0.25_wp * & |
---|
[978] | 200 | ( km(k,j,i)+km(k,j,i+1)+km(k+1,j,i)+km(k+1,j,i+1) ) |
---|
[1322] | 201 | kmxm = 0.25_wp * & |
---|
[978] | 202 | ( km(k,j,i)+km(k,j,i-1)+km(k+1,j,i)+km(k+1,j,i-1) ) |
---|
[1322] | 203 | kmyp = 0.25_wp * & |
---|
[978] | 204 | ( km(k,j,i)+km(k+1,j,i)+km(k,j+1,i)+km(k+1,j+1,i) ) |
---|
[1322] | 205 | kmym = 0.25_wp * & |
---|
[978] | 206 | ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) |
---|
[1] | 207 | |
---|
| 208 | tend(k,j,i) = tend(k,j,i) & |
---|
| 209 | + ( fwxp(j,i) * ( & |
---|
[978] | 210 | kmxp * ( w(k,j,i+1) - w(k,j,i) ) * ddx & |
---|
| 211 | + kmxp * ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1) & |
---|
[1] | 212 | ) & |
---|
| 213 | - fwxm(j,i) * ( & |
---|
[978] | 214 | kmxm * ( w(k,j,i) - w(k,j,i-1) ) * ddx & |
---|
| 215 | + kmxm * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 216 | ) & |
---|
[56] | 217 | + wall_w_x(j,i) * wsus(k,j,i) & |
---|
[1] | 218 | ) * ddx & |
---|
| 219 | + ( fwyp(j,i) * ( & |
---|
[978] | 220 | kmyp * ( w(k,j+1,i) - w(k,j,i) ) * ddy & |
---|
| 221 | + kmyp * ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1) & |
---|
[1] | 222 | ) & |
---|
| 223 | - fwym(j,i) * ( & |
---|
[978] | 224 | kmym * ( w(k,j,i) - w(k,j-1,i) ) * ddy & |
---|
| 225 | + kmym * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 226 | ) & |
---|
[56] | 227 | + wall_w_y(j,i) * wsvs(k,j,i) & |
---|
[1] | 228 | ) * ddy & |
---|
[1340] | 229 | + 2.0_wp * ( & |
---|
[1] | 230 | km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & |
---|
[2037] | 231 | * rho_air(k+1) & |
---|
[1] | 232 | - km(k,j,i) * ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & |
---|
[2037] | 233 | * rho_air(k) & |
---|
| 234 | ) * ddzu(k+1) * drho_air_zw(k) |
---|
[1] | 235 | ENDDO |
---|
| 236 | ENDIF |
---|
| 237 | |
---|
| 238 | ENDDO |
---|
| 239 | ENDDO |
---|
| 240 | |
---|
| 241 | END SUBROUTINE diffusion_w |
---|
| 242 | |
---|
| 243 | |
---|
| 244 | !------------------------------------------------------------------------------! |
---|
[1682] | 245 | ! Description: |
---|
| 246 | ! ------------ |
---|
| 247 | !> Call for grid point i,j |
---|
[1] | 248 | !------------------------------------------------------------------------------! |
---|
[1001] | 249 | SUBROUTINE diffusion_w_ij( i, j ) |
---|
[1] | 250 | |
---|
[1320] | 251 | USE arrays_3d, & |
---|
[2037] | 252 | ONLY : ddzu, ddzw, km, tend, u, v, w, drho_air_zw, rho_air |
---|
[1320] | 253 | |
---|
| 254 | USE control_parameters, & |
---|
| 255 | ONLY : topography |
---|
| 256 | |
---|
| 257 | USE grid_variables, & |
---|
| 258 | ONLY : ddx, ddy, fwxm, fwxp, fwym, fwyp, wall_w_x, wall_w_y |
---|
| 259 | |
---|
| 260 | USE indices, & |
---|
| 261 | ONLY : nxl, nxr, nyn, nys, nzb, nzb_w_inner, nzb_w_outer, nzt |
---|
| 262 | |
---|
| 263 | USE kinds |
---|
[1] | 264 | |
---|
| 265 | IMPLICIT NONE |
---|
| 266 | |
---|
[1682] | 267 | INTEGER(iwp) :: i !< |
---|
| 268 | INTEGER(iwp) :: j !< |
---|
| 269 | INTEGER(iwp) :: k !< |
---|
[1320] | 270 | |
---|
[1682] | 271 | REAL(wp) :: kmxm !< |
---|
| 272 | REAL(wp) :: kmxp !< |
---|
| 273 | REAL(wp) :: kmym !< |
---|
| 274 | REAL(wp) :: kmyp !< |
---|
[1] | 275 | |
---|
[1320] | 276 | REAL(wp), DIMENSION(nzb:nzt+1) :: wsus |
---|
| 277 | REAL(wp), DIMENSION(nzb:nzt+1) :: wsvs |
---|
[1] | 278 | |
---|
[1001] | 279 | |
---|
[1] | 280 | DO k = nzb_w_outer(j,i)+1, nzt-1 |
---|
| 281 | ! |
---|
| 282 | !-- Interpolate eddy diffusivities on staggered gridpoints |
---|
[1322] | 283 | kmxp = 0.25_wp * ( km(k,j,i)+km(k,j,i+1)+km(k+1,j,i)+km(k+1,j,i+1) ) |
---|
| 284 | kmxm = 0.25_wp * ( km(k,j,i)+km(k,j,i-1)+km(k+1,j,i)+km(k+1,j,i-1) ) |
---|
| 285 | kmyp = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j+1,i)+km(k+1,j+1,i) ) |
---|
| 286 | kmym = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) |
---|
[1] | 287 | |
---|
| 288 | tend(k,j,i) = tend(k,j,i) & |
---|
[978] | 289 | & + ( kmxp * ( w(k,j,i+1) - w(k,j,i) ) * ddx & |
---|
| 290 | & + kmxp * ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1) & |
---|
| 291 | & - kmxm * ( w(k,j,i) - w(k,j,i-1) ) * ddx & |
---|
| 292 | & - kmxm * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 293 | & ) * ddx & |
---|
[978] | 294 | & + ( kmyp * ( w(k,j+1,i) - w(k,j,i) ) * ddy & |
---|
| 295 | & + kmyp * ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1) & |
---|
| 296 | & - kmym * ( w(k,j,i) - w(k,j-1,i) ) * ddy & |
---|
| 297 | & - kmym * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 298 | & ) * ddy & |
---|
[1322] | 299 | & + 2.0_wp * ( & |
---|
[1] | 300 | & km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & |
---|
[2037] | 301 | & * rho_air(k+1) & |
---|
[1] | 302 | & - km(k,j,i) * ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & |
---|
[2037] | 303 | & * rho_air(k) & |
---|
| 304 | & ) * ddzu(k+1) * drho_air_zw(k) |
---|
[1] | 305 | ENDDO |
---|
| 306 | |
---|
| 307 | ! |
---|
| 308 | !-- Wall functions at all vertical walls, where necessary |
---|
[1340] | 309 | IF ( wall_w_x(j,i) /= 0.0_wp .OR. wall_w_y(j,i) /= 0.0_wp ) THEN |
---|
[51] | 310 | |
---|
| 311 | ! |
---|
| 312 | !-- Calculate the horizontal momentum fluxes w'u' and/or w'v' |
---|
[1340] | 313 | IF ( wall_w_x(j,i) /= 0.0_wp ) THEN |
---|
[1320] | 314 | CALL wall_fluxes( i, j, nzb_w_inner(j,i)+1, nzb_w_outer(j,i), & |
---|
| 315 | wsus, 0.0_wp, 0.0_wp, 0.0_wp, 1.0_wp ) |
---|
[51] | 316 | ELSE |
---|
[1340] | 317 | wsus = 0.0_wp |
---|
[51] | 318 | ENDIF |
---|
| 319 | |
---|
[1340] | 320 | IF ( wall_w_y(j,i) /= 0.0_wp ) THEN |
---|
[1320] | 321 | CALL wall_fluxes( i, j, nzb_w_inner(j,i)+1, nzb_w_outer(j,i), & |
---|
| 322 | wsvs, 0.0_wp, 0.0_wp, 1.0_wp, 0.0_wp ) |
---|
[51] | 323 | ELSE |
---|
[1340] | 324 | wsvs = 0.0_wp |
---|
[51] | 325 | ENDIF |
---|
| 326 | |
---|
[1] | 327 | DO k = nzb_w_inner(j,i)+1, nzb_w_outer(j,i) |
---|
| 328 | ! |
---|
| 329 | !-- Interpolate eddy diffusivities on staggered gridpoints |
---|
[1322] | 330 | kmxp = 0.25_wp * ( km(k,j,i)+km(k,j,i+1)+km(k+1,j,i)+km(k+1,j,i+1) ) |
---|
| 331 | kmxm = 0.25_wp * ( km(k,j,i)+km(k,j,i-1)+km(k+1,j,i)+km(k+1,j,i-1) ) |
---|
| 332 | kmyp = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j+1,i)+km(k+1,j+1,i) ) |
---|
| 333 | kmym = 0.25_wp * ( km(k,j,i)+km(k+1,j,i)+km(k,j-1,i)+km(k+1,j-1,i) ) |
---|
[1] | 334 | |
---|
| 335 | tend(k,j,i) = tend(k,j,i) & |
---|
| 336 | + ( fwxp(j,i) * ( & |
---|
[978] | 337 | kmxp * ( w(k,j,i+1) - w(k,j,i) ) * ddx & |
---|
| 338 | + kmxp * ( u(k+1,j,i+1) - u(k,j,i+1) ) * ddzu(k+1) & |
---|
[1] | 339 | ) & |
---|
| 340 | - fwxm(j,i) * ( & |
---|
[978] | 341 | kmxm * ( w(k,j,i) - w(k,j,i-1) ) * ddx & |
---|
| 342 | + kmxm * ( u(k+1,j,i) - u(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 343 | ) & |
---|
[51] | 344 | + wall_w_x(j,i) * wsus(k) & |
---|
[1] | 345 | ) * ddx & |
---|
| 346 | + ( fwyp(j,i) * ( & |
---|
[978] | 347 | kmyp * ( w(k,j+1,i) - w(k,j,i) ) * ddy & |
---|
| 348 | + kmyp * ( v(k+1,j+1,i) - v(k,j+1,i) ) * ddzu(k+1) & |
---|
[1] | 349 | ) & |
---|
| 350 | - fwym(j,i) * ( & |
---|
[978] | 351 | kmym * ( w(k,j,i) - w(k,j-1,i) ) * ddy & |
---|
| 352 | + kmym * ( v(k+1,j,i) - v(k,j,i) ) * ddzu(k+1) & |
---|
[1] | 353 | ) & |
---|
[51] | 354 | + wall_w_y(j,i) * wsvs(k) & |
---|
[1] | 355 | ) * ddy & |
---|
[1340] | 356 | + 2.0_wp * ( & |
---|
[1] | 357 | km(k+1,j,i) * ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & |
---|
[2037] | 358 | * rho_air(k+1) & |
---|
[1] | 359 | - km(k,j,i) * ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & |
---|
[2037] | 360 | * rho_air(k) & |
---|
| 361 | ) * ddzu(k+1) * drho_air_zw(k) |
---|
[1] | 362 | ENDDO |
---|
| 363 | ENDIF |
---|
| 364 | |
---|
| 365 | END SUBROUTINE diffusion_w_ij |
---|
| 366 | |
---|
[1323] | 367 | END MODULE diffusion_w_mod |
---|