Changeset 4895 for palm/trunk/SOURCE/salsa_mod.f90
- Timestamp:
- Mar 3, 2021 3:39:08 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.