Changeset 1580
- Timestamp:
- Apr 10, 2015 1:43:49 PM (10 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/advec_ws.f90
r1572 r1580 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Bugfix: statistical evaluation of scalar fluxes in case of monotonic limiter. 23 23 ! 24 24 ! Former revisions: … … 1121 1121 1122 1122 ! 1123 !-- Evaluation of statistics. Please note, in case of using monotone limiter 1124 !-- vertical fluxes will be not calculated by the advective fluxes. 1125 IF ( .NOT. monotonic_adjustment ) THEN 1126 1127 SELECT CASE ( sk_char ) 1128 1129 CASE ( 'pt' ) 1130 1131 DO k = nzb, nzt 1132 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) + & 1133 ( flux_t(k) + diss_t(k) ) & 1134 * weight_substep(intermediate_timestep_count) 1135 ENDDO 1136 1137 CASE ( 'sa' ) 1138 1139 DO k = nzb, nzt 1140 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) + & 1141 ( flux_t(k) + diss_t(k) ) & 1142 * weight_substep(intermediate_timestep_count) 1143 ENDDO 1144 1145 CASE ( 'q' ) 1146 1147 DO k = nzb, nzt 1148 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) + & 1149 ( flux_t(k) + diss_t(k) ) & 1150 * weight_substep(intermediate_timestep_count) 1151 ENDDO 1152 1153 CASE ( 'qr' ) 1154 1155 DO k = nzb, nzt 1156 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) + & 1157 ( flux_t(k) + diss_t(k) ) & 1158 * weight_substep(intermediate_timestep_count) 1159 ENDDO 1160 1161 CASE ( 'nr' ) 1162 1163 DO k = nzb, nzt 1164 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) + & 1165 ( flux_t(k) + diss_t(k) ) & 1166 * weight_substep(intermediate_timestep_count) 1167 ENDDO 1168 1169 END SELECT 1170 ENDIF 1171 1123 !-- Evaluation of statistics. 1124 SELECT CASE ( sk_char ) 1125 1126 CASE ( 'pt' ) 1127 1128 DO k = nzb, nzt 1129 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) + & 1130 ( flux_t(k) + diss_t(k) ) & 1131 * weight_substep(intermediate_timestep_count) 1132 ENDDO 1133 1134 CASE ( 'sa' ) 1135 1136 DO k = nzb, nzt 1137 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) + & 1138 ( flux_t(k) + diss_t(k) ) & 1139 * weight_substep(intermediate_timestep_count) 1140 ENDDO 1141 1142 CASE ( 'q' ) 1143 1144 DO k = nzb, nzt 1145 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) + & 1146 ( flux_t(k) + diss_t(k) ) & 1147 * weight_substep(intermediate_timestep_count) 1148 ENDDO 1149 1150 CASE ( 'qr' ) 1151 1152 DO k = nzb, nzt 1153 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) + & 1154 ( flux_t(k) + diss_t(k) ) & 1155 * weight_substep(intermediate_timestep_count) 1156 ENDDO 1157 1158 CASE ( 'nr' ) 1159 1160 DO k = nzb, nzt 1161 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) + & 1162 ( flux_t(k) + diss_t(k) ) & 1163 * weight_substep(intermediate_timestep_count) 1164 ENDDO 1165 1166 END SELECT 1167 1172 1168 END SUBROUTINE advec_s_ws_ij 1173 1169 … … 3251 3247 ENDDO 3252 3248 ! 3253 !-- Evaluation of statistics. Please note, in case of using monotone 3254 !-- limiter vertical fluxes will be not calculated by the advective 3255 !-- fluxes. 3256 IF ( .NOT. monotonic_adjustment ) THEN 3257 3258 SELECT CASE ( sk_char ) 3259 3260 CASE ( 'pt' ) 3261 DO k = nzb, nzt 3262 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) & 3263 + ( flux_t(k) + diss_t(k) ) & 3264 * weight_substep(intermediate_timestep_count) 3265 ENDDO 3266 CASE ( 'sa' ) 3267 DO k = nzb, nzt 3268 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) & 3269 + ( flux_t(k) + diss_t(k) ) & 3270 * weight_substep(intermediate_timestep_count) 3271 ENDDO 3272 CASE ( 'q' ) 3273 DO k = nzb, nzt 3274 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) & 3275 + ( flux_t(k) + diss_t(k) ) & 3276 * weight_substep(intermediate_timestep_count) 3277 ENDDO 3278 CASE ( 'qr' ) 3279 DO k = nzb, nzt 3280 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) & 3281 + ( flux_t(k) + diss_t(k) ) & 3282 * weight_substep(intermediate_timestep_count) 3283 ENDDO 3284 CASE ( 'nr' ) 3285 DO k = nzb, nzt 3286 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) & 3287 + ( flux_t(k) + diss_t(k) ) & 3288 * weight_substep(intermediate_timestep_count) 3289 ENDDO 3290 3291 END SELECT 3292 3293 ENDIF 3249 !-- Evaluation of statistics. 3250 SELECT CASE ( sk_char ) 3251 3252 CASE ( 'pt' ) 3253 DO k = nzb, nzt 3254 sums_wspts_ws_l(k,tn) = sums_wspts_ws_l(k,tn) & 3255 + ( flux_t(k) + diss_t(k) ) & 3256 * weight_substep(intermediate_timestep_count) 3257 ENDDO 3258 CASE ( 'sa' ) 3259 DO k = nzb, nzt 3260 sums_wssas_ws_l(k,tn) = sums_wssas_ws_l(k,tn) & 3261 + ( flux_t(k) + diss_t(k) ) & 3262 * weight_substep(intermediate_timestep_count) 3263 ENDDO 3264 CASE ( 'q' ) 3265 DO k = nzb, nzt 3266 sums_wsqs_ws_l(k,tn) = sums_wsqs_ws_l(k,tn) & 3267 + ( flux_t(k) + diss_t(k) ) & 3268 * weight_substep(intermediate_timestep_count) 3269 ENDDO 3270 CASE ( 'qr' ) 3271 DO k = nzb, nzt 3272 sums_wsqrs_ws_l(k,tn) = sums_wsqrs_ws_l(k,tn) & 3273 + ( flux_t(k) + diss_t(k) ) & 3274 * weight_substep(intermediate_timestep_count) 3275 ENDDO 3276 CASE ( 'nr' ) 3277 DO k = nzb, nzt 3278 sums_wsnrs_ws_l(k,tn) = sums_wsnrs_ws_l(k,tn) & 3279 + ( flux_t(k) + diss_t(k) ) & 3280 * weight_substep(intermediate_timestep_count) 3281 ENDDO 3282 3283 END SELECT 3294 3284 3295 3285 ENDDO -
palm/trunk/SOURCE/init_grid.f90
r1576 r1580 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix: setting flags for 5th order scheme near buildings. 23 23 ! 24 24 ! Former revisions: … … 1243 1243 DO i = nxl, nxr 1244 1244 DO j = nys, nyn 1245 DO k = nzb_u_inner(j,i)+1, nzt 1245 DO k = nzb+1, nzt 1246 ! 1247 !-- At first, set flags to WS1. 1248 !-- Since fluxes are swapped in advec_ws.f90, this is necessary to 1249 !-- in order to handle the left/south flux. 1250 !-- near vertical walls. 1251 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 9 ) 1252 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 ) 1246 1253 ! 1247 1254 !-- u component - x-direction … … 1251 1258 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr ) & 1252 1259 ) THEN 1253 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 9 )1260 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 9 ) 1254 1261 ELSEIF ( k <= nzb_u_inner(j,i+2) .OR. k <= nzb_u_inner(j,i-1) & 1255 1262 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 )& … … 1257 1264 ) THEN 1258 1265 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 10 ) 1266 ! 1267 !-- Clear flag for WS1 1268 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 9 ) 1259 1269 ELSE 1260 1270 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 11 ) 1271 ! 1272 !-- Clear flag for WS1 1273 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 9 ) 1261 1274 ENDIF 1262 1263 1275 ! 1264 1276 !-- u component - y-direction … … 1267 1279 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1268 1280 .AND. j == nyn ) ) THEN 1269 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 )1281 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 ) 1270 1282 ELSEIF ( k <= nzb_u_inner(j+2,i) .OR. k <= nzb_u_inner(j-1,i) & 1271 1283 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & … … 1273 1285 ) THEN 1274 1286 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 13 ) 1287 ! 1288 !-- Clear flag for WS1 1289 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 12 ) 1275 1290 ELSE 1276 1291 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 14 ) 1292 ! 1293 !-- Clear flag for WS1 1294 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 12 ) 1277 1295 ENDIF 1278 1296 ! … … 1296 1314 DO i = nxl, nxr 1297 1315 DO j = nys, nyn 1298 DO k = nzb_v_inner(j,i)+1, nzt 1316 DO k = nzb+1, nzt 1317 ! 1318 !-- At first, set flags to WS1. 1319 !-- Since fluxes are swapped in advec_ws.f90, this is necessary to 1320 !-- in order to handle the left/south flux. 1321 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 ) 1322 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 ) 1299 1323 ! 1300 1324 !-- v component - x-direction … … 1303 1327 .AND. i == nxl ) .OR. (( inflow_r .OR. outflow_r ) & 1304 1328 .AND. i == nxr ) ) THEN 1305 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 )1329 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 ) 1306 1330 !-- WS3 1307 1331 ELSEIF ( k <= nzb_v_inner(j,i+2) .OR. k <= nzb_v_inner(j,i-1) & … … 1310 1334 ) THEN 1311 1335 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 19 ) 1336 ! 1337 !-- Clear flag for WS1 1338 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 18 ) 1312 1339 ELSE 1313 1340 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 20 ) 1341 ! 1342 !-- Clear flag for WS1 1343 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 18 ) 1314 1344 ENDIF 1315 1345 ! … … 1320 1350 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn ) & 1321 1351 ) THEN 1322 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 )1352 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 ) 1323 1353 ELSEIF ( k <= nzb_v_inner(j+2,i) .OR. k <= nzb_v_inner(j-1,i) & 1324 1354 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv+1 )& … … 1326 1356 ) THEN 1327 1357 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 22 ) 1358 ! 1359 !-- Clear flag for WS1 1360 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 21 ) 1328 1361 ELSE 1329 1362 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 23 ) 1363 ! 1364 !-- Clear flag for WS1 1365 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 21 ) 1330 1366 ENDIF 1331 1367 ! … … 1348 1384 DO i = nxl, nxr 1349 1385 DO j = nys, nyn 1350 DO k = nzb_w_inner(j,i), nzt 1386 DO k = nzb+1, nzt 1387 ! 1388 !-- At first, set flags to WS1. 1389 !-- Since fluxes are swapped in advec_ws.f90, this is necessary to 1390 !-- in order to handle the left/south flux. 1391 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 ) 1392 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 ) 1351 1393 ! 1352 1394 !-- w component - x-direction … … 1355 1397 .AND. i == nxl ) .OR. ( ( inflow_r .OR. outflow_r ) & 1356 1398 .AND. i == nxr ) ) THEN 1357 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 )1399 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 ) 1358 1400 ELSEIF ( k <= nzb_w_inner(j,i+2) .OR. k <= nzb_w_inner(j,i-1) & 1359 1401 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 ) & … … 1361 1403 ) THEN 1362 1404 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 28 ) 1405 ! 1406 !-- Clear flag for WS1 1407 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 27 ) 1363 1408 ELSE 1364 1409 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i),29 ) 1410 ! 1411 !-- Clear flag for WS1 1412 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 27 ) 1365 1413 ENDIF 1366 1414 ! … … 1370 1418 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1371 1419 .AND. j == nyn ) ) THEN 1372 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 )1420 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 ) 1373 1421 ELSEIF ( k <= nzb_w_inner(j+2,i) .OR. k <= nzb_w_inner(j-1,i) & 1374 1422 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & … … 1376 1424 ) THEN 1377 1425 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 31 ) 1426 ! 1427 !-- Clear flag for WS1 1428 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 30 ) 1378 1429 ELSE 1379 1430 wall_flags_00(k,j,i) = IBSET( wall_flags_00(k,j,i), 0 ) 1431 ! 1432 !-- Clear flag for WS1 1433 wall_flags_0(k,j,i) = IBCLR( wall_flags_0(k,j,i), 30 ) 1380 1434 ENDIF 1381 1435 !
Note: See TracChangeset
for help on using the changeset viewer.