- Timestamp:
- Oct 2, 2015 8:28:59 AM (9 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/header.f90
r1662 r1675 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix: Definition of topography grid levels 23 23 ! 24 24 ! Former revisions: … … 758 758 blx = INT( building_length_x / dx ) 759 759 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 765 763 766 764 IF ( building_wall_left == 9999999.9_wp ) THEN … … 780 778 781 779 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 787 783 IF ( canyon_width_x /= 9999999.9_wp ) THEN 788 784 ! -
palm/trunk/SOURCE/init_grid.f90
r1662 r1675 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Bugfix: Definition of topography grid levels 23 23 ! 24 24 ! Former revisions: … … 545 545 blx = NINT( building_length_x / dx ) 546 546 bly = NINT( building_length_y / dy ) 547 bh = 0 548 DO k = 0, nzt 549 IF ( building_height .GT. zw(k) ) THEN 550 bh = k+1 551 ENDIF 552 ENDDO 547 bh = MINLOC( ABS( zw - building_height ), 1 ) - 1 548 IF ( ABS( zw(bh ) - building_height ) == & 549 ABS( zw(bh+1) - building_height ) ) bh = bh + 1 553 550 554 551 IF ( building_wall_left == 9999999.9_wp ) THEN … … 610 607 ENDIF 611 608 612 ch = 0 613 DO k = 0, nzt 614 IF ( canyon_height .GT. zw(k) ) THEN 615 ch = k+1 616 ENDIF 617 ENDDO 609 ch = MINLOC( ABS( zw - canyon_height ), 1 ) - 1 610 IF ( ABS( zw(ch ) - canyon_height ) == & 611 ABS( zw(ch+1) - canyon_height ) ) ch = ch + 1 612 618 613 dp_level_ind_b = ch 619 614 ! … … 689 684 DO i = 0, nx 690 685 DO j = 0, ny 691 nzb_local(j,i) = 0 692 DO k = 0, nzt 693 IF ( topo_height(j,i) .GT. zw(k) ) THEN 694 nzb_local(j,i) = k+1 695 ENDIF 696 ENDDO 686 nzb_local(j,i) = MINLOC( ABS( zw - topo_height(j,i) ), 1 ) - 1 687 IF ( ABS( zw(nzb_local(j,i) ) - topo_height(j,i) ) == & 688 ABS( zw(nzb_local(j,i)+1) - topo_height(j,i) ) ) & 689 nzb_local(j,i) = nzb_local(j,i) + 1 697 690 ENDDO 698 691 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.