Changeset 87
- Timestamp:
- May 22, 2007 3:46:47 PM (18 years ago)
- Location:
- palm/trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_3.5.4.html
r62 r87 1 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> 2 2 <html><head> 3 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM 4 chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <meta name="KEYWORDS" content="parallel LES model"> <style> 3 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <meta name="KEYWORDS" content="parallel LES model"> <style> 5 4 <!-- 6 5 @page { size: 21cm 29.7cm } … … 14 13 quantities which are not part of PALM's standard output. The basic user 15 14 interface includes a number of subroutines which allow the calculation 16 of user-defined quantities and output of these quantities as 2d cross15 of user-defined quantities and output of these quantities as time series, (horizontally averaged) vertical profile, 2d cross 17 16 section or 3d volume data. The respective subroutines 18 contain as 19 an example code lines (written as comment lines) for calculating and 20 output the square of the u-component velocity (note: this quantity 17 contain sample code lines (written as comment lines) for defining, calculating and 18 output of such quantities.<br><br>The 19 rest of this chapter explains step-by-step how to modify/extend the 20 default file user_interface.f90 in order to generate the respective output.<br><br><br><br><h4><span style="font-weight: bold;">Output of 2d cross sections or 3d volume data</span></h4><br>This example shows the output of the 21 quantity "square of the u-component" (<span style="font-weight: bold;">Note:</span> this quantity 21 22 could of course easily be calculated from the u-component by 22 23 postprocessing the PALM output so that calculation within PALM is not 23 necessarily required).<br><br>The 24 rest of this chapter explains step-by-step how to modify/extend the 25 default file user_interface.f90 in order to generate output of the 26 quantity "square of the u-component". If more than one user-defined 24 necessarily required). If more than one user-defined 27 25 quantity shall be output, these steps have to be carried out in the 28 26 same way for each of the quantities.<br><br><ol><li>The -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r86 r87 1 1 New: 2 2 --- 3 Calculation and output of user-defined profiles. New &userpar parameters data_output_pr_user and max_pr_user. 4 5 check_parameters, flow_statistics, modules, parin, read_var_list, user_interface, write_var_list 3 6 4 7 5 8 Changed: 6 9 ------- 7 Division through dt_3d replaced by multiplication of the inverse. For performance optimisation, this is done in the loop calculating the divergence instead of using a seperate loop. (pres.f90) 10 Division through dt_3d replaced by multiplication of the inverse. For performance optimisation, this is done in the loop calculating the divergence instead of using a seperate loop. (pres.f90) var_hom and var_sum renamed pr_palm. 8 11 9 pres 12 data_output_profiles, flow_statistics, init_3d_model, modules, parin, pres, read_var_list, run_control, time_integration 10 13 11 14 … … 16 19 Bugfix: field_chr renamed field_char (user_interface). 17 20 18 poisfft, user_interface 21 Bugfix: output of use_upstream_for_tke (header). 22 23 header, poisfft, user_interface -
palm/trunk/SOURCE/check_parameters.f90
r77 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Check for user-defined profiles 7 7 ! 8 8 ! Former revisions: … … 1214 1214 CASE ( 'u', '#u' ) 1215 1215 dopr_index(i) = 1 1216 dopr_unit(i) = 'm/s' 1216 1217 hom(:,2,1,:) = SPREAD( zu, 2, statistic_regions+1 ) 1217 1218 IF ( data_output_pr(i)(1:1) == '#' ) THEN … … 1223 1224 CASE ( 'v', '#v' ) 1224 1225 dopr_index(i) = 2 1225 hom(:,2,2,:) = SPREAD( zu, 2, statistic_regions+1 ) 1226 dopr_unit(i) = 'm/s' 1227 hom(:,2,2,:) = SPREAD( zu, 2, statistic_regions+1 ) 1226 1228 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1227 1229 dopr_initial_index(i) = 6 … … 1232 1234 CASE ( 'w' ) 1233 1235 dopr_index(i) = 3 1234 hom(:,2,3,:) = SPREAD( zw, 2, statistic_regions+1 ) 1236 dopr_unit(i) = 'm/s' 1237 hom(:,2,3,:) = SPREAD( zw, 2, statistic_regions+1 ) 1235 1238 1236 1239 CASE ( 'pt', '#pt' ) 1237 1240 IF ( .NOT. cloud_physics ) THEN 1238 1241 dopr_index(i) = 4 1242 dopr_unit(i) = 'K' 1243 hom(:,2,4,:) = SPREAD( zu, 2, statistic_regions+1 ) 1244 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1245 dopr_initial_index(i) = 7 1246 hom(:,2,7,:) = SPREAD( zu, 2, statistic_regions+1 ) 1247 hom(nzb,2,7,:) = 0.0 ! because zu(nzb) is negative 1248 data_output_pr(i) = data_output_pr(i)(2:) 1249 ENDIF 1250 ELSE 1251 dopr_index(i) = 43 1252 dopr_unit(i) = 'K' 1253 hom(:,2,43,:) = SPREAD( zu, 2, statistic_regions+1 ) 1254 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1255 dopr_initial_index(i) = 28 1256 hom(:,2,28,:) = SPREAD( zu, 2, statistic_regions+1 ) 1257 hom(nzb,2,28,:) = 0.0 ! because zu(nzb) is negative 1258 data_output_pr(i) = data_output_pr(i)(2:) 1259 ENDIF 1260 ENDIF 1261 1262 CASE ( 'e' ) 1263 dopr_index(i) = 8 1264 dopr_unit(i) = 'm2/s2' 1265 hom(:,2,8,:) = SPREAD( zu, 2, statistic_regions+1 ) 1266 hom(nzb,2,8,:) = 0.0 1267 1268 CASE ( 'km', '#km' ) 1269 dopr_index(i) = 9 1270 dopr_unit(i) = 'm2/s' 1271 hom(:,2,9,:) = SPREAD( zu, 2, statistic_regions+1 ) 1272 hom(nzb,2,9,:) = 0.0 1273 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1274 dopr_initial_index(i) = 23 1275 hom(:,2,23,:) = hom(:,2,9,:) 1276 data_output_pr(i) = data_output_pr(i)(2:) 1277 ENDIF 1278 1279 CASE ( 'kh', '#kh' ) 1280 dopr_index(i) = 10 1281 dopr_unit(i) = 'm2/s' 1282 hom(:,2,10,:) = SPREAD( zu, 2, statistic_regions+1 ) 1283 hom(nzb,2,10,:) = 0.0 1284 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1285 dopr_initial_index(i) = 24 1286 hom(:,2,24,:) = hom(:,2,10,:) 1287 data_output_pr(i) = data_output_pr(i)(2:) 1288 ENDIF 1289 1290 CASE ( 'l', '#l' ) 1291 dopr_index(i) = 11 1292 dopr_unit(i) = 'm' 1293 hom(:,2,11,:) = SPREAD( zu, 2, statistic_regions+1 ) 1294 hom(nzb,2,11,:) = 0.0 1295 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1296 dopr_initial_index(i) = 25 1297 hom(:,2,25,:) = hom(:,2,11,:) 1298 data_output_pr(i) = data_output_pr(i)(2:) 1299 ENDIF 1300 1301 CASE ( 'w"u"' ) 1302 dopr_index(i) = 12 1303 dopr_unit(i) = 'm2/s2' 1304 hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 ) 1305 IF ( prandtl_layer ) hom(nzb,2,12,:) = zu(1) 1306 1307 CASE ( 'w*u*' ) 1308 dopr_index(i) = 13 1309 dopr_unit(i) = 'm2/s2' 1310 hom(:,2,13,:) = SPREAD( zw, 2, statistic_regions+1 ) 1311 1312 CASE ( 'w"v"' ) 1313 dopr_index(i) = 14 1314 dopr_unit(i) = 'm2/s2' 1315 hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 ) 1316 IF ( prandtl_layer ) hom(nzb,2,14,:) = zu(1) 1317 1318 CASE ( 'w*v*' ) 1319 dopr_index(i) = 15 1320 dopr_unit(i) = 'm2/s2' 1321 hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 ) 1322 1323 CASE ( 'w"pt"' ) 1324 dopr_index(i) = 16 1325 dopr_unit(i) = 'K m/s' 1326 hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 ) 1327 1328 CASE ( 'w*pt*' ) 1329 dopr_index(i) = 17 1330 dopr_unit(i) = 'K m/s' 1331 hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 ) 1332 1333 CASE ( 'wpt' ) 1334 dopr_index(i) = 18 1335 dopr_unit(i) = 'K m/s' 1336 hom(:,2,18,:) = SPREAD( zw, 2, statistic_regions+1 ) 1337 1338 CASE ( 'wu' ) 1339 dopr_index(i) = 19 1340 dopr_unit(i) = 'm2/s2' 1341 hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 ) 1342 IF ( prandtl_layer ) hom(nzb,2,19,:) = zu(1) 1343 1344 CASE ( 'wv' ) 1345 dopr_index(i) = 20 1346 dopr_unit(i) = 'm2/s2' 1347 hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 ) 1348 IF ( prandtl_layer ) hom(nzb,2,20,:) = zu(1) 1349 1350 CASE ( 'w*pt*BC' ) 1351 dopr_index(i) = 21 1352 dopr_unit(i) = 'K m/s' 1353 hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 ) 1354 1355 CASE ( 'wptBC' ) 1356 dopr_index(i) = 22 1357 dopr_unit(i) = 'K m/s' 1358 hom(:,2,22,:) = SPREAD( zw, 2, statistic_regions+1 ) 1359 1360 CASE ( 'u*2' ) 1361 dopr_index(i) = 30 1362 dopr_unit(i) = 'm2/s2' 1363 hom(:,2,30,:) = SPREAD( zu, 2, statistic_regions+1 ) 1364 1365 CASE ( 'v*2' ) 1366 dopr_index(i) = 31 1367 dopr_unit(i) = 'm2/s2' 1368 hom(:,2,31,:) = SPREAD( zu, 2, statistic_regions+1 ) 1369 1370 CASE ( 'w*2' ) 1371 dopr_index(i) = 32 1372 dopr_unit(i) = 'm2/s2' 1373 hom(:,2,32,:) = SPREAD( zw, 2, statistic_regions+1 ) 1374 1375 CASE ( 'pt*2' ) 1376 dopr_index(i) = 33 1377 dopr_unit(i) = 'K2' 1378 hom(:,2,33,:) = SPREAD( zu, 2, statistic_regions+1 ) 1379 1380 CASE ( 'e*' ) 1381 dopr_index(i) = 34 1382 dopr_unit(i) = 'm2/s2' 1383 hom(:,2,34,:) = SPREAD( zu, 2, statistic_regions+1 ) 1384 1385 CASE ( 'w*2pt*' ) 1386 dopr_index(i) = 35 1387 dopr_unit(i) = 'K m2/s2' 1388 hom(:,2,35,:) = SPREAD( zw, 2, statistic_regions+1 ) 1389 1390 CASE ( 'w*pt*2' ) 1391 dopr_index(i) = 36 1392 dopr_unit(i) = 'K2 m/s' 1393 hom(:,2,36,:) = SPREAD( zw, 2, statistic_regions+1 ) 1394 1395 CASE ( 'w*e*' ) 1396 dopr_index(i) = 37 1397 dopr_unit(i) = 'm3/s3' 1398 hom(:,2,37,:) = SPREAD( zw, 2, statistic_regions+1 ) 1399 1400 CASE ( 'w*3' ) 1401 dopr_index(i) = 38 1402 dopr_unit(i) = 'm3/s3' 1403 hom(:,2,38,:) = SPREAD( zw, 2, statistic_regions+1 ) 1404 1405 CASE ( 'Sw' ) 1406 dopr_index(i) = 39 1407 hom(:,2,39,:) = SPREAD( zw, 2, statistic_regions+1 ) 1408 1409 CASE ( 'q', '#q' ) 1410 IF ( .NOT. cloud_physics ) THEN 1411 IF ( myid == 0 ) THEN 1412 PRINT*, '+++ check_parameters: data_output_pr = ', & 1413 data_output_pr(i), & 1414 ' is not implemented for cloud_physics = FALSE' 1415 ENDIF 1416 CALL local_stop 1417 ELSE 1418 dopr_index(i) = 41 1419 dopr_unit(i) = 'kg/kg' 1420 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) 1421 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1422 dopr_initial_index(i) = 26 1423 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) 1424 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist 1425 data_output_pr(i) = data_output_pr(i)(2:) 1426 ENDIF 1427 ENDIF 1428 1429 CASE ( 's', '#s' ) 1430 IF ( .NOT. passive_scalar ) THEN 1431 IF ( myid == 0 ) THEN 1432 PRINT*, '+++ check_parameters: data_output_pr = ', & 1433 data_output_pr(i), & 1434 ' is not implemented for passive_scalar = FALSE' 1435 ENDIF 1436 CALL local_stop 1437 ELSE 1438 dopr_index(i) = 41 1439 dopr_unit(i) = 'kg/m3' 1440 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) 1441 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1442 dopr_initial_index(i) = 26 1443 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) 1444 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist 1445 data_output_pr(i) = data_output_pr(i)(2:) 1446 ENDIF 1447 ENDIF 1448 1449 CASE ( 'qv', '#qv' ) 1450 IF ( .NOT. cloud_physics ) THEN 1451 dopr_index(i) = 41 1452 dopr_unit(i) = 'kg/kg' 1453 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 ) 1454 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1455 dopr_initial_index(i) = 26 1456 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 ) 1457 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist 1458 data_output_pr(i) = data_output_pr(i)(2:) 1459 ENDIF 1460 ELSE 1461 dopr_index(i) = 42 1462 dopr_unit(i) = 'kg/kg' 1463 hom(:,2,42,:) = SPREAD( zu, 2, statistic_regions+1 ) 1464 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1465 dopr_initial_index(i) = 27 1466 hom(:,2,27,:) = SPREAD( zu, 2, statistic_regions+1 ) 1467 hom(nzb,2,27,:) = 0.0 ! weil zu(nzb) negativ ist 1468 data_output_pr(i) = data_output_pr(i)(2:) 1469 ENDIF 1470 ENDIF 1471 1472 CASE ( 'lpt', '#lpt' ) 1473 IF ( .NOT. cloud_physics ) THEN 1474 IF ( myid == 0 ) THEN 1475 PRINT*, '+++ check_parameters: data_output_pr = ', & 1476 data_output_pr(i), & 1477 ' is not implemented for cloud_physics = FALSE' 1478 ENDIF 1479 CALL local_stop 1480 ELSE 1481 dopr_index(i) = 4 1482 dopr_unit(i) = 'K' 1239 1483 hom(:,2,4,:) = SPREAD( zu, 2, statistic_regions+1 ) 1240 1484 IF ( data_output_pr(i)(1:1) == '#' ) THEN … … 1244 1488 data_output_pr(i) = data_output_pr(i)(2:) 1245 1489 ENDIF 1246 ELSE1247 dopr_index(i) = 431248 hom(:,2,43,:) = SPREAD( zu, 2, statistic_regions+1 )1249 IF ( data_output_pr(i)(1:1) == '#' ) THEN1250 dopr_initial_index(i) = 281251 hom(:,2,28,:) = SPREAD( zu, 2, statistic_regions+1 )1252 hom(nzb,2,28,:) = 0.0 ! weil zu(nzb) negativ ist1253 data_output_pr(i) = data_output_pr(i)(2:)1254 ENDIF1255 ENDIF1256 1257 CASE ( 'e' )1258 dopr_index(i) = 81259 hom(:,2,8,:) = SPREAD( zu, 2, statistic_regions+1 )1260 hom(nzb,2,8,:) = 0.01261 1262 CASE ( 'km', '#km' )1263 dopr_index(i) = 91264 hom(:,2,9,:) = SPREAD( zu, 2, statistic_regions+1 )1265 hom(nzb,2,9,:) = 0.01266 IF ( data_output_pr(i)(1:1) == '#' ) THEN1267 dopr_initial_index(i) = 231268 hom(:,2,23,:) = hom(:,2,9,:)1269 data_output_pr(i) = data_output_pr(i)(2:)1270 ENDIF1271 1272 CASE ( 'kh', '#kh' )1273 dopr_index(i) = 101274 hom(:,2,10,:) = SPREAD( zu, 2, statistic_regions+1 )1275 hom(nzb,2,10,:) = 0.01276 IF ( data_output_pr(i)(1:1) == '#' ) THEN1277 dopr_initial_index(i) = 241278 hom(:,2,24,:) = hom(:,2,10,:)1279 data_output_pr(i) = data_output_pr(i)(2:)1280 ENDIF1281 1282 CASE ( 'l', '#l' )1283 dopr_index(i) = 111284 hom(:,2,11,:) = SPREAD( zu, 2, statistic_regions+1 )1285 hom(nzb,2,11,:) = 0.01286 IF ( data_output_pr(i)(1:1) == '#' ) THEN1287 dopr_initial_index(i) = 251288 hom(:,2,25,:) = hom(:,2,11,:)1289 data_output_pr(i) = data_output_pr(i)(2:)1290 ENDIF1291 1292 CASE ( 'w"u"' )1293 dopr_index(i) = 121294 hom(:,2,12,:) = SPREAD( zw, 2, statistic_regions+1 )1295 IF ( prandtl_layer ) hom(nzb,2,12,:) = zu(1)1296 1297 CASE ( 'w*u*' )1298 dopr_index(i) = 131299 hom(:,2,13,:) = SPREAD( zw, 2, statistic_regions+1 )1300 1301 CASE ( 'w"v"' )1302 dopr_index(i) = 141303 hom(:,2,14,:) = SPREAD( zw, 2, statistic_regions+1 )1304 IF ( prandtl_layer ) hom(nzb,2,14,:) = zu(1)1305 1306 CASE ( 'w*v*' )1307 dopr_index(i) = 151308 hom(:,2,15,:) = SPREAD( zw, 2, statistic_regions+1 )1309 1310 CASE ( 'w"pt"' )1311 dopr_index(i) = 161312 hom(:,2,16,:) = SPREAD( zw, 2, statistic_regions+1 )1313 1314 CASE ( 'w*pt*' )1315 dopr_index(i) = 171316 hom(:,2,17,:) = SPREAD( zw, 2, statistic_regions+1 )1317 1318 CASE ( 'wpt' )1319 dopr_index(i) = 181320 hom(:,2,18,:) = SPREAD( zw, 2, statistic_regions+1 )1321 1322 CASE ( 'wu' )1323 dopr_index(i) = 191324 hom(:,2,19,:) = SPREAD( zw, 2, statistic_regions+1 )1325 IF ( prandtl_layer ) hom(nzb,2,19,:) = zu(1)1326 1327 CASE ( 'wv' )1328 dopr_index(i) = 201329 hom(:,2,20,:) = SPREAD( zw, 2, statistic_regions+1 )1330 IF ( prandtl_layer ) hom(nzb,2,20,:) = zu(1)1331 1332 CASE ( 'w*pt*BC' )1333 dopr_index(i) = 211334 hom(:,2,21,:) = SPREAD( zw, 2, statistic_regions+1 )1335 1336 CASE ( 'wptBC' )1337 dopr_index(i) = 221338 hom(:,2,22,:) = SPREAD( zw, 2, statistic_regions+1 )1339 1340 CASE ( 'u*2' )1341 dopr_index(i) = 301342 hom(:,2,30,:) = SPREAD( zu, 2, statistic_regions+1 )1343 1344 CASE ( 'v*2' )1345 dopr_index(i) = 311346 hom(:,2,31,:) = SPREAD( zu, 2, statistic_regions+1 )1347 1348 CASE ( 'w*2' )1349 dopr_index(i) = 321350 hom(:,2,32,:) = SPREAD( zw, 2, statistic_regions+1 )1351 1352 CASE ( 'pt*2' )1353 dopr_index(i) = 331354 hom(:,2,33,:) = SPREAD( zu, 2, statistic_regions+1 )1355 1356 CASE ( 'e*' )1357 dopr_index(i) = 341358 hom(:,2,34,:) = SPREAD( zu, 2, statistic_regions+1 )1359 1360 CASE ( 'w*2pt*' )1361 dopr_index(i) = 351362 hom(:,2,35,:) = SPREAD( zw, 2, statistic_regions+1 )1363 1364 CASE ( 'w*pt*2' )1365 dopr_index(i) = 361366 hom(:,2,36,:) = SPREAD( zw, 2, statistic_regions+1 )1367 1368 CASE ( 'w*e*' )1369 dopr_index(i) = 371370 hom(:,2,37,:) = SPREAD( zw, 2, statistic_regions+1 )1371 1372 CASE ( 'w*3' )1373 dopr_index(i) = 381374 hom(:,2,38,:) = SPREAD( zw, 2, statistic_regions+1 )1375 1376 CASE ( 'Sw' )1377 dopr_index(i) = 391378 hom(:,2,39,:) = SPREAD( zw, 2, statistic_regions+1 )1379 1380 CASE ( 'q', '#q' )1381 IF ( .NOT. cloud_physics ) THEN1382 IF ( myid == 0 ) THEN1383 PRINT*, '+++ check_parameters: data_output_pr = ', &1384 data_output_pr(i), &1385 ' is not implemented for cloud_physics = FALSE'1386 ENDIF1387 CALL local_stop1388 ELSE1389 dopr_index(i) = 411390 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 )1391 IF ( data_output_pr(i)(1:1) == '#' ) THEN1392 dopr_initial_index(i) = 261393 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 )1394 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist1395 data_output_pr(i) = data_output_pr(i)(2:)1396 ENDIF1397 ENDIF1398 1399 CASE ( 's', '#s' )1400 IF ( .NOT. passive_scalar ) THEN1401 IF ( myid == 0 ) THEN1402 PRINT*, '+++ check_parameters: data_output_pr = ', &1403 data_output_pr(i), &1404 ' is not implemented for passive_scalar = FALSE'1405 ENDIF1406 CALL local_stop1407 ELSE1408 dopr_index(i) = 411409 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 )1410 IF ( data_output_pr(i)(1:1) == '#' ) THEN1411 dopr_initial_index(i) = 261412 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 )1413 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist1414 data_output_pr(i) = data_output_pr(i)(2:)1415 ENDIF1416 ENDIF1417 1418 CASE ( 'qv', '#qv' )1419 IF ( .NOT. cloud_physics ) THEN1420 dopr_index(i) = 411421 hom(:,2,41,:) = SPREAD( zu, 2, statistic_regions+1 )1422 IF ( data_output_pr(i)(1:1) == '#' ) THEN1423 dopr_initial_index(i) = 261424 hom(:,2,26,:) = SPREAD( zu, 2, statistic_regions+1 )1425 hom(nzb,2,26,:) = 0.0 ! weil zu(nzb) negativ ist1426 data_output_pr(i) = data_output_pr(i)(2:)1427 ENDIF1428 ELSE1429 dopr_index(i) = 421430 hom(:,2,42,:) = SPREAD( zu, 2, statistic_regions+1 )1431 IF ( data_output_pr(i)(1:1) == '#' ) THEN1432 dopr_initial_index(i) = 271433 hom(:,2,27,:) = SPREAD( zu, 2, statistic_regions+1 )1434 hom(nzb,2,27,:) = 0.0 ! weil zu(nzb) negativ ist1435 data_output_pr(i) = data_output_pr(i)(2:)1436 ENDIF1437 ENDIF1438 1439 CASE ( 'lpt', '#lpt' )1440 IF ( .NOT. cloud_physics ) THEN1441 IF ( myid == 0 ) THEN1442 PRINT*, '+++ check_parameters: data_output_pr = ', &1443 data_output_pr(i), &1444 ' is not implemented for cloud_physics = FALSE'1445 ENDIF1446 CALL local_stop1447 ELSE1448 dopr_index(i) = 41449 hom(:,2,4,:) = SPREAD( zu, 2, statistic_regions+1 )1450 IF ( data_output_pr(i)(1:1) == '#' ) THEN1451 dopr_initial_index(i) = 71452 hom(:,2,7,:) = SPREAD( zu, 2, statistic_regions+1 )1453 hom(nzb,2,7,:) = 0.0 ! weil zu(nzb) negativ ist1454 data_output_pr(i) = data_output_pr(i)(2:)1455 ENDIF1456 1490 ENDIF 1457 1491 1458 1492 CASE ( 'vpt', '#vpt' ) 1459 1493 dopr_index(i) = 44 1460 hom(:,2,44,:) = SPREAD( zu, 2, statistic_regions+1 ) 1494 dopr_unit(i) = 'K' 1495 hom(:,2,44,:) = SPREAD( zu, 2, statistic_regions+1 ) 1461 1496 IF ( data_output_pr(i)(1:1) == '#' ) THEN 1462 1497 dopr_initial_index(i) = 29 … … 1468 1503 CASE ( 'w"vpt"' ) 1469 1504 dopr_index(i) = 45 1505 dopr_unit(i) = 'K m/s' 1470 1506 hom(:,2,45,:) = SPREAD( zw, 2, statistic_regions+1 ) 1471 1507 1472 1508 CASE ( 'w*vpt*' ) 1473 1509 dopr_index(i) = 46 1510 dopr_unit(i) = 'K m/s' 1474 1511 hom(:,2,46,:) = SPREAD( zw, 2, statistic_regions+1 ) 1475 1512 1476 1513 CASE ( 'wvpt' ) 1477 1514 dopr_index(i) = 47 1515 dopr_unit(i) = 'K m/s' 1478 1516 hom(:,2,47,:) = SPREAD( zw, 2, statistic_regions+1 ) 1479 1517 … … 1488 1526 ELSE 1489 1527 dopr_index(i) = 48 1528 dopr_unit(i) = 'kg/kg m/s' 1490 1529 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 1491 1530 ENDIF … … 1501 1540 ELSE 1502 1541 dopr_index(i) = 49 1542 dopr_unit(i) = 'kg/kg m/s' 1503 1543 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 1504 1544 ENDIF … … 1514 1554 ELSE 1515 1555 dopr_index(i) = 50 1556 dopr_unit(i) = 'kg/kg m/s' 1516 1557 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 1517 1558 ENDIF … … 1527 1568 ELSE 1528 1569 dopr_index(i) = 48 1570 dopr_unit(i) = 'kg/m3 m/s' 1529 1571 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 1530 1572 ENDIF … … 1540 1582 ELSE 1541 1583 dopr_index(i) = 49 1584 dopr_unit(i) = 'kg/m3 m/s' 1542 1585 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 1543 1586 ENDIF … … 1553 1596 ELSE 1554 1597 dopr_index(i) = 50 1598 dopr_unit(i) = 'kg/m3 m/s' 1555 1599 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 1556 1600 ENDIF … … 1560 1604 THEN 1561 1605 dopr_index(i) = 48 1606 dopr_unit(i) = 'kg/kg m/s' 1562 1607 hom(:,2,48,:) = SPREAD( zw, 2, statistic_regions+1 ) 1563 1608 ELSEIF( humidity .AND. cloud_physics ) THEN 1564 1609 dopr_index(i) = 51 1610 dopr_unit(i) = 'kg/kg m/s' 1565 1611 hom(:,2,51,:) = SPREAD( zw, 2, statistic_regions+1 ) 1566 1612 ELSE … … 1578 1624 THEN 1579 1625 dopr_index(i) = 49 1626 dopr_unit(i) = 'kg/kg m/s' 1580 1627 hom(:,2,49,:) = SPREAD( zw, 2, statistic_regions+1 ) 1581 1628 ELSEIF( humidity .AND. cloud_physics ) THEN 1582 1629 dopr_index(i) = 52 1630 dopr_unit(i) = 'kg/kg m/s' 1583 1631 hom(:,2,52,:) = SPREAD( zw, 2, statistic_regions+1 ) 1584 1632 ELSE … … 1596 1644 THEN 1597 1645 dopr_index(i) = 50 1646 dopr_unit(i) = 'kg/kg m/s' 1598 1647 hom(:,2,50,:) = SPREAD( zw, 2, statistic_regions+1 ) 1599 1648 ELSEIF( humidity .AND. cloud_physics ) THEN 1600 1649 dopr_index(i) = 53 1650 dopr_unit(i) = 'kg/kg m/s' 1601 1651 hom(:,2,53,:) = SPREAD( zw, 2, statistic_regions+1 ) 1602 1652 ELSE … … 1620 1670 ELSE 1621 1671 dopr_index(i) = 54 1672 dopr_unit(i) = 'kg/kg' 1622 1673 hom(:,2,54,:) = SPREAD( zu, 2, statistic_regions+1 ) 1623 1674 ENDIF … … 1625 1676 CASE ( 'w*u*u*/dz' ) 1626 1677 dopr_index(i) = 55 1678 dopr_unit(i) = 'm2/s3' 1627 1679 hom(:,2,55,:) = SPREAD( zu, 2, statistic_regions+1 ) 1628 1680 1629 1681 CASE ( 'w*p*/dz' ) 1630 1682 dopr_index(i) = 56 1683 dopr_unit(i) = 'm2/s3' 1631 1684 hom(:,2,56,:) = SPREAD( zu, 2, statistic_regions+1 ) 1632 1685 1633 1686 CASE ( 'w"e/dz' ) 1634 1687 dopr_index(i) = 57 1688 dopr_unit(i) = 'm2/s3' 1635 1689 hom(:,2,57,:) = SPREAD( zu, 2, statistic_regions+1 ) 1636 1690 1637 1691 CASE ( 'u"pt"' ) 1638 1692 dopr_index(i) = 58 1693 dopr_unit(i) = 'K m/s' 1639 1694 hom(:,2,58,:) = SPREAD( zu, 2, statistic_regions+1 ) 1640 1695 1641 1696 CASE ( 'u*pt*' ) 1642 1697 dopr_index(i) = 59 1698 dopr_unit(i) = 'K m/s' 1643 1699 hom(:,2,59,:) = SPREAD( zu, 2, statistic_regions+1 ) 1644 1700 1645 1701 CASE ( 'upt_t' ) 1646 1702 dopr_index(i) = 60 1703 dopr_unit(i) = 'K m/s' 1647 1704 hom(:,2,60,:) = SPREAD( zu, 2, statistic_regions+1 ) 1648 1705 1649 1706 CASE ( 'v"pt"' ) 1650 1707 dopr_index(i) = 61 1708 dopr_unit(i) = 'K m/s' 1651 1709 hom(:,2,61,:) = SPREAD( zu, 2, statistic_regions+1 ) 1652 1710 1653 1711 CASE ( 'v*pt*' ) 1654 1712 dopr_index(i) = 62 1713 dopr_unit(i) = 'K m/s' 1655 1714 hom(:,2,62,:) = SPREAD( zu, 2, statistic_regions+1 ) 1656 1715 1657 1716 CASE ( 'vpt_t' ) 1658 1717 dopr_index(i) = 63 1718 dopr_unit(i) = 'K m/s' 1659 1719 hom(:,2,63,:) = SPREAD( zu, 2, statistic_regions+1 ) 1660 1720 1661 1721 1662 1722 CASE DEFAULT 1663 IF ( myid == 0 ) THEN 1664 PRINT*, '+++ check_parameters: unknown output profile: ', & 1665 'data_output_pr = ', data_output_pr(i) 1666 ENDIF 1667 CALL local_stop 1723 1724 CALL user_check_data_output_pr( data_output_pr(i), i, unit ) 1725 1726 IF ( unit == 'illegal' ) THEN 1727 IF ( myid == 0 ) THEN 1728 IF ( data_output_pr_user(1) /= ' ' ) THEN 1729 PRINT*, '+++ check_parameters: illegal value for data_',& 1730 'output_pr or data_output_pr_user: "', & 1731 TRIM( data_output_pr(i) ), '"' 1732 ELSE 1733 PRINT*, '+++ check_parameters: illegal value for data_',& 1734 'output_pr: "', TRIM( data_output_pr(i) ),'"' 1735 ENDIF 1736 ENDIF 1737 CALL local_stop 1738 ENDIF 1668 1739 1669 1740 END SELECT -
palm/trunk/SOURCE/data_output_profiles.f90
r4 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! var_hom renamed pr_palm 7 7 ! 8 8 ! Former revisions: … … 111 111 112 112 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(2), & ! ws2 113 (/ hom_sum(nzb+8, var_hom,normalizing_region)**2 /), &113 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**2 /), & 114 114 start = (/ 1 /), count = (/ 1 /) ) 115 115 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 331 ) 116 116 117 117 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(3), & ! tsw2 118 (/ hom_sum(nzb+3, var_hom,normalizing_region)**2 /), &118 (/ hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), & 119 119 start = (/ 1 /), count = (/ 1 /) ) 120 120 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 332 ) 121 121 122 122 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(4), & ! ws3 123 (/ hom_sum(nzb+8, var_hom,normalizing_region)**3 /), &123 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 /), & 124 124 start = (/ 1 /), count = (/ 1 /) ) 125 125 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 333 ) 126 126 127 127 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(5), & ! ws2tsw 128 (/ hom_sum(nzb+8, var_hom,normalizing_region)**3 * &129 hom_sum(nzb+3, var_hom,normalizing_region) /), &128 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 * & 129 hom_sum(nzb+3,pr_palm,normalizing_region) /), & 130 130 start = (/ 1 /), count = (/ 1 /) ) 131 131 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 334 ) 132 132 133 133 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(6), & ! wstsw2 134 (/ hom_sum(nzb+8, var_hom,normalizing_region) * &135 hom_sum(nzb+3, var_hom,normalizing_region)**2 /), &134 (/ hom_sum(nzb+8,pr_palm,normalizing_region) * & 135 hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), & 136 136 start = (/ 1 /), count = (/ 1 /) ) 137 137 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 335 ) 138 138 139 139 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(7), & ! z_i 140 (/ hom_sum(nzb+6, var_hom,normalizing_region) /), &140 (/ hom_sum(nzb+6,pr_palm,normalizing_region) /), & 141 141 start = (/ 1 /), count = (/ 1 /) ) 142 142 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 336 ) … … 237 237 CASE ( 'ts2' ) 238 238 cross_normx_factor(k,j) = & 239 ( hom_sum(nzb+3, var_hom,normalizing_region) )**2239 ( hom_sum(nzb+3,pr_palm,normalizing_region) )**2 240 240 CASE ( 'wpt0' ) 241 241 cross_normx_factor(k,j) = & … … 243 243 CASE ( 'wsts2' ) 244 244 cross_normx_factor(k,j) = & 245 hom_sum(nzb+8, var_hom,normalizing_region) &246 * ( hom_sum(nzb+3, var_hom,normalizing_region) )**2245 hom_sum(nzb+8,pr_palm,normalizing_region) & 246 * ( hom_sum(nzb+3,pr_palm,normalizing_region) )**2 247 247 CASE ( 'ws2' ) 248 248 cross_normx_factor(k,j) = & 249 ( hom_sum(nzb+8, var_hom,normalizing_region) )**2249 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**2 250 250 CASE ( 'ws2ts' ) 251 251 cross_normx_factor(k,j) = & 252 ( hom_sum(nzb+8, var_hom,normalizing_region) )**2 &253 * hom_sum(nzb+3, var_hom,normalizing_region)252 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**2 & 253 * hom_sum(nzb+3,pr_palm,normalizing_region) 254 254 CASE ( 'ws3' ) 255 255 cross_normx_factor(k,j) = & 256 ( hom_sum(nzb+8, var_hom,normalizing_region) )**3256 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**3 257 257 258 258 END SELECT … … 262 262 CASE ( 'z_i' ) 263 263 cross_normy_factor(k,j) = & 264 hom_sum(nzb+6, var_hom,normalizing_region)264 hom_sum(nzb+6,pr_palm,normalizing_region) 265 265 266 266 END SELECT … … 351 351 352 352 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(2), & ! ws2 353 (/ hom_sum(nzb+8, var_hom,normalizing_region)**2 /), &353 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**2 /), & 354 354 start = (/ dopr_time_count /), & 355 355 count = (/ 1 /) ) … … 357 357 358 358 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(3), & ! tsw2 359 (/ hom_sum(nzb+3, var_hom,normalizing_region)**2 /), &359 (/ hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), & 360 360 start = (/ dopr_time_count /), & 361 361 count = (/ 1 /) ) … … 363 363 364 364 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(4), & ! ws3 365 (/ hom_sum(nzb+8, var_hom,normalizing_region)**3 /), &365 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 /), & 366 366 start = (/ dopr_time_count /), & 367 367 count = (/ 1 /) ) … … 369 369 370 370 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(5), & ! ws2tsw 371 (/ hom_sum(nzb+8, var_hom,normalizing_region)**3 * &372 hom_sum(nzb+3, var_hom,normalizing_region) /), &371 (/ hom_sum(nzb+8,pr_palm,normalizing_region)**3 * & 372 hom_sum(nzb+3,pr_palm,normalizing_region) /), & 373 373 start = (/ dopr_time_count /), & 374 374 count = (/ 1 /) ) … … 376 376 377 377 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(6), & ! wstsw2 378 (/ hom_sum(nzb+8, var_hom,normalizing_region) * &379 hom_sum(nzb+3, var_hom,normalizing_region)**2 /), &378 (/ hom_sum(nzb+8,pr_palm,normalizing_region) * & 379 hom_sum(nzb+3,pr_palm,normalizing_region)**2 /), & 380 380 start = (/ dopr_time_count /), & 381 381 count = (/ 1 /) ) … … 383 383 384 384 nc_stat = NF90_PUT_VAR( id_set_pr, id_var_norm_dopr(7), & ! z_i 385 (/ hom_sum(nzb+6, var_hom,normalizing_region) /), &385 (/ hom_sum(nzb+6,pr_palm,normalizing_region) /), & 386 386 start = (/ dopr_time_count /), & 387 387 count = (/ 1 /) ) … … 482 482 CASE ( 'tsw2' ) 483 483 cross_normx_factor(k,j) = & 484 ( hom_sum(nzb+11, var_hom,normalizing_region) )**2484 ( hom_sum(nzb+11,pr_palm,normalizing_region) )**2 485 485 CASE ( 'wpt0' ) 486 486 cross_normx_factor(k,j) = & … … 488 488 CASE ( 'wstsw2' ) 489 489 cross_normx_factor(k,j) = & 490 hom_sum(nzb+8, var_hom,normalizing_region) &491 * ( hom_sum(nzb+11, var_hom,normalizing_region) )**2490 hom_sum(nzb+8,pr_palm,normalizing_region) & 491 * ( hom_sum(nzb+11,pr_palm,normalizing_region) )**2 492 492 CASE ( 'ws2' ) 493 493 cross_normx_factor(k,j) = & 494 ( hom_sum(nzb+8, var_hom,normalizing_region) )**2494 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**2 495 495 CASE ( 'ws2tsw' ) 496 496 cross_normx_factor(k,j) = & 497 ( hom_sum(nzb+8, var_hom,normalizing_region) )**2&498 * hom_sum(nzb+11, var_hom,normalizing_region)497 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**2& 498 * hom_sum(nzb+11,pr_palm,normalizing_region) 499 499 CASE ( 'ws3' ) 500 500 cross_normx_factor(k,j) = & 501 ( hom_sum(nzb+8, var_hom,normalizing_region) )**3501 ( hom_sum(nzb+8,pr_palm,normalizing_region) )**3 502 502 503 503 END SELECT … … 506 506 CASE ( 'z_i' ) 507 507 cross_normy_factor(k,j) = & 508 hom_sum(nzb+6, var_hom,normalizing_region)508 hom_sum(nzb+6,pr_palm,normalizing_region) 509 509 510 510 END SELECT -
palm/trunk/SOURCE/flow_statistics.f90
r83 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Two more arguments added to user_statistics, which is now also called for 7 ! user-defined profiles, 8 ! var_hom and var_sum renamed pr_palm 7 9 ! 8 10 ! Former revisions: … … 87 89 !-- WARNING: next line still has to be adjusted for OpenMP 88 90 sums_l(:,21,0) = sums_wsts_bc_l(:,sr) ! heat flux from advec_s_bc 89 sums_l(nzb+9, var_sum,0) = sums_divold_l(sr) ! old divergence from pres90 sums_l(nzb+10, var_sum,0) = sums_divnew_l(sr) ! new divergence from pres91 sums_l(nzb+9,pr_palm,0) = sums_divold_l(sr) ! old divergence from pres 92 sums_l(nzb+10,pr_palm,0) = sums_divnew_l(sr) ! new divergence from pres 91 93 !-- WARNING: next four lines still may have to be adjusted for OpenMP 92 sums_l(nzb:nzb+2, var_sum-1,0) = sums_up_fraction_l(1,1:3,sr)! upstream93 sums_l(nzb+3:nzb+5, var_sum-1,0) = sums_up_fraction_l(2,1:3,sr)! parts94 sums_l(nzb+6:nzb+8, var_sum-1,0) = sums_up_fraction_l(3,1:3,sr)! from95 sums_l(nzb+9:nzb+11, var_sum-1,0) = sums_up_fraction_l(4,1:3,sr)! spline94 sums_l(nzb:nzb+2,pr_palm-1,0) = sums_up_fraction_l(1,1:3,sr)! upstream 95 sums_l(nzb+3:nzb+5,pr_palm-1,0) = sums_up_fraction_l(2,1:3,sr)! parts 96 sums_l(nzb+6:nzb+8,pr_palm-1,0) = sums_up_fraction_l(3,1:3,sr)! from 97 sums_l(nzb+9:nzb+11,pr_palm-1,0) = sums_up_fraction_l(4,1:3,sr)! spline 96 98 97 99 ! … … 316 318 !-- quantities is seperated from the previous loop in order to 317 319 !-- allow vectorization of that loop. 318 sums_l(nzb+4, var_sum,tn) = sums_l(nzb+4,var_sum,tn) + sums_l_etot319 sums_l(nzb+5, var_sum,tn) = sums_l(nzb+5,var_sum,tn) + sums_l_eper320 sums_l(nzb+4,pr_palm,tn) = sums_l(nzb+4,pr_palm,tn) + sums_l_etot 321 sums_l(nzb+5,pr_palm,tn) = sums_l(nzb+5,pr_palm,tn) + sums_l_eper 320 322 ! 321 323 !-- 2D-arrays (being collected in the last column of sums_l) 322 sums_l(nzb, var_sum,tn) = sums_l(nzb,var_sum,tn) + &324 sums_l(nzb,pr_palm,tn) = sums_l(nzb,pr_palm,tn) + & 323 325 us(j,i) * rmask(j,i,sr) 324 sums_l(nzb+1, var_sum,tn) = sums_l(nzb+1,var_sum,tn) + &326 sums_l(nzb+1,pr_palm,tn) = sums_l(nzb+1,pr_palm,tn) + & 325 327 usws(j,i) * rmask(j,i,sr) 326 sums_l(nzb+2, var_sum,tn) = sums_l(nzb+2,var_sum,tn) + &328 sums_l(nzb+2,pr_palm,tn) = sums_l(nzb+2,pr_palm,tn) + & 327 329 vsws(j,i) * rmask(j,i,sr) 328 sums_l(nzb+3, var_sum,tn) = sums_l(nzb+3,var_sum,tn) + &330 sums_l(nzb+3,pr_palm,tn) = sums_l(nzb+3,pr_palm,tn) + & 329 331 ts(j,i) * rmask(j,i,sr) 330 332 ENDDO … … 652 654 653 655 ENDIF 656 657 ! 658 !-- Calculate the user-defined profiles 659 CALL user_statistics( 'profiles', sr, tn ) 654 660 !$OMP END PARALLEL 655 661 … … 660 666 sums_l(:,3,0) = sums_l(:,3,0) + sums_l(:,3,i) 661 667 sums_l(:,4:40,0) = sums_l(:,4:40,0) + sums_l(:,4:40,i) 662 sums_l(:,45:var_sum,0) = sums_l(:,45:var_sum,0) + & 663 sums_l(:,45:var_sum,i) 668 sums_l(:,45:pr_palm,0) = sums_l(:,45:pr_palm,0) + & 669 sums_l(:,45:pr_palm,i) 670 IF ( max_pr_user > 0 ) THEN 671 sums_l(:,pr_palm+1:pr_palm+max_pr_user,0) = & 672 sums_l(:,pr_palm+1:pr_palm+max_pr_user,0) + & 673 sums_l(:,pr_palm+1:pr_palm+max_pr_user,i) 674 ENDIF 664 675 ENDDO 665 676 ENDIF … … 679 690 !-- Profiles: 680 691 DO k = nzb, nzt+1 681 sums(k,: var_sum-2) = sums(k,:var_sum-2) / ngp_2dh_outer(k,sr)692 sums(k,:pr_palm-2) = sums(k,:pr_palm-2) / ngp_2dh_outer(k,sr) 682 693 ENDDO 683 694 !-- Upstream-parts 684 sums(nzb:nzb+11, var_sum-1) = sums(nzb:nzb+11,var_sum-1) / ngp_3d(sr)695 sums(nzb:nzb+11,pr_palm-1) = sums(nzb:nzb+11,pr_palm-1) / ngp_3d(sr) 685 696 !-- u* and so on 686 !-- As sums(nzb:nzb+3, var_sum) are full 2D arrays (us, usws, vsws, ts) whose697 !-- As sums(nzb:nzb+3,pr_palm) are full 2D arrays (us, usws, vsws, ts) whose 687 698 !-- size is always ( nx + 1 ) * ( ny + 1 ), defined at the first grid layer 688 699 !-- above the topography, they are being divided by ngp_2dh(sr) 689 sums(nzb:nzb+3, var_sum) = sums(nzb:nzb+3,var_sum) / &700 sums(nzb:nzb+3,pr_palm) = sums(nzb:nzb+3,pr_palm) / & 690 701 ngp_2dh(sr) 691 702 !-- eges, e* 692 sums(nzb+4:nzb+5, var_sum) = sums(nzb+4:nzb+5,var_sum) / &703 sums(nzb+4:nzb+5,pr_palm) = sums(nzb+4:nzb+5,pr_palm) / & 693 704 ngp_3d_inner(sr) 694 705 !-- Old and new divergence 695 sums(nzb+9:nzb+10, var_sum) = sums(nzb+9:nzb+10,var_sum) / &706 sums(nzb+9:nzb+10,pr_palm) = sums(nzb+9:nzb+10,pr_palm) / & 696 707 ngp_3d_inner(sr) 708 709 !-- User-defined profiles 710 IF ( max_pr_user > 0 ) THEN 711 DO k = nzb, nzt+1 712 sums(k,pr_palm+1:pr_palm+max_pr_user) = & 713 sums(k,pr_palm+1:pr_palm+max_pr_user) / & 714 ngp_2dh_outer(k,sr) 715 ENDDO 716 ENDIF 697 717 698 718 ! … … 748 768 hom(:,1,63,sr) = sums(:,61) + sums(:,62) ! vpt_t 749 769 750 hom(:,1, var_hom-1,sr) = sums(:,var_sum-1)770 hom(:,1,pr_palm-1,sr) = sums(:,pr_palm-1) 751 771 ! upstream-parts u_x, u_y, u_z, v_x, 752 772 ! v_y, usw. (in last but one profile) 753 hom(:,1, var_hom,sr) = sums(:,var_sum)773 hom(:,1,pr_palm,sr) = sums(:,pr_palm) 754 774 ! u*, w'u', w'v', t* (in last profile) 775 776 IF ( max_pr_user > 0 ) THEN ! user-defined profiles 777 hom(:,1,pr_palm+1:pr_palm+max_pr_user,sr) = & 778 sums(:,pr_palm+1:pr_palm+max_pr_user) 779 ENDIF 755 780 756 781 ! … … 792 817 ENDDO 793 818 794 hom(nzb+6,1, var_hom,sr) = z_i(1)795 hom(nzb+7,1, var_hom,sr) = z_i(2)819 hom(nzb+6,1,pr_palm,sr) = z_i(1) 820 hom(nzb+7,1,pr_palm,sr) = z_i(2) 796 821 797 822 ! … … 800 825 !-- The horizontal average at nzb+1 is input for the average temperature. 801 826 IF ( hom(nzb,1,18,sr) > 0.0 .AND. z_i(1) /= 0.0 ) THEN 802 hom(nzb+8,1, var_hom,sr) = ( g / hom(nzb+1,1,4,sr) * &827 hom(nzb+8,1,pr_palm,sr) = ( g / hom(nzb+1,1,4,sr) * & 803 828 hom(nzb,1,18,sr) * z_i(1) )**0.333333333 804 829 !-- so far this only works if Prandtl layer is used 805 hom(nzb+11,1, var_hom,sr) = hom(nzb,1,16,sr) / hom(nzb+8,1,var_hom,sr)830 hom(nzb+11,1,pr_palm,sr) = hom(nzb,1,16,sr) / hom(nzb+8,1,pr_palm,sr) 806 831 ELSE 807 hom(nzb+8,1, var_hom,sr) = 0.0808 hom(nzb+11,1, var_hom,sr) = 0.0832 hom(nzb+8,1,pr_palm,sr) = 0.0 833 hom(nzb+11,1,pr_palm,sr) = 0.0 809 834 ENDIF 810 835 811 836 ! 812 837 !-- Collect the time series quantities 813 ts_value(1,sr) = hom(nzb+4,1, var_hom,sr) ! E814 ts_value(2,sr) = hom(nzb+5,1, var_hom,sr) ! E*838 ts_value(1,sr) = hom(nzb+4,1,pr_palm,sr) ! E 839 ts_value(2,sr) = hom(nzb+5,1,pr_palm,sr) ! E* 815 840 ts_value(3,sr) = dt_3d 816 ts_value(4,sr) = hom(nzb,1, var_hom,sr) ! u*817 ts_value(5,sr) = hom(nzb+3,1, var_hom,sr) ! th*841 ts_value(4,sr) = hom(nzb,1,pr_palm,sr) ! u* 842 ts_value(5,sr) = hom(nzb+3,1,pr_palm,sr) ! th* 818 843 ts_value(6,sr) = u_max 819 844 ts_value(7,sr) = v_max 820 845 ts_value(8,sr) = w_max 821 ts_value(9,sr) = hom(nzb+10,1, var_sum,sr) ! new divergence822 ts_value(10,sr) = hom(nzb+9,1, var_hom,sr) ! old Divergence823 ts_value(11,sr) = hom(nzb+6,1, var_hom,sr) ! z_i(1)824 ts_value(12,sr) = hom(nzb+7,1, var_hom,sr) ! z_i(2)825 ts_value(13,sr) = hom(nzb+8,1, var_hom,sr) ! w*846 ts_value(9,sr) = hom(nzb+10,1,pr_palm,sr) ! new divergence 847 ts_value(10,sr) = hom(nzb+9,1,pr_palm,sr) ! old Divergence 848 ts_value(11,sr) = hom(nzb+6,1,pr_palm,sr) ! z_i(1) 849 ts_value(12,sr) = hom(nzb+7,1,pr_palm,sr) ! z_i(2) 850 ts_value(13,sr) = hom(nzb+8,1,pr_palm,sr) ! w* 826 851 ts_value(14,sr) = hom(nzb,1,16,sr) ! w'pt' at k=0 827 852 ts_value(15,sr) = hom(nzb+1,1,16,sr) ! w'pt' at k=1 … … 829 854 ts_value(17,sr) = hom(nzb,1,4,sr) ! pt(0) 830 855 ts_value(18,sr) = hom(nzb+1,1,4,sr) ! pt(zp) 831 ts_value(19,sr) = hom(nzb+9,1, var_hom-1,sr) ! splptx832 ts_value(20,sr) = hom(nzb+10,1, var_hom-1,sr) ! splpty833 ts_value(21,sr) = hom(nzb+11,1, var_hom-1,sr) ! splptz856 ts_value(19,sr) = hom(nzb+9,1,pr_palm-1,sr) ! splptx 857 ts_value(20,sr) = hom(nzb+10,1,pr_palm-1,sr) ! splpty 858 ts_value(21,sr) = hom(nzb+11,1,pr_palm-1,sr) ! splptz 834 859 IF ( ts_value(5,sr) /= 0.0 ) THEN 835 860 ts_value(22,sr) = ts_value(4,sr)**2 / & … … 841 866 ! 842 867 !-- Calculate additional statistics provided by the user interface 843 CALL user_statistics( sr)868 CALL user_statistics( 'time_series', sr, 0 ) 844 869 845 870 ENDDO ! loop of the subregions -
palm/trunk/SOURCE/header.f90
r83 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Bugfix: output of use_upstream_for_tke 7 7 ! 8 8 ! Former revisions: … … 224 224 WRITE ( io, 122 ) timestep_scheme 225 225 ENDIF 226 IF ( use_upstream_for_tke ) WRITE ( io, 143 ) 226 227 IF ( rayleigh_damping_factor /= 0.0 ) THEN 227 228 WRITE ( io, 123 ) rayleigh_damping_height, rayleigh_damping_factor … … 1195 1196 142 FORMAT (' perturbation pressure is calculated at every Runge-Kutta ', & 1196 1197 'step') 1198 143 FORMAT (' Euler/upstream scheme is used for the SGS turbulent ', & 1199 'kinetic energy') 1197 1200 150 FORMAT (' --> Volume flow at the right and north boundary will be ', & 1198 1201 'conserved') -
palm/trunk/SOURCE/init_3d_model.f90
r77 r87 7 7 ! Actual revisions: 8 8 ! ----------------- 9 ! 9 ! var_hom and var_sum renamed pr_palm 10 10 ! 11 11 ! Former revisions: … … 81 81 sums_divold_l(0:statistic_regions) ) 82 82 ALLOCATE( rdf(nzb+1:nzt) ) 83 ALLOCATE( hom_sum(nzb:nzt+1, var_hom,0:statistic_regions),&83 ALLOCATE( hom_sum(nzb:nzt+1,pr_palm+max_pr_user,0:statistic_regions), & 84 84 ngp_2dh_outer(nzb:nzt+1,0:statistic_regions), & 85 85 ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions), & 86 86 rmask(nys-1:nyn+1,nxl-1:nxr+1,0:statistic_regions), & 87 sums(nzb:nzt+1, var_sum),&88 sums_l(nzb:nzt+1, var_sum,0:threads_per_task-1),&87 sums(nzb:nzt+1,pr_palm+max_pr_user), & 88 sums_l(nzb:nzt+1,pr_palm+max_pr_user,0:threads_per_task-1), & 89 89 sums_l_l(nzb:nzt+1,0:statistic_regions,0:threads_per_task-1), & 90 90 sums_up_fraction_l(10,3,0:statistic_regions), & … … 931 931 ngp_3d_inner = 0 932 932 ngp_3d = 0 933 ngp_sums = ( nz + 2 ) * var_sum933 ngp_sums = ( nz + 2 ) * ( pr_palm + max_pr_user ) 934 934 935 935 DO sr = 0, statistic_regions -
palm/trunk/SOURCE/modules.f90
r83 r87 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! 7 ! +data_output_pr_user, max_pr_user, num_user_profiles, size of data_output_pr, 8 ! dopr_index, dopr_initial_index and dopr_unit enlarged, 9 ! var_hom and var_sum renamed pr_palm 8 10 ! 9 11 ! Former revisions: … … 250 252 CHARACTER (LEN=10), DIMENSION(10) :: data_output_format = ' ' 251 253 CHARACTER (LEN=10), DIMENSION(100) :: data_output = ' ', & 252 data_output_pr = ' ', &253 254 data_output_user = ' ', doav = ' ' 255 CHARACTER (LEN=10), DIMENSION(300) :: data_output_pr = ' ' 256 CHARACTER (LEN=10), DIMENSION(200) :: data_output_pr_user = ' ' 254 257 CHARACTER (LEN=20), DIMENSION(10) :: netcdf_precision = ' ' 255 258 … … 269 272 intermediate_timestep_count, intermediate_timestep_count_max, & 270 273 iran = -1234567, last_dt_change = 0, maximum_grid_level, & 271 mgcycles = 0, mg_cycles = -1, mg_switch_to_pe0_level = 0, & 272 ngsrb = 2, nsor = 20, nsor_ini = 100, n_sor, & 273 normalizing_region = 0, nz_do1d, nz_do3d = -9999, & 274 max_pr_user = 0, mgcycles = 0, mg_cycles = -1, & 275 mg_switch_to_pe0_level = 0, ngsrb = 2, nsor = 20, & 276 nsor_ini = 100, n_sor, normalizing_region = 0, & 277 num_user_profiles = 0, nz_do1d, nz_do3d = -9999, & 274 278 outflow_damping_width = -1, prt_time_count = 0, runnr = 0, & 275 279 skip_do_avs = 0, timestep_count = 0 … … 719 723 ( 'unknown', i9 = 1, 78 ) /) 720 724 721 CHARACTER (LEN=7), DIMENSION( 100) :: dopr_unit = 'unknown'725 CHARACTER (LEN=7), DIMENSION(300) :: dopr_unit = 'unknown' 722 726 723 727 CHARACTER (LEN=7), DIMENSION(0:1,100) :: do2d_unit, do3d_unit … … 966 970 cross_ts_numbers(crmax,crmax) = 0, & 967 971 cross_ts_number_count(crmax) = 0, dopr_crossindex(100) = 0, & 968 dopr_index( 100) = 0, dopr_initial_index(100) = 0, &972 dopr_index(300) = 0, dopr_initial_index(300) = 0, & 969 973 dots_crossindex(100) = 0, dots_index(100) = 0, & 970 974 linecolors(10) = (/ 2, 3, 4, 5, 7, 8, 12, 15, 16, 23 /), & … … 1050 1054 1051 1055 CHARACTER (LEN=40) :: region(0:9) 1052 INTEGER :: statistic_regions = 0, var_hom = 80, var_sum = 80, var_ts = 1001056 INTEGER :: pr_palm = 80, statistic_regions = 0, var_ts = 100 1053 1057 INTEGER :: u_max_ijk(3), v_max_ijk(3), w_max_ijk(3) 1054 1058 LOGICAL :: flow_statistics_called = .FALSE. -
palm/trunk/SOURCE/parin.f90
r83 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! Size of hom increased by the maximum number of user-defined profiles, 7 ! var_hom renamed pr_palm 7 8 ! 8 9 ! Former revisions: … … 179 180 runnr = runnr + 1 180 181 181 ELSE 182 ! 183 !-- This is not a restart job. 184 !-- Check, if the grid point numbers are well defined. 182 ENDIF 183 184 ! 185 !-- Definition of names of areas used for computing statistics. They must 186 !-- be defined at this place, because they are allowed to be redefined by 187 !-- the user in user_parin. 188 region = 'total domain' 189 190 ! 191 !-- Read runtime parameters given by the user for this run (namelist "d3par"). 192 !-- The namelist "d3par" can be omitted. In that case, default values are 193 !-- used for the parameters. 194 READ ( 11, d3par, END=20 ) 195 196 ! 197 !-- Read control parameters for optionally used model software packages 198 20 CALL package_parin 199 200 ! 201 !-- Read user-defined variables 202 CALL user_parin 203 204 ! 205 !-- Check in case of initial run, if the grid point numbers are well defined 206 !-- and allocate some arrays which are already needed in init_pegrid or 207 !-- check_parameters. During restart jobs, these arrays will be allocated 208 !-- in read_var_list. All other arrays are allocated in init_3d_model. 209 IF ( TRIM( initializing_actions ) /= 'read_restart_data' ) THEN 210 185 211 IF ( nx <= 0 ) THEN 186 212 IF ( myid == 0 ) THEN … … 202 228 ENDIF 203 229 204 !205 !-- Allocate arrays which will be already initialized in init_pegrid or206 !-- check_parameters. During restart jobs, these arrays will be allocated207 !-- in read_var_list. All other arrays are allocated in init_3d_model.208 230 ALLOCATE( ug(0:nz+1), vg(0:nz+1), & 209 231 pt_init(0:nz+1), q_init(0:nz+1), u_init(0:nz+1), & 210 232 v_init(0:nz+1), & 211 hom(0:nz+1,2, var_hom,0:statistic_regions) )233 hom(0:nz+1,2,pr_palm+max_pr_user,0:statistic_regions) ) 212 234 hom = 0.0 213 235 214 236 ENDIF 215 216 !217 !-- Definition of names of areas used for computing statistics. They must218 !-- be defined at this place, because they are allowed to be redefined by219 !-- the user in user_parin.220 region = 'total domain'221 222 !223 !-- Read runtime parameters given by the user for this run (namelist "d3par").224 !-- The namelist "d3par" can be omitted. In that case, default values are225 !-- used for the parameters.226 READ ( 11, d3par, END=20 )227 228 !229 !-- Read control parameters for optionally used model software packages230 20 CALL package_parin231 232 !233 !-- Read user-defined variables234 CALL user_parin235 237 236 238 ! -
palm/trunk/SOURCE/read_var_list.f90
r77 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +max_pr_user (version 3.1), var_hom renamed pr_palm 7 7 ! 8 8 ! Former revisions: … … 32 32 USE arrays_3d 33 33 USE averaging 34 USE control_parameters 34 35 USE grid_variables 35 36 USE indices … … 38 39 USE profil_parameter 39 40 USE statistics 40 USE control_parameters41 41 42 42 IMPLICIT NONE … … 44 44 CHARACTER (LEN=10) :: binary_version, version_on_file 45 45 CHARACTER (LEN=30) :: variable_chr 46 47 INTEGER :: max_pr_user_on_file 46 48 47 49 CALL check_open( 13 ) … … 50 52 !-- Make version number check first 51 53 READ ( 13 ) version_on_file 52 binary_version = '3. 0'54 binary_version = '3.1' 53 55 IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN 54 56 IF ( myid == 0 ) THEN … … 74 76 ENDIF 75 77 READ ( 13 ) nz 78 79 READ ( 13 ) variable_chr 80 IF ( TRIM( variable_chr ) /= 'max_pr_user' ) THEN 81 PRINT*, '+++ read_var_list: max_pr_user not found in data from ', & 82 'prior run on PE ', myid 83 CALL local_stop 84 ENDIF 85 READ ( 13 ) max_pr_user_on_file 86 IF ( max_pr_user_on_file /= max_pr_user ) THEN 87 IF ( myid == 0 ) THEN 88 PRINT*, '+++ read_var_list: version mismatch concerning maximum', & 89 ' number of user profiles' 90 PRINT*, ' max_pr_user on file = "', & 91 max_pr_user_on_file, '"' 92 PRINT*, ' max_pr_user from run = "', & 93 max_pr_user, '"' 94 ENDIF 95 CALL local_stop 96 ENDIF 97 76 98 READ ( 13 ) variable_chr 77 99 IF ( TRIM( variable_chr ) /= 'statistic_regions' ) THEN … … 83 105 ALLOCATE( ug(0:nz+1), u_init(0:nz+1), vg(0:nz+1), v_init(0:nz+1), & 84 106 pt_init(0:nz+1), q_init(0:nz+1), & 85 hom(0:nz+1,2, var_hom,0:statistic_regions) )107 hom(0:nz+1,2,pr_palm+max_pr_user,0:statistic_regions) ) 86 108 87 109 ! -
palm/trunk/SOURCE/run_control.f90
r83 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! var_hom renamed pr_palm 7 7 ! 8 8 ! Former revisions: … … 86 86 simulated_time-INT( simulated_time ), dt_3d, & 87 87 timestep_reason, change_chr, u_max, disturb_chr, & 88 v_max, disturb_chr, w_max, hom(nzb,1, var_hom,0), &89 hom(nzb+8,1, var_hom,0), hom(nzb+3,1,var_hom,0), &90 hom(nzb+6,1, var_hom,0), hom(nzb+4,1,var_hom,0), &91 hom(nzb+5,1, var_hom,0), hom(nzb+9,1,var_hom,0), &92 hom(nzb+10,1, var_hom,0), u_max_ijk(1:3), &88 v_max, disturb_chr, w_max, hom(nzb,1,pr_palm,0), & 89 hom(nzb+8,1,pr_palm,0), hom(nzb+3,1,pr_palm,0), & 90 hom(nzb+6,1,pr_palm,0), hom(nzb+4,1,pr_palm,0), & 91 hom(nzb+5,1,pr_palm,0), hom(nzb+9,1,pr_palm,0), & 92 hom(nzb+10,1,pr_palm,0), u_max_ijk(1:3), & 93 93 v_max_ijk(1:3), w_max_ijk(1:3), & 94 94 advected_distance_x/1000.0, & -
palm/trunk/SOURCE/time_integration.f90
r77 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! var_hom renamed pr_palm 7 7 ! 8 8 ! Former revisions: … … 187 187 time_disturb = time_disturb + dt_3d 188 188 IF ( time_disturb >= dt_disturb ) THEN 189 IF ( hom(nzb+5,1, var_hom,0) < disturbance_energy_limit ) THEN189 IF ( hom(nzb+5,1,pr_palm,0) < disturbance_energy_limit ) THEN 190 190 CALL disturb_field( nzb_u_inner, tend, u ) 191 191 CALL disturb_field( nzb_v_inner, tend, v ) -
palm/trunk/SOURCE/user_interface.f90
r86 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Calculation and output of user-defined profiles: new routine 7 ! user_check_data_output_pr, +data_output_pr_user, max_pr_user in userpar, 8 ! routine user_statistics has got two more arguments 6 9 ! Bugfix: field_chr renamed field_char 7 10 ! … … 56 59 57 60 USE control_parameters 61 USE pegrid 58 62 USE statistics 59 63 USE user … … 63 67 CHARACTER (LEN=80) :: zeile 64 68 65 66 NAMELIST /userpar/ data_output_user, region 69 INTEGER :: i, j 70 71 72 NAMELIST /userpar/ data_output_pr_user, data_output_user, max_pr_user, & 73 region 67 74 68 75 ! … … 82 89 READ ( 11, userpar ) 83 90 user_defined_namelist_found = .TRUE. 91 92 ! 93 !-- Determine the maximum number of user-profiles allowed to be calculated. 94 !-- This number may be (much) larger than num_user_profiles which only gives 95 !-- the number of user-defined profiles to be output. 96 IF ( data_output_pr_user(1) /= ' ' .AND. max_pr_user == 0 ) THEN 97 max_pr_user = 100 98 ENDIF 99 100 ! 101 !-- Determine the number of user-defined profiles and append them to the 102 !-- standard data output (data_output_pr) 103 IF ( data_output_pr_user(1) /= ' ' ) THEN 104 i = 1 105 DO WHILE ( data_output_pr(i) /= ' ' .AND. i <= 100 ) 106 i = i + 1 107 ENDDO 108 j = 1 109 DO WHILE ( data_output_pr_user(j) /= ' ' .AND. j <= 100 ) 110 data_output_pr(i) = data_output_pr_user(j) 111 num_user_profiles = num_user_profiles + 1 112 i = i + 1 113 j = j + 1 114 ENDDO 115 ENDIF 116 117 IF ( num_user_profiles > max_pr_user ) THEN 118 IF ( myid == 0 ) THEN 119 PRINT*, '+++ user_parin: number of user-defined profiles given by ' 120 PRINT*, ' data_output_pr_user (', num_user_profiles, & 121 ') is larger than the allowed maximum' 122 PRINT*, ' number of profiles: max_pr_user(', & 123 max_pr_user, ')' 124 ENDIF 125 CALL local_stop 126 ENDIF 84 127 85 128 100 RETURN … … 447 490 448 491 449 SUBROUTINE user_statistics( sr ) 450 451 !------------------------------------------------------------------------------! 452 ! 453 ! Description: 454 ! ------------ 455 ! Calculation of user-defined statistics 492 SUBROUTINE user_statistics( mode, sr, tn ) 493 494 !------------------------------------------------------------------------------! 495 ! 496 ! Description: 497 ! ------------ 498 ! Calculation of user-defined statistics, i.e. horizontally averaged profiles 499 ! and time series. 456 500 ! This routine is called for every statistic region sr defined by the user, 457 501 ! but at least for the region "total domain" (sr=0). 458 !------------------------------------------------------------------------------! 459 502 ! See section 3.5.4 on how to define, calculate, and output user defined 503 ! quantities. 504 !------------------------------------------------------------------------------! 505 506 USE arrays_3d 507 USE indices 460 508 USE statistics 461 509 USE user … … 463 511 IMPLICIT NONE 464 512 465 INTEGER :: sr 466 467 ! 468 !-- Sample on how to add values for the user-defined time series quantities. 469 !-- These have to be defined before in routine user_init. This sample 470 !-- creates two time series for the absolut values of the horizontal 471 !-- velocities u and v. 472 ! ts_value(dots_num_palm+1,sr) = ABS( u_max ) 473 ! ts_value(dots_num_palm+2,sr) = ABS( v_max ) 513 CHARACTER (LEN=*) :: mode 514 515 INTEGER :: i, j, k, sr, tn 516 517 518 IF ( mode == 'profiles' ) THEN 519 520 ! 521 !-- Sample on how to calculate horizontally averaged profiles of user- 522 !-- defined quantities. Each quantity is identified by the index 523 !-- "pr_palm+#" where "#" is an integer starting from 1. These 524 !-- user-profile-numbers must also be assigned to the respective strings 525 !-- given by data_output_pr_user in routine user_check_data_output_pr. 526 ! !$OMP DO 527 ! DO i = nxl, nxr 528 ! DO j = nys, nyn 529 ! DO k = nzb_s_outer(j,i)+1, nzt 530 !! 531 !!-- Sample on how to calculate the profile for vertical velocity 532 ! sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) + & 533 ! w(k,j,i) & 534 ! * rmask(j,i,sr) 535 !! 536 !!-- Further profiles can be defined and calculated by increasing 537 !!-- the second index of array sums_l (replace ... appropriately) 538 ! sums_l(k,pr_palm+2,tn) = sums_l(k,pr_palm+2,tn) + ... & 539 ! * rmask(j,i,sr) 540 ! ENDDO 541 ! ENDDO 542 ! ENDDO 543 544 ELSEIF ( mode == 'time_series' ) THEN 545 546 ! 547 !-- Sample on how to add values for the user-defined time series quantities. 548 !-- These have to be defined before in routine user_init. This sample 549 !-- creates two time series for the absolut values of the horizontal 550 !-- velocities u and v. 551 ! ts_value(dots_num_palm+1,sr) = ABS( u_max ) 552 ! ts_value(dots_num_palm+2,sr) = ABS( v_max ) 553 554 ENDIF 474 555 475 556 END SUBROUTINE user_statistics … … 649 730 650 731 END SUBROUTINE user_check_data_output 732 733 734 735 SUBROUTINE user_check_data_output_pr( variable, var_count, unit ) 736 737 !------------------------------------------------------------------------------! 738 ! 739 ! Description: 740 ! ------------ 741 ! Set the unit of user defined profile output quantities. For those variables 742 ! not recognized by the user, the parameter unit is set to "illegal", which 743 ! tells the calling routine that the output variable is not defined and leads 744 ! to a program abort. 745 !------------------------------------------------------------------------------! 746 747 USE arrays_3d 748 USE indices 749 USE netcdf_control 750 USE profil_parameter 751 USE statistics 752 USE user 753 754 IMPLICIT NONE 755 756 CHARACTER (LEN=*) :: unit, variable 757 758 INTEGER :: index, var_count 759 760 761 SELECT CASE ( TRIM( variable ) ) 762 763 ! 764 !-- Uncomment and extend the following lines, if necessary. 765 !-- Add additional CASE statements depending on the number of quantities 766 !-- for which profiles are to be calculated. The respective calculations 767 !-- to be performed have to be added in routine user_statistics. 768 !-- The quantities are (internally) identified by a user-profile-number 769 !-- (see variable "index" below). The first user-profile must be assigned 770 !-- the number "pr_palm+1", the second one "pr_palm+2", etc. The respective 771 !-- user-profile-numbers have also to be used in routine user_statistics! 772 ! CASE ( 'w_user' ) ! quantity string as given in 773 ! ! data_output_pr_user 774 ! index = pr_palm + 1 775 ! dopr_index(var_count) = index ! the quantities' user-profile-number 776 ! dopr_unit(var_count) = 'm/s' ! quantity unit 777 ! hom(:,2,index,:) = SPREAD( zw, 2, statistic_regions+1 ) 778 ! ! grid on which the quantity is 779 ! ! defined (use zu or zw) 780 781 CASE DEFAULT 782 unit = 'illegal' 783 784 END SELECT 785 786 787 END SUBROUTINE user_check_data_output_pr 651 788 652 789 -
palm/trunk/SOURCE/write_var_list.f90
r77 r87 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +max_pr_user (version 3.1) 7 7 ! 8 8 ! Former revisions: … … 32 32 USE arrays_3d 33 33 USE averaging 34 USE control_parameters 34 35 USE grid_variables 35 36 USE indices … … 38 39 USE profil_parameter 39 40 USE statistics 40 USE control_parameters41 41 42 42 IMPLICIT NONE … … 46 46 47 47 48 binary_version = '3. 0'48 binary_version = '3.1' 49 49 50 50 WRITE ( 14 ) binary_version ! opened in write_3d_binary … … 52 52 WRITE ( 14 ) 'nz ' 53 53 WRITE ( 14 ) nz 54 WRITE ( 14 ) 'max_pr_user ' 55 WRITE ( 14 ) max_pr_user 54 56 WRITE ( 14 ) 'statistic_regions ' 55 57 WRITE ( 14 ) statistic_regions
Note: See TracChangeset
for help on using the changeset viewer.