Ignore:
Timestamp:
Oct 2, 2015 8:28:59 AM (6 years ago)
Author:
gronemeier
Message:

Bugfix: Definition of topography grid levels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/header.f90

    r1662 r1675  
    2020! Current revisions:
    2121! -----------------
    22 !
     22! Bugfix: Definition of topography grid levels
    2323!
    2424! Former revisions:
     
    758758          blx = INT( building_length_x / dx )
    759759          bly = INT( building_length_y / dy )
    760           DO  k = 0, nzt
    761              IF  ( building_height .GT. zw(k) ) THEN
    762                 bh = k+1
    763              ENDIF
    764           ENDDO
     760          bh  = MINLOC( ABS( zw - building_height ), 1 ) - 1
     761          IF ( ABS( zw(bh  ) - building_height ) == &
     762               ABS( zw(bh+1) - building_height )    )  bh = bh + 1
    765763
    766764          IF ( building_wall_left == 9999999.9_wp )  THEN
     
    780778
    781779       CASE ( 'single_street_canyon' )
    782           DO  k = 0, nzt
    783              IF  ( canyon_height .GT. zw(k) ) THEN
    784                 ch = k+1
    785              ENDIF
    786           ENDDO
     780          ch  = MINLOC( ABS( zw - canyon_height ), 1 ) - 1
     781          IF ( ABS( zw(ch  ) - canyon_height ) == &
     782               ABS( zw(ch+1) - canyon_height )    )  ch = ch + 1
    787783          IF ( canyon_width_x /= 9999999.9_wp )  THEN
    788784!
Note: See TracChangeset for help on using the changeset viewer.