Changeset 4722 for palm/trunk
- Timestamp:
- Oct 5, 2020 11:03:14 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r4691 r4722 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Bugfix in building mapping when static driver is available but no actual building is present 27 ! within the model domain 28 ! 29 ! 4691 2020-09-22 14:38:38Z suehring 26 30 ! Reference model topography to the lowest grid point also in ASCII input case 27 31 ! … … 903 907 IMPLICIT NONE 904 908 909 INTEGER(iwp) :: dim_builds !< total number of buildings within the model domain 905 910 INTEGER(iwp) :: i !< running index along x-direction 906 911 INTEGER(iwp) :: j !< running index along y-direction … … 1099 1104 ! 1100 1105 !-- Determine maximumum terrain height occupied by the respective building and temporalily 1101 !-- store on oro_max. 1102 ALLOCATE( oro_max_l(1:SIZE(build_ids_final)) ) 1103 ALLOCATE( oro_max(1:SIZE(build_ids_final)) ) 1106 !-- store on oro_max. Before, check whether any buildings are defined within the domain. 1107 IF ( ALLOCATED( build_ids_final ) ) THEN 1108 dim_builds = SIZE(build_ids_final) 1109 ELSE 1110 dim_builds = 0 1111 ENDIF 1112 1113 ALLOCATE( oro_max_l(1:dim_builds) ) 1114 ALLOCATE( oro_max(1:dim_builds) ) 1104 1115 oro_max_l = 0.0_wp 1105 1116 1106 DO nr = 1, SIZE(build_ids_final)1117 DO nr = 1, dim_builds 1107 1118 oro_max_l(nr) = MAXVAL( MERGE( terrain_height_f%var(nys:nyn,nxl:nxr), & 1108 1119 0.0_wp, & … … 1112 1123 1113 1124 #if defined( __parallel ) 1114 IF ( SIZE(build_ids_final)>= 1 ) THEN1125 IF ( dim_builds >= 1 ) THEN 1115 1126 CALL MPI_ALLREDUCE( oro_max_l, oro_max, SIZE( oro_max ), MPI_REAL, MPI_MAX, comm2d, & 1116 1127 ierr ) … … 1125 1136 !-- terrain or 1126 1137 oro_max_l = 0.0 1127 DO nr = 1, SIZE(build_ids_final)1138 DO nr = 1, dim_builds 1128 1139 DO k = nzb, nzt 1129 1140 IF ( zu(k) - ocean_offset <= oro_max(nr) ) oro_max_l(nr) = zw(k) - ocean_offset
Note: See TracChangeset
for help on using the changeset viewer.