Changeset 4895 for palm/trunk/SOURCE/data_output_mask.f90
- Timestamp:
- Mar 3, 2021 3:39:08 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/data_output_mask.f90
r4828 r4895 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 23 ! 22 ! 23 ! 24 24 ! Former revisions: 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Remove offset in terrain-following masked output 28 ! 29 ! 4828 2021-01-05 11:21:41Z Giersch 27 30 ! file re-formatted to follow the PALM coding standard 28 31 ! … … 154 157 INTEGER(iwp) :: k !< loop index 155 158 INTEGER(iwp) :: kk !< vertical index 156 INTEGER(iwp) :: ktt !< k index of highestterrain surface159 INTEGER(iwp) :: ktt !< k index of lowest non-terrain surface 157 160 INTEGER(iwp) :: mid !< masked output running index 158 161 INTEGER(iwp) :: n !< loop index … … 288 291 DO i = 1, mask_size_l(mid,1) 289 292 DO j = 1, mask_size_l(mid,2) 290 !-- Get k index of the highest terraing surface 293 ! 294 !-- Get k index of the lowest non-terrain grid point 291 295 im = mask_i(mid,i) 292 296 jm = mask_j(mid,j) … … 294 298 DIM = 1 ) - 1 295 299 DO k = 1, mask_size_l(mid,3) 296 kk = MIN( ktt +mask_k(mid,k), nzt+1 )297 !-- Set value if not in building 300 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 301 !-- Set value if not in building, else set fill value 298 302 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 299 303 local_pf(i,j,k) = fill_value … … 356 360 DO i = 1, mask_size_l(mid,1) 357 361 DO j = 1, mask_size_l(mid,2) 358 !-- Get k index of the highest terraing surface 362 ! 363 !-- Get k index of the lowest non-terrain grid point 359 364 im = mask_i(mid,i) 360 365 jm = mask_j(mid,j) … … 362 367 DIM = 1 ) - 1 363 368 DO k = 1, mask_size_l(mid,3) 364 kk = MIN( ktt +mask_k(mid,k), nzt+1 )365 !-- Set value if not in building 369 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 370 !-- Set value if not in building, else set fill value 366 371 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 367 372 local_pf(i,j,k) = fill_value … … 399 404 DO i = 1, mask_size_l(mid,1) 400 405 DO j = 1, mask_size_l(mid,2) 401 !-- Get k index of the highest terraing surface 406 ! 407 !-- Get k index of the lowest non-terrain grid point 402 408 im = mask_i(mid,i) 403 409 jm = mask_j(mid,j) … … 405 411 DIM = 1 ) - 1 406 412 DO k = 1, mask_size_l(mid,3) 407 kk = MIN( ktt+mask_k(mid,k), nzt+1 ) 408 !-- Set value if not in building 413 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 414 ! 415 !-- Set value if not in building, else set fill value 409 416 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 410 417 local_pf(i,j,k) = fill_value … … 493 500 DO i = 1, mask_size_l(mid,1) 494 501 DO j = 1, mask_size_l(mid,2) 495 !-- Get k index of the highest terraing surface 502 ! 503 !-- Get k index of the lowest non-terrain grid point 496 504 im = mask_i(mid,i) 497 505 jm = mask_j(mid,j) … … 499 507 DIM = 1 ) - 1 500 508 DO k = 1, mask_size_l(mid,3) 501 kk = MIN( ktt+mask_k(mid,k), nzt+1 ) 502 !-- Set value if not in building 509 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 510 ! 511 !-- Set value if not in building, else set fill value 503 512 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 504 513 local_pf(i,j,k) = fill_value … … 532 541 DO i = 1, mask_size_l(mid,1) 533 542 DO j = 1, mask_size_l(mid,2) 534 !-- Get k index of the highest terraing surface 543 ! 544 !-- Get k index of the lowest non-terrain grid point 535 545 im = mask_i(mid,i) 536 546 jm = mask_j(mid,j) … … 538 548 DIM = 1 ) - 1 539 549 DO k = 1, mask_size_l(mid,3) 540 kk = MIN( ktt +mask_k(mid,k), nzt+1 )541 !-- Set value if not in building 550 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 551 !-- Set value if not in building, else set fill value 542 552 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 543 553 local_pf(i,j,k) = fill_value … … 679 689 DO i = 1, mask_size_l(mid,1) 680 690 DO j = 1, mask_size_l(mid,2) 681 !-- Get k index of the highest terraing surface 691 ! 692 !-- Get k index of the lowest non-terrain grid point 682 693 im = mask_i(mid,i) 683 694 jm = mask_j(mid,j) 684 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ), 695 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ), & 685 696 DIM = 1 ) - 1 686 697 DO k = 1, mask_size_l(mid,3) 687 kk = MIN( ktt+mask_k(mid,k), nzt+1 ) 688 !-- Set value if not in building 698 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 699 ! 700 !-- Set value if not in building, else set fill value 689 701 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 690 702 local_pf(i,j,k) = fill_value
Note: See TracChangeset
for help on using the changeset viewer.