Changeset 4895 for palm/trunk
- Timestamp:
- Mar 3, 2021 3:39:08 PM (4 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/chemistry_model_mod.f90
r4887 r4895 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Remove offset in terrain-following masked output 29 ! 30 ! 4887 2021-02-26 16:22:32Z banzhafs 28 31 ! Unnecessary comments removed 29 32 ! … … 1696 1699 INTEGER(iwp) :: k !< grid index along z-direction 1697 1700 INTEGER(iwp) :: kk !< masked output index along z-direction 1698 INTEGER(iwp) :: ktt !< k index of highest terrain surface1701 INTEGER(iwp) :: ktt !< k index of lowest non-terrain grid point 1699 1702 INTEGER(iwp) :: lsp 1700 1703 INTEGER(iwp) :: mid !< masked output running index … … 1732 1735 DO j = 1, mask_size_l(mid,2) 1733 1736 ! 1734 !-- Get k index of the highest terraing surface1737 !-- Get k index of the lowest non-terrain grid point 1735 1738 im = mask_i(mid,i) 1736 1739 jm = mask_j(mid,j) … … 1738 1741 DIM = 1 ) - 1 1739 1742 DO k = 1, mask_size_l(mid,3) 1740 kk = MIN( ktt +mask_k(mid,k), nzt+1 )1741 ! 1742 !-- Set value if not in building 1743 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 1744 ! 1745 !-- Set value if not in building, else set fill value 1743 1746 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 1744 1747 local_pf(i,j,k) = fill_value … … 1770 1773 DO j = 1, mask_size_l(mid,2) 1771 1774 ! 1772 !-- Get k index of the highest terraing surface1775 !-- Get k index of the lowest non-terrain grid point 1773 1776 im = mask_i(mid,i) 1774 1777 jm = mask_j(mid,j) … … 1776 1779 DIM = 1 ) - 1 1777 1780 DO k = 1, mask_size_l(mid,3) 1778 kk = MIN( ktt +mask_k(mid,k), nzt+1 )1779 ! 1780 !-- Set value if not in building 1781 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 1782 ! 1783 !-- Set value if not in building, else set fill value 1781 1784 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 1782 1785 local_pf(i,j,k) = fill_value -
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 -
palm/trunk/SOURCE/diagnostic_output_quantities_mod.f90
r4866 r4895 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Remove offset in terrain-following masked output 27 ! 28 ! 4866 2021-02-05 17:50:14Z suehring 26 29 ! Implemented vertical passive scalar flux 27 30 ! Implemented air temperature as diagnostic output quantity (previous commit) … … 1691 1694 DO j = 1, mask_size_l(mid,2) 1692 1695 ! 1693 !-- Get k index of the highest terraing surface1696 !-- Get k index of the lowest non-terrain grid point, else set fill value 1694 1697 im = mask_i(mid,i) 1695 1698 jm = mask_j(mid,j) 1696 1699 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ), DIM=1 ) - 1 1697 1700 DO k = 1, mask_size_l(mid,3) 1698 kk = MIN( ktt +mask_k(mid,k), nzt+1 )1701 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 1699 1702 ! 1700 1703 !-- Set value if not in building -
palm/trunk/SOURCE/init_masks.f90
r4828 r4895 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Allow only mask_k_over_surface >= 1 for terrain-following mask output 27 ! 28 ! 4828 2021-01-05 11:21:41Z Giersch 26 29 ! Implement snow and graupel (bulk microphysics) 27 30 ! … … 521 524 DO WHILE ( mask_k_over_surface(mid, count+1) >= 0 ) 522 525 m = mask_k_over_surface(mid, count+1) 526 IF ( m < 1 ) THEN 527 WRITE ( message_string, '(I3,A,I3,A)' ) m, ' in mask ', mid, ' must be > 0.' 528 CALL message( 'init_masks', 'PA0743', 1, 2, 0, 6, 0 ) 529 ENDIF 523 530 IF ( m > nz+1 ) THEN 524 531 WRITE ( message_string, '(I3,A,I3,A,I1,3A,I3)' ) m, ' in mask ', mid, & -
palm/trunk/SOURCE/salsa_mod.f90
r4873 r4895 26 26 ! ----------------- 27 27 ! $Id$ 28 ! Remove offset in terrain-following masked output 29 ! 30 ! 4873 2021-02-12 17:12:17Z monakurppa 28 31 ! local namelist parameter added to switch off the module although the respective module namelist 29 32 ! appears in the namelist file … … 12513 12516 INTEGER(iwp) :: kk !< loop index for masked output in z-direction 12514 12517 INTEGER(iwp) :: mid !< masked output running index 12515 INTEGER(iwp) :: ktt !< k index of highest terrain surface12518 INTEGER(iwp) :: ktt !< k index of lowest non-terrain grid point 12516 12519 12517 12520 LOGICAL :: found !< … … 12554 12557 DO j = 1, mask_size_l(mid,2) 12555 12558 ! 12556 !-- Get k index of the highest terraing surface12559 !-- Get k index of the lowest non-terrain grid point 12557 12560 im = mask_i(mid,i) 12558 12561 jm = mask_j(mid,j) 12559 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ),&12560 12562 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ), & 12563 DIM = 1 ) - 1 12561 12564 DO k = 1, mask_size_l(mid,3) 12562 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12563 ! 12564 !-- Set value if not in building 12565 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12566 ! 12567 !-- Set value if not in building, else set fill value 12565 12568 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12566 12569 local_pf(i,j,k) = fill_value … … 12609 12612 DO j = 1, mask_size_l(mid,2) 12610 12613 ! 12611 !-- Get k index of the highest terraing surface12614 !-- Get k index of the lowest non-terrain grid point 12612 12615 im = mask_i(mid,i) 12613 12616 jm = mask_j(mid,j) 12614 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12615 12617 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12618 DIM = 1 ) - 1 12616 12619 DO k = 1, mask_size_l(mid,3) 12617 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12618 ! 12619 !-- Set value if not in building 12620 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12621 ! 12622 !-- Set value if not in building, else set fill value 12620 12623 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12621 12624 local_pf(i,j,k) = fill_value … … 12690 12693 DO j = 1, mask_size_l(mid,2) 12691 12694 ! 12692 !-- Get k index of the highest terraing surface12695 !-- Get k index of the lowest non-terrain grid point 12693 12696 im = mask_i(mid,i) 12694 12697 jm = mask_j(mid,j) 12695 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12696 12698 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12699 DIM = 1 ) - 1 12697 12700 DO k = 1, mask_size_l(mid,3) 12698 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12699 ! 12700 !-- Set value if not in building 12701 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12702 ! 12703 !-- Set value if not in building, else set fill value 12701 12704 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12702 12705 local_pf(i,j,k) = fill_value … … 12740 12743 DO j = 1, mask_size_l(mid,2) 12741 12744 ! 12742 !-- Get k index of the highest terraing surface12745 !-- Get k index of the lowest non-terrain grid point 12743 12746 im = mask_i(mid,i) 12744 12747 jm = mask_j(mid,j) 12745 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12746 12748 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12749 DIM = 1 ) - 1 12747 12750 DO k = 1, mask_size_l(mid,3) 12748 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12749 ! 12750 !-- Set value if not in building 12751 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12752 ! 12753 !-- Set value if not in building, else set fill value 12751 12754 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12752 12755 local_pf(i,j,k) = fill_value … … 12788 12791 DO j = 1, mask_size_l(mid,2) 12789 12792 ! 12790 !-- Get k index of the highest terraing surface12793 !-- Get k index of the lowest non-terrain grid point 12791 12794 im = mask_i(mid,i) 12792 12795 jm = mask_j(mid,j) 12793 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12794 12796 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12797 DIM = 1 ) - 1 12795 12798 DO k = 1, mask_size_l(mid,3) 12796 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12797 ! 12798 !-- Set value if not in building 12799 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12800 ! 12801 !-- Set value if not in building, else set fill value 12799 12802 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12800 12803 local_pf(i,j,k) = fill_value … … 12840 12843 DO j = 1, mask_size_l(mid,2) 12841 12844 ! 12842 !-- Get k index of the highest terraing surface12845 !-- Get k index of the lowest non-terrain grid point 12843 12846 im = mask_i(mid,i) 12844 12847 jm = mask_j(mid,j) 12845 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12846 12848 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12849 DIM = 1 ) - 1 12847 12850 DO k = 1, mask_size_l(mid,3) 12848 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12849 ! 12850 !-- Set value if not in building 12851 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12852 ! 12853 !-- Set value if not in building, else set fill value 12851 12854 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12852 12855 local_pf(i,j,k) = fill_value … … 12892 12895 DO j = 1, mask_size_l(mid,2) 12893 12896 ! 12894 !-- Get k index of the highest terraing surface12897 !-- Get k index of the lowest non-terrain grid point 12895 12898 im = mask_i(mid,i) 12896 12899 jm = mask_j(mid,j) 12897 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ),&12898 12900 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 ) ), & 12901 DIM = 1 ) - 1 12899 12902 DO k = 1, mask_size_l(mid,3) 12900 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12901 ! 12902 !-- Set value if not in building 12903 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12904 ! 12905 !-- Set value if not in building, else set fill value 12903 12906 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12904 12907 local_pf(i,j,k) = fill_value … … 12944 12947 DO j = 1, mask_size_l(mid,2) 12945 12948 ! 12946 !-- Get k index of the highest terraing surface12949 !-- Get k index of the lowest non-terrain grid point 12947 12950 im = mask_i(mid,i) 12948 12951 jm = mask_j(mid,j) 12949 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &12950 12952 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 12953 DIM = 1 ) - 1 12951 12954 DO k = 1, mask_size_l(mid,3) 12952 kk = MIN( ktt +mask_k(mid,k), nzt+1 )12953 ! 12954 !-- Set value if not in building 12955 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 12956 ! 12957 !-- Set value if not in building, else set fill value 12955 12958 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 12956 12959 local_pf(i,j,k) = fill_value … … 12994 12997 DO j = 1, mask_size_l(mid,2) 12995 12998 ! 12996 !-- Get k index of the highest terraing surface12999 !-- Get k index of the lowest non-terrain grid point 12997 13000 im = mask_i(mid,i) 12998 13001 jm = mask_j(mid,j) 12999 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &13000 13002 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 13003 DIM = 1 ) - 1 13001 13004 DO k = 1, mask_size_l(mid,3) 13002 kk = MIN( ktt +mask_k(mid,k), nzt+1 )13005 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 13003 13006 ! 13004 !-- Set value if not in building 13007 !-- Set value if not in building, else set fill value 13005 13008 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 13006 13009 local_pf(i,j,k) = fill_value … … 13047 13050 DO j = 1, mask_size_l(mid,2) 13048 13051 ! 13049 !-- Get k index of the highest terraing surface13052 !-- Get k index of the lowest non-terrain grid point 13050 13053 im = mask_i(mid,i) 13051 13054 jm = mask_j(mid,j) 13052 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), &13053 13055 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 13056 DIM = 1 ) - 1 13054 13057 DO k = 1, mask_size_l(mid,3) 13055 kk = MIN( ktt +mask_k(mid,k), nzt+1 )13056 ! 13057 !-- Set value if not in building 13058 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 13059 ! 13060 !-- Set value if not in building, else set fill value 13058 13061 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 13059 13062 local_pf(i,j,k) = fill_value … … 13093 13096 DO j = 1, mask_size_l(mid,2) 13094 13097 ! 13095 !-- Get k index of the highest terraing surface13098 !-- Get k index of the lowest non-terrain grid point 13096 13099 im = mask_i(mid,i) 13097 13100 jm = mask_j(mid,j) 13098 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), & 13099 DIM = 1 ) - 1 13101 ktt = MINLOC( MERGE( 1, 0, BTEST( wall_flags_total_0(:,jm,im), 5 )), DIM = 1 ) - 1 13100 13102 DO k = 1, mask_size_l(mid,3) 13101 kk = MIN( ktt +mask_k(mid,k), nzt+1 )13102 ! 13103 !-- Set value if not in building 13103 kk = MIN( ktt + mask_k(mid,k) - 1, nzt+1 ) 13104 ! 13105 !-- Set value if not in building, else set fill value 13104 13106 IF ( BTEST( wall_flags_total_0(kk,jm,im), 6 ) ) THEN 13105 13107 local_pf(i,j,k) = fill_value
Note: See TracChangeset
for help on using the changeset viewer.