Changeset 3538 for palm/trunk/SOURCE/advec_w_up.f90
- Timestamp:
- Nov 20, 2018 10:55:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_w_up.f90
r3255 r3538 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Remove unnecessary double-masking of topography 28 ! 29 ! 3255 2018-09-17 11:57:36Z suehring 27 30 ! Missing wall flags added 28 31 ! … … 107 110 108 111 USE indices, & 109 ONLY: nxl, nxr, nyn, nys, nzb, nzt , wall_flags_0112 ONLY: nxl, nxr, nyn, nys, nzb, nzt 110 113 111 114 USE kinds … … 131 134 IF ( ukomp > 0.0_wp ) THEN 132 135 tend(k,j,i) = tend(k,j,i) - ukomp * & 133 ( w(k,j,i) - w(k,j,i-1) ) * ddx & 134 * MERGE( 1.0_wp, 0.0_wp, & 135 BTEST( wall_flags_0(k,j,i), 3 ) ) 136 ( w(k,j,i) - w(k,j,i-1) ) * ddx 136 137 ELSE 137 138 tend(k,j,i) = tend(k,j,i) - ukomp * & 138 ( w(k,j,i+1) - w(k,j,i) ) * ddx & 139 * MERGE( 1.0_wp, 0.0_wp, & 140 BTEST( wall_flags_0(k,j,i), 3 ) ) 139 ( w(k,j,i+1) - w(k,j,i) ) * ddx 141 140 ENDIF 142 141 ! … … 146 145 IF ( vkomp > 0.0_wp ) THEN 147 146 tend(k,j,i) = tend(k,j,i) - vkomp * & 148 ( w(k,j,i) - w(k,j-1,i) ) * ddy & 149 * MERGE( 1.0_wp, 0.0_wp, & 150 BTEST( wall_flags_0(k,j,i), 3 ) ) 147 ( w(k,j,i) - w(k,j-1,i) ) * ddy 151 148 ELSE 152 149 tend(k,j,i) = tend(k,j,i) - vkomp * & 153 ( w(k,j+1,i) - w(k,j,i) ) * ddy & 154 * MERGE( 1.0_wp, 0.0_wp, & 155 BTEST( wall_flags_0(k,j,i), 3 ) ) 150 ( w(k,j+1,i) - w(k,j,i) ) * ddy 156 151 ENDIF 157 152 ! … … 159 154 IF ( w(k,j,i) > 0.0_wp ) THEN 160 155 tend(k,j,i) = tend(k,j,i) - w(k,j,i) * & 161 ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & 162 * MERGE( 1.0_wp, 0.0_wp, & 163 BTEST( wall_flags_0(k,j,i), 3 ) ) 156 ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) 164 157 ELSE 165 158 tend(k,j,i) = tend(k,j,i) - w(k,j,i) * & 166 ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & 167 * MERGE( 1.0_wp, 0.0_wp, & 168 BTEST( wall_flags_0(k,j,i), 3 ) ) 159 ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) 169 160 ENDIF 170 161 … … 193 184 194 185 USE indices, & 195 ONLY: nzb, nzt , wall_flags_0186 ONLY: nzb, nzt 196 187 197 188 USE kinds … … 215 206 IF ( ukomp > 0.0_wp ) THEN 216 207 tend(k,j,i) = tend(k,j,i) - ukomp * & 217 ( w(k,j,i) - w(k,j,i-1) ) * ddx & 218 * MERGE( 1.0_wp, 0.0_wp, & 219 BTEST( wall_flags_0(k,j,i), 3 ) ) 208 ( w(k,j,i) - w(k,j,i-1) ) * ddx 220 209 ELSE 221 210 tend(k,j,i) = tend(k,j,i) - ukomp * & 222 ( w(k,j,i+1) - w(k,j,i) ) * ddx & 223 * MERGE( 1.0_wp, 0.0_wp, & 224 BTEST( wall_flags_0(k,j,i), 3 ) ) 211 ( w(k,j,i+1) - w(k,j,i) ) * ddx 225 212 ENDIF 226 213 ! … … 230 217 IF ( vkomp > 0.0_wp ) THEN 231 218 tend(k,j,i) = tend(k,j,i) - vkomp * & 232 ( w(k,j,i) - w(k,j-1,i) ) * ddy & 233 * MERGE( 1.0_wp, 0.0_wp, & 234 BTEST( wall_flags_0(k,j,i), 3 ) ) 219 ( w(k,j,i) - w(k,j-1,i) ) * ddy 235 220 ELSE 236 221 tend(k,j,i) = tend(k,j,i) - vkomp * & 237 ( w(k,j+1,i) - w(k,j,i) ) * ddy & 238 * MERGE( 1.0_wp, 0.0_wp, & 239 BTEST( wall_flags_0(k,j,i), 3 ) ) 222 ( w(k,j+1,i) - w(k,j,i) ) * ddy 240 223 ENDIF 241 224 ! … … 243 226 IF ( w(k,j,i) > 0.0_wp ) THEN 244 227 tend(k,j,i) = tend(k,j,i) - w(k,j,i) * & 245 ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) & 246 * MERGE( 1.0_wp, 0.0_wp, & 247 BTEST( wall_flags_0(k,j,i), 3 ) ) 228 ( w(k,j,i) - w(k-1,j,i) ) * ddzw(k) 248 229 ELSE 249 230 tend(k,j,i) = tend(k,j,i) - w(k,j,i) * & 250 ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) & 251 * MERGE( 1.0_wp, 0.0_wp, & 252 BTEST( wall_flags_0(k,j,i), 3 ) ) 231 ( w(k+1,j,i) - w(k,j,i) ) * ddzw(k+1) 253 232 ENDIF 254 233
Note: See TracChangeset
for help on using the changeset viewer.