Changeset 4703 for palm/trunk
- Timestamp:
- Sep 28, 2020 9:21:45 AM (4 years ago)
- Location:
- palm/trunk
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/flow_statistics.f90
r4672 r4703 24 24 ! ----------------- 25 25 ! $Id$ 26 ! Revise averaging of land-surface quantities 27 ! 28 ! 4672 2020-09-09 21:27:32Z pavelkrc 26 29 ! OpenACC bugfix 27 30 ! … … 1414 1417 j = surf_lsm_h(0)%j(m) 1415 1418 1416 IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN 1417 sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + surf_lsm_h(0)%ghf(m) * rmask(j,i,sr) 1418 sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + surf_lsm_h(0)%qsws_liq(m) * rmask(j,i,sr) 1419 sums_l(nzb,95,tn) = sums_l(nzb,95,tn) + surf_lsm_h(0)%qsws_soil(m) * rmask(j,i,sr) 1420 sums_l(nzb,96,tn) = sums_l(nzb,96,tn) + surf_lsm_h(0)%qsws_veg(m) * rmask(j,i,sr) 1421 sums_l(nzb,97,tn) = sums_l(nzb,97,tn) + surf_lsm_h(0)%r_a(m) * rmask(j,i,sr) 1422 sums_l(nzb,98,tn) = sums_l(nzb,98,tn) + surf_lsm_h(0)%r_s(m) * rmask(j,i,sr) 1423 ENDIF 1419 sums_l(nzb,93,tn) = sums_l(nzb,93,tn) + surf_lsm_h(0)%ghf(m) * rmask(j,i,sr) 1420 sums_l(nzb,94,tn) = sums_l(nzb,94,tn) + surf_lsm_h(0)%qsws_liq(m) * rmask(j,i,sr) 1421 sums_l(nzb,95,tn) = sums_l(nzb,95,tn) + surf_lsm_h(0)%qsws_soil(m) * rmask(j,i,sr) 1422 sums_l(nzb,96,tn) = sums_l(nzb,96,tn) + surf_lsm_h(0)%qsws_veg(m) * rmask(j,i,sr) 1423 sums_l(nzb,97,tn) = sums_l(nzb,97,tn) + surf_lsm_h(0)%r_a(m) * rmask(j,i,sr) 1424 sums_l(nzb,98,tn) = sums_l(nzb,98,tn) + surf_lsm_h(0)%r_s(m) * rmask(j,i,sr) 1424 1425 ENDDO 1425 1426 !$OMP END PARALLEL … … 1433 1434 i = surf_lsm_h(0)%i(m) 1434 1435 j = surf_lsm_h(0)%j(m) 1435 1436 IF ( i >= nxl .AND. i <= nxr .AND. j >= nys .AND. j <= nyn ) THEN 1437 1438 DO k = nzb_soil, nzt_soil 1439 sums_l(k,89,tn) = sums_l(k,89,tn) + t_soil_h(0)%var_2d(k,m) * rmask(j,i,sr) 1440 sums_l(k,91,tn) = sums_l(k,91,tn) + m_soil_h(0)%var_2d(k,m) * rmask(j,i,sr) 1441 ENDDO 1442 ENDIF 1436 DO k = nzb_soil, nzt_soil 1437 sums_l(k,89,tn) = sums_l(k,89,tn) + t_soil_h(0)%var_2d(k,m) * rmask(j,i,sr) 1438 sums_l(k,91,tn) = sums_l(k,91,tn) + m_soil_h(0)%var_2d(k,m) * rmask(j,i,sr) 1439 ENDDO 1443 1440 ENDDO 1444 1441 !$OMP END PARALLEL … … 1806 1803 sums(k,55:63) = sums(k,55:63) / ngp_2dh(sr) 1807 1804 sums(k,81:88) = sums(k,81:88) / ngp_2dh(sr) 1808 sums(k,89:112) = sums(k,89:112) / ngp_2dh(sr) 1805 1806 IF ( land_surface .AND. surf_lsm_h(0)%ns_tot > 0 ) THEN 1807 sums(k,89:98) = sums(k,89:98) / surf_lsm_h(0)%ns_tot 1808 ENDIF 1809 1810 sums(k,99:112) = sums(k,99:112) / ngp_2dh(sr) 1809 1811 sums(k,114) = sums(k,114) / ngp_2dh(sr) 1810 1812 sums(k,117) = sums(k,117) / ngp_2dh(sr) -
palm/trunk/SOURCE/surface_mod.f90
r4694 r4703 25 25 ! ----------------- 26 26 ! $Id$ 27 ! Calculate and store total number of surfaces within the model domain. 28 ! 29 ! 4694 2020-09-23 15:09:19Z pavelkrc 27 30 ! Fix reading of surface data from MPI restart file 28 31 ! … … 227 230 TYPE surf_type 228 231 229 INTEGER(iwp) :: ioff !< offset value in x-direction, used to determine index of surface element 230 INTEGER(iwp) :: joff !< offset value in y-direction, used to determine index of surface element 231 INTEGER(iwp) :: koff !< offset value in z-direction, used to determine index of surface element 232 INTEGER(iwp) :: ns !< number of surface elements on the PE 232 INTEGER(iwp) :: ioff !< offset value in x-direction, used to determine index of surface element 233 INTEGER(iwp) :: joff !< offset value in y-direction, used to determine index of surface element 234 INTEGER(iwp) :: koff !< offset value in z-direction, used to determine index of surface element 235 INTEGER(iwp) :: ns !< number of surface elements on the PE 236 INTEGER(iwp) :: ns_tot = 0 !< number of surface elements within the entire model domain 233 237 234 238 INTEGER(iwp), DIMENSION(:), ALLOCATABLE :: i !< x-index linking to the PALM 3D-grid … … 1173 1177 ENDDO 1174 1178 ! 1175 !-- Set the flag for the existence of vertical urban/land surfaces 1179 !-- Set the flag for the existence of vertical urban/land surfaces. Therefore, sum-up the number of 1180 !-- all natural and urban-type vertical surfaces and check. 1176 1181 num_surf_v_l = 0 1177 1182 DO l = 0, 3 … … 1186 1191 IF ( num_surf_v > 0 ) vertical_surfaces_exist = .TRUE. 1187 1192 1193 ! 1194 !-- Calculate the total number of surfaces in the entire model domain of a type. 1195 !-- Horizontal walls. 1196 DO l = 0, 1 1197 #if defined( __parallel ) 1198 CALL MPI_ALLREDUCE( surf_def_h(l)%ns, surf_def_h(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1199 CALL MPI_ALLREDUCE( surf_lsm_h(l)%ns, surf_lsm_h(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1200 CALL MPI_ALLREDUCE( surf_usm_h(l)%ns, surf_usm_h(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1201 #else 1202 surf_def_h(l)%ns_tot = surf_def_h(l)%ns 1203 surf_lsm_h(l)%ns_tot = surf_lsm_h(l)%ns 1204 surf_usm_h(l)%ns_tot = surf_usm_h(l)%ns 1205 #endif 1206 ENDDO 1207 ! 1208 !-- Vertical walls. 1209 DO l = 0, 3 1210 #if defined( __parallel ) 1211 CALL MPI_ALLREDUCE( surf_def_v(l)%ns, surf_def_v(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1212 CALL MPI_ALLREDUCE( surf_lsm_v(l)%ns, surf_lsm_v(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1213 CALL MPI_ALLREDUCE( surf_usm_v(l)%ns, surf_usm_v(l)%ns_tot, 1, MPI_INTEGER, MPI_SUM, comm2d, ierr) 1214 #else 1215 surf_def_v(l)%ns_tot = surf_def_v(l)%ns 1216 surf_lsm_v(l)%ns_tot = surf_lsm_v(l)%ns 1217 surf_usm_v(l)%ns_tot = surf_usm_v(l)%ns 1218 #endif 1219 ENDDO 1188 1220 1189 1221 END SUBROUTINE init_surface_arrays
Note: See TracChangeset
for help on using the changeset viewer.