Changeset 1660


Ignore:
Timestamp:
Sep 21, 2015 8:15:16 AM (9 years ago)
Author:
gronemeier
Message:

Bugfix: Definition of topography height in case of grid stretching

Location:
palm/trunk/SOURCE
Files:
2 edited

Legend:

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

    r1592 r1660  
    2020! Current revisions:
    2121! -----------------
     22! Bugfix: Definition of building/street canyon height if vertical grid stretching
     23!         starts below the maximum topography height.
    2224!
    2325!
     
    196198
    197199    USE arrays_3d,                                                             &
    198         ONLY:  pt_init, qsws, q_init, sa_init, shf, ug, vg, w_subs, zu
     200        ONLY:  pt_init, qsws, q_init, sa_init, shf, ug, vg, w_subs, zu, zw
    199201       
    200202    USE control_parameters
     
    754756          blx = INT( building_length_x / dx )
    755757          bly = INT( building_length_y / dy )
    756           bh  = INT( building_height / dz )
     758          DO  k = 0, nzt
     759             IF  ( building_height .GT. zw(k) ) THEN
     760                bh = k+1
     761             ENDIF
     762          ENDDO
    757763
    758764          IF ( building_wall_left == 9999999.9_wp )  THEN
     
    772778
    773779       CASE ( 'single_street_canyon' )
    774           ch  = NINT( canyon_height / dz )
     780          DO  k = 0, nzt
     781             IF  ( canyon_height .GT. zw(k) ) THEN
     782                ch = k+1
     783             ENDIF
     784          ENDDO
    775785          IF ( canyon_width_x /= 9999999.9_wp )  THEN
    776786!
  • palm/trunk/SOURCE/init_grid.f90

    r1581 r1660  
    2020! Current revisions:
    2121! -----------------
     22! Bugfix: Definition of topography grid levels if vertical grid stretching
     23!         starts below the maximum topography height.
    2224!
    2325!
     
    541543          blx = NINT( building_length_x / dx )
    542544          bly = NINT( building_length_y / dy )
    543           bh  = NINT( building_height / dz )
     545          bh = 0
     546          DO  k = 0, nzt
     547             IF  ( building_height .GT. zw(k) ) THEN
     548                bh = k+1
     549             ENDIF
     550          ENDDO
    544551
    545552          IF ( building_wall_left == 9999999.9_wp )  THEN
     
    601608          ENDIF
    602609
    603           ch             = NINT( canyon_height / dz )
     610          ch = 0
     611          DO  k = 0, nzt
     612             IF  ( canyon_height .GT. zw(k) ) THEN
     613                ch = k+1
     614             ENDIF
     615          ENDDO
    604616          dp_level_ind_b = ch
    605617!
     
    675687          DO  i = 0, nx
    676688             DO  j = 0, ny
    677                 nzb_local(j,i) = NINT( topo_height(j,i) / dz )
     689                nzb_local(j,i) = 0
     690                DO  k = 0, nzt
     691                    IF  ( topo_height(j,i) .GT. zw(k) ) THEN
     692                        nzb_local(j,i) = k+1
     693                    ENDIF
     694                ENDDO
    678695             ENDDO
    679696          ENDDO
Note: See TracChangeset for help on using the changeset viewer.