Changeset 1762
- Timestamp:
- Feb 25, 2016 12:31:13 PM (9 years ago)
- Location:
- palm/trunk/SOURCE
- Files:
-
- 6 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/Makefile
r1748 r1762 20 20 # Current revisions: 21 21 # ------------------ 22 # 22 # +pmc_interface, +pmc routines 23 23 # 24 24 # Former revisions: … … 245 245 ls_forcing.f90 message.f90 microphysics.f90 modules.f90 mod_kinds.f90 \ 246 246 mod_particle_attributes.f90 netcdf.f90 nudging.f90 package_parin.f90 \ 247 palm.f90 parin.f90 plant_canopy_model.f90 poisfft.f90 poismg.f90 \ 247 palm.f90 parin.f90 plant_canopy_model.f90 pmc_interface.f90 \ 248 pmc_client.f90 pmc_general.f90 pmc_handle_communicator.f90 pmc_mpi_wrapper.f90 \ 249 pmc_server.f90 \ 250 poisfft.f90 poismg.f90 \ 248 251 poismg_fast.f90 pres.f90 print_1d.f90 production_e.f90 \ 249 252 prognostic_equations.f90 progress_bar.f90 radiation_model.f90 \ … … 371 374 init_masks.o: modules.o mod_kinds.o 372 375 init_ocean.o: modules.o eqn_state_seawater.o mod_kinds.o 373 init_pegrid.o: modules.o mod_kinds.o 376 init_pegrid.o: modules.o mod_kinds.o pmc_interface.o 374 377 init_pt_anomaly.o: modules.o mod_kinds.o 375 378 init_rankine.o: modules.o mod_kinds.o … … 423 426 plant_canopy_model.o radiation_model.o 424 427 palm.o: modules.o cpulog.o ls_forcing.o mod_kinds.o nudging.o\ 425 surface_layer_fluxes.o428 pmc_interface.o surface_layer_fluxes.o 426 429 parin.o: modules.o cpulog.o mod_kinds.o progress_bar.o 427 430 plant_canopy_model.o: modules.o mod_kinds.o 431 pmc_interface.o: modules.o mod_kinds.o pmc_client.o pmc_general.o\ 432 pmc_handle_communicator.o pmc_mpi_wrapper.o pmc_server.o 433 pmc_client.o: pmc_general.o pmc_handle_communicator.o pmc_mpi_wrapper.o 434 pmc_handle_communicator.o: pmc_general.o 435 pmc_mpi_wrapper.o: pmc_handle_communicator.o 436 pmc_server.o: pmc_general.o pmc_handle_communicator.o pmc_mpi_wrapper.o 428 437 poisfft.o: modules.o cpulog.o fft_xy.o mod_kinds.o tridia_solver.o 429 438 poismg.o: modules.o cpulog.o mod_kinds.o … … 461 470 time_integration.o: modules.o advec_ws.o buoyancy.o calc_mean_profile.o \ 462 471 cpulog.o interaction_droplets_ptq.o land_surface_model.o \ 463 ls_forcing.o mod_kinds.o nudging.o p roduction_e.o \472 ls_forcing.o mod_kinds.o nudging.o pmc_interface.o production_e.o \ 464 473 prognostic_equations.o progress_bar.o radiation_model.o \ 465 474 user_actions.o surface_layer_fluxes.o -
palm/trunk/SOURCE/boundary_conds.f90
r1744 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 134 134 ibc_pt_b, ibc_pt_t, ibc_q_b, ibc_q_t, ibc_sa_t, ibc_uv_b, & 135 135 ibc_uv_t, icloud_scheme, inflow_l, inflow_n, inflow_r, inflow_s,& 136 intermediate_timestep_count, large_scale_forcing, ocean, & 136 intermediate_timestep_count, large_scale_forcing, nest_domain, & 137 nest_bound_l, nest_bound_s, nudging, ocean, & 137 138 outflow_l, outflow_n, outflow_r, outflow_s, passive_scalar, & 138 precipitation, tsc, use_cmax, & 139 nudging 139 precipitation, tsc, use_cmax 140 140 141 141 USE grid_variables, & … … 179 179 180 180 ! 181 !-- Top boundary 181 !-- Top boundary. A nested domain ( ibc_uv_t = 3 ) does not require settings. 182 182 IF ( ibc_uv_t == 0 ) THEN 183 183 !$acc kernels present( u_init, u_p, v_init, v_p ) … … 185 185 v_p(nzt+1,:,:) = v_init(nzt+1) 186 186 !$acc end kernels 187 ELSE 187 ELSEIF ( ibc_uv_t == 1 ) THEN 188 188 !$acc kernels present( u_p, v_p ) 189 189 u_p(nzt+1,:,:) = u_p(nzt,:,:) … … 191 191 !$acc end kernels 192 192 ENDIF 193 !$acc kernels present( w_p ) 194 w_p(nzt:nzt+1,:,:) = 0.0_wp ! nzt is not a prognostic level (but cf. pres) 195 !$acc end kernels 193 194 IF ( .NOT. nest_domain ) THEN 195 !$acc kernels present( w_p ) 196 w_p(nzt:nzt+1,:,:) = 0.0_wp ! nzt is not a prognostic level (but cf. pres) 197 !$acc end kernels 198 ENDIF 196 199 197 200 ! … … 255 258 ENDDO 256 259 ENDDO 257 e_p(nzt+1,:,:) = e_p(nzt,:,:) 260 IF ( .NOT. nest_domain ) THEN 261 e_p(nzt+1,:,:) = e_p(nzt,:,:) 262 ENDIF 258 263 !$acc end kernels 259 264 ENDIF … … 325 330 ENDIF 326 331 ! 327 !-- In case of inflow at the south boundary the boundary for v is at nys 328 !-- and in case of inflow at the left boundary the boundary for u is at nxl. 329 !-- Since in prognostic_equations (cache optimized version) these levels are 330 !-- handled as a prognostic level, boundary values have to be restored here. 332 !-- In case of inflow or nest boundary at the south boundary the boundary for v 333 !-- is at nys and in case of inflow or nest boundary at the left boundary the 334 !-- boundary for u is at nxl. Since in prognostic_equations (cache optimized 335 !-- version) these levels are handled as a prognostic level, boundary values 336 !-- have to be restored here. 331 337 !-- For the SGS-TKE, Neumann boundary conditions are used at the inflow. 332 338 IF ( inflow_s ) THEN … … 340 346 ELSEIF ( inflow_r ) THEN 341 347 IF ( .NOT. constant_diffusion ) e_p(:,:,nxr+1) = e_p(:,:,nxr) 348 ENDIF 349 350 ! 351 !-- The same restoration for u at i=nxl and v at j=nys as above must be made 352 !-- in case of nest boundaries. Note however, that the above ELSEIF-structure is 353 !-- not appropriate here as there may be more than one nest boundary on a 354 !-- PE-domain. Furthermore Neumann conditions for SGS-TKE are not required here. 355 IF ( nest_bound_s ) THEN 356 v_p(:,nys,:) = v_p(:,nys-1,:) 357 ENDIF 358 IF ( nest_bound_l ) THEN 359 u_p(:,:,nxl) = u_p(:,:,nxl-1) 342 360 ENDIF 343 361 -
palm/trunk/SOURCE/check_parameters.f90
r1759 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! Previous version restored.21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 1755 1755 !-- Lateral boundary conditions 1756 1756 IF ( bc_lr /= 'cyclic' .AND. bc_lr /= 'dirichlet/radiation' .AND. & 1757 bc_lr /= 'radiation/dirichlet' ) THEN1757 bc_lr /= 'radiation/dirichlet' .AND. bc_lr /= 'nested' ) THEN 1758 1758 message_string = 'unknown boundary condition: bc_lr = "' // & 1759 1759 TRIM( bc_lr ) // '"' … … 1761 1761 ENDIF 1762 1762 IF ( bc_ns /= 'cyclic' .AND. bc_ns /= 'dirichlet/radiation' .AND. & 1763 bc_ns /= 'radiation/dirichlet' ) THEN1763 bc_ns /= 'radiation/dirichlet' .AND. bc_ns /= 'nested' ) THEN 1764 1764 message_string = 'unknown boundary condition: bc_ns = "' // & 1765 1765 TRIM( bc_ns ) // '"' … … 1843 1843 IF ( bc_p_t == 'dirichlet' ) THEN 1844 1844 ibc_p_t = 0 1845 ELSEIF ( bc_p_t == 'neumann' ) THEN 1845 !-- TO_DO: later set bc_p_t to neumann before, in case of nested domain 1846 ELSEIF ( bc_p_t == 'neumann' .OR. bc_p_t == 'nested' ) THEN 1846 1847 ibc_p_t = 1 1847 1848 ELSE … … 1873 1874 ELSEIF ( bc_pt_t == 'initial_gradient' ) THEN 1874 1875 ibc_pt_t = 2 1876 ELSEIF ( bc_pt_t == 'nested' ) THEN 1877 ibc_pt_t = 3 1875 1878 ELSE 1876 1879 message_string = 'unknown boundary condition: bc_pt_t = "' // & … … 2015 2018 ELSEIF ( bc_q_t == 'neumann' ) THEN 2016 2019 ibc_q_t = 1 2020 ELSEIF ( bc_q_t == 'nested' ) THEN 2021 ibc_q_t = 3 2017 2022 ELSE 2018 2023 message_string = 'unknown boundary condition: bc_' // TRIM( sq ) // & … … 2098 2103 ELSEIF ( bc_uv_t == 'neumann' ) THEN 2099 2104 ibc_uv_t = 1 2105 ELSEIF ( bc_uv_t == 'nested' ) THEN 2106 ibc_uv_t = 3 2100 2107 ELSE 2101 2108 message_string = 'unknown boundary condition: bc_uv_t = "' // & … … 3861 3868 ntdim_2d_xz(1) = ntdim_3d(1) 3862 3869 ntdim_2d_yz(1) = ntdim_3d(1) 3863 write(9,*) "ntdim_3d(av)=",ntdim_3d(0) 3864 CALL local_flush(9) 3870 3865 3871 ENDIF 3866 3872 -
palm/trunk/SOURCE/exchange_horiz_2d.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 62 62 USE control_parameters, & 63 63 ONLY : bc_lr_cyc, bc_ns_cyc, inflow_l, inflow_n, inflow_r, inflow_s, & 64 nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s, & 64 65 outflow_l, outflow_n, outflow_r, outflow_s 65 66 … … 153 154 154 155 ! 155 !-- Neumann-conditions at inflow/outflow in case of non-cyclic boundary 156 !-- conditions 157 IF ( inflow_l .OR. outflow_l ) THEN 158 DO i=nbgp, 1, -1 156 !-- Neumann-conditions at inflow/outflow/nested boundaries 157 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 158 DO i = nbgp, 1, -1 159 159 ar(:,nxl-i) = ar(:,nxl) 160 END 161 END 162 IF ( inflow_r .OR. outflow_r ) THEN163 DO i=1, nbgp160 ENDDO 161 ENDIF 162 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 163 DO i = 1, nbgp 164 164 ar(:,nxr+i) = ar(:,nxr) 165 END 166 END 167 IF ( inflow_s .OR. outflow_s ) THEN168 DO i=nbgp, 1, -1165 ENDDO 166 ENDIF 167 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 168 DO i = nbgp, 1, -1 169 169 ar(nys-i,:) = ar(nys,:) 170 END 171 END 172 IF ( inflow_n .OR. outflow_n ) THEN173 DO i=1, nbgp170 ENDDO 171 ENDIF 172 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 173 DO i = 1, nbgp 174 174 ar(nyn+i,:) = ar(nyn,:) 175 END DO 176 END IF 175 ENDDO 176 ENDIF 177 177 178 CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' ) 178 179 … … 193 194 194 195 USE control_parameters, & 195 ONLY: bc_lr_cyc, bc_ns_cyc 196 ONLY: bc_lr_cyc, bc_ns_cyc, nest_bound_l, nest_bound_n, nest_bound_r, & 197 nest_bound_s 196 198 197 199 USE cpulog, & … … 207 209 IMPLICIT NONE 208 210 211 INTEGER(iwp) :: i 209 212 INTEGER(iwp) :: ar(nysg:nyng,nxlg:nxrg) !< 210 213 … … 277 280 278 281 #endif 282 ! 283 !-- Neumann-conditions at inflow/outflow/nested boundaries 284 IF ( nest_bound_l ) THEN 285 DO i = nbgp, 1, -1 286 ar(:,nxl-i) = ar(:,nxl) 287 ENDDO 288 ENDIF 289 IF ( nest_bound_r ) THEN 290 DO i = 1, nbgp 291 ar(:,nxr+i) = ar(:,nxr) 292 ENDDO 293 ENDIF 294 IF ( nest_bound_s ) THEN 295 DO i = nbgp, 1, -1 296 ar(nys-i,:) = ar(nys,:) 297 ENDDO 298 ENDIF 299 IF ( nest_bound_n ) THEN 300 DO i = 1, nbgp 301 ar(nyn+i,:) = ar(nyn,:) 302 ENDDO 303 ENDIF 304 279 305 CALL cpu_log( log_point_s(13), 'exchange_horiz_2d', 'stop' ) 280 306 -
palm/trunk/SOURCE/init_3d_model.f90
r1739 r1762 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 669 669 !-- is done). Further below the values needed within the timestep scheme 670 670 !-- will be set. 671 !-- TO_DO: zeroth element added to weight_pres because in case of nesting 672 !-- pres may need to be called outside the RK-substeps. Antti will 673 !-- check if this is really required. 671 674 ALLOCATE( weight_substep(1:intermediate_timestep_count_max), & 672 weight_pres( 1:intermediate_timestep_count_max) )675 weight_pres(0:intermediate_timestep_count_max) ) 673 676 weight_substep = 1.0_wp 674 677 weight_pres = 1.0_wp … … 774 777 775 778 ! 779 !-- Inside buildings set velocities back to zero 776 780 IF ( topography /= 'flat' ) THEN 777 DO i = nxl -1, nxr+1778 DO j = nys -1, nyn+1781 DO i = nxlg, nxrg 782 DO j = nysg, nyng 779 783 u(nzb:nzb_u_inner(j,i),j,i) = 0.0_wp 780 784 v(nzb:nzb_v_inner(j,i),j,i) = 0.0_wp … … 841 845 !-- in the limiting formula!). The original values are stored to be later 842 846 !-- used for volume flow control. 843 IF ( ibc_uv_b /= 1 ) THEN 844 DO i = nxlg, nxrg 845 DO j = nysg, nyng 846 u(nzb:nzb_u_inner(j,i)+1,j,i) = 0.0_wp 847 v(nzb:nzb_v_inner(j,i)+1,j,i) = 0.0_wp 848 ENDDO 849 ENDDO 850 ENDIF 847 ! TO_DO: Antti will check if this is really required 848 !AH IF ( ibc_uv_b /= 1 ) THEN 849 !AH DO i = nxlg, nxrg 850 !AH DO j = nysg, nyng 851 !AH u(nzb:nzb_u_inner(j,i)+1,j,i) = 0.0_wp 852 !AH v(nzb:nzb_v_inner(j,i)+1,j,i) = 0.0_wp 853 !AH ENDDO 854 !AH ENDDO 855 !AH ENDIF 851 856 852 857 IF ( humidity .OR. passive_scalar ) THEN … … 1669 1674 ! 1670 1675 !-- Setting weighting factors for calculation of perturbation pressure 1671 !-- and turbulent quantities from the RK substeps 1676 !-- and turbulent quantities from the RK substeps 1677 !-- TO_DO: zeroth element is added to weight_pres because in nesting pres 1678 !-- may need to be called outside the RK-substeps 1679 weight_pres(0) = 1.0_wp 1672 1680 IF ( TRIM(timestep_scheme) == 'runge-kutta-3' ) THEN ! for RK3-method 1673 1681 -
palm/trunk/SOURCE/init_grid.f90
r1744 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 156 156 io_group, inflow_l, inflow_n, inflow_r, inflow_s, & 157 157 masking_method, maximum_grid_level, message_string, & 158 momentum_advec, ocean, outflow_l, outflow_n, outflow_r, & 159 outflow_s, psolver, scalar_advec, topography, & 158 momentum_advec, nest_domain, nest_bound_l, nest_bound_n, & 159 nest_bound_r, nest_bound_s, ocean, outflow_l, outflow_n, & 160 outflow_r, outflow_s, psolver, scalar_advec, topography, & 160 161 topography_grid_convention, use_surface_fluxes, use_top_fluxes, & 161 162 wall_adjustment_factor … … 734 735 nzb_max = MAXVAL( nzb_local ) + 1 735 736 IF ( inflow_l .OR. outflow_l .OR. inflow_r .OR. outflow_r .OR. & 736 inflow_n .OR. outflow_n .OR. inflow_s .OR. outflow_s ) THEN 737 nzb_max = nzt 737 inflow_n .OR. outflow_n .OR. inflow_s .OR. outflow_s .OR. & 738 nest_domain ) & 739 THEN 740 nzb_max = nzt 738 741 ENDIF 739 742 … … 1221 1224 !-- scalar - x-direction 1222 1225 !-- WS1 (0), WS3 (1), WS5 (2) 1223 IF ( k <= nzb_s_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1224 .AND. i == nxl ) .OR. ( ( inflow_r .OR. outflow_r ) & 1225 .AND. i == nxr ) ) THEN 1226 IF ( k <= nzb_s_inner(j,i+1) .OR. & 1227 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1228 .AND. i == nxl ) .OR. & 1229 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1230 .AND. i == nxr ) ) & 1231 THEN 1226 1232 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 0 ) 1227 1233 ELSEIF ( k <= nzb_s_inner(j,i+2) .OR. k <= nzb_s_inner(j,i-1) & 1228 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 ) & 1229 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1230 ) THEN 1234 .OR. & 1235 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1236 .AND. i == nxr-1 ) .OR. & 1237 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1238 .AND. i == nxlu ) ) & 1239 THEN 1231 1240 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 1 ) 1232 1241 ELSE … … 1236 1245 !-- scalar - y-direction 1237 1246 !-- WS1 (3), WS3 (4), WS5 (5) 1238 IF ( k <= nzb_s_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1239 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1240 .AND. j == nyn ) ) THEN 1247 IF ( k <= nzb_s_inner(j+1,i) .OR. & 1248 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1249 .AND. j == nys ) .OR. & 1250 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1251 .AND. j == nyn ) ) & 1252 THEN 1241 1253 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 3 ) 1254 ! 1242 1255 !-- WS3 1243 1256 ELSEIF ( k <= nzb_s_inner(j+2,i) .OR. k <= nzb_s_inner(j-1,i) & 1244 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1245 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn-1 ) & 1246 ) THEN 1257 .OR. & 1258 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1259 .AND. j == nysv ) .OR. & 1260 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1261 .AND. j == nyn-1 ) ) & 1262 THEN 1247 1263 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 4 ) 1264 ! 1248 1265 !-- WS5 1249 1266 ELSE … … 1287 1304 !-- u component - x-direction 1288 1305 !-- WS1 (9), WS3 (10), WS5 (11) 1289 IF ( k <= nzb_u_inner(j,i+1) & 1290 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i <= nxlu ) & 1291 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr ) & 1292 ) THEN 1306 IF ( k <= nzb_u_inner(j,i+1) .OR. & 1307 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1308 .AND. i <= nxlu ) .OR. & 1309 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1310 .AND. i == nxr ) ) & 1311 THEN 1293 1312 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 9 ) 1294 ELSEIF ( k <= nzb_u_inner(j,i+2) .OR. k <= nzb_u_inner(j,i-1) & 1295 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 )& 1296 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu+1)& 1297 ) THEN 1313 ELSEIF ( k <= nzb_u_inner(j,i+2) .OR. k <= nzb_u_inner(j,i-1) & 1314 .OR. & 1315 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1316 .AND. i == nxr-1 ) .OR. & 1317 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1318 .AND. i == nxlu+1) ) & 1319 THEN 1298 1320 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 10 ) 1299 1321 ! … … 1309 1331 !-- u component - y-direction 1310 1332 !-- WS1 (12), WS3 (13), WS5 (14) 1311 IF ( k <= nzb_u_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1312 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1313 .AND. j == nyn ) ) THEN 1314 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 ) 1333 IF ( k <= nzb_u_inner(j+1,i) .OR. & 1334 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1335 .AND. j == nys ) .OR. & 1336 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1337 .AND. j == nyn ) ) & 1338 THEN 1339 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 12 ) 1315 1340 ELSEIF ( k <= nzb_u_inner(j+2,i) .OR. k <= nzb_u_inner(j-1,i) & 1316 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1317 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn-1 ) & 1318 ) THEN 1341 .OR. & 1342 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1343 .AND. j == nysv ) .OR. & 1344 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1345 .AND. j == nyn-1 ) ) & 1346 THEN 1319 1347 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 13 ) 1320 1348 ! … … 1357 1385 !-- v component - x-direction 1358 1386 !-- WS1 (18), WS3 (19), WS5 (20) 1359 IF ( k <= nzb_v_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1360 .AND. i == nxl ) .OR. (( inflow_r .OR. outflow_r ) & 1361 .AND. i == nxr ) ) THEN 1362 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 ) 1387 IF ( k <= nzb_v_inner(j,i+1) .OR. & 1388 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1389 .AND. i == nxl ) .OR. & 1390 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1391 .AND. i == nxr ) ) & 1392 THEN 1393 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 18 ) 1394 ! 1363 1395 !-- WS3 1364 1396 ELSEIF ( k <= nzb_v_inner(j,i+2) .OR. k <= nzb_v_inner(j,i-1) & 1365 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 ) & 1366 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1367 ) THEN 1397 .OR. & 1398 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1399 .AND. i == nxr-1 ) .OR. & 1400 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1401 .AND. i == nxlu ) ) & 1402 THEN 1368 1403 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 19 ) 1369 1404 ! … … 1379 1414 !-- v component - y-direction 1380 1415 !-- WS1 (21), WS3 (22), WS5 (23) 1381 IF ( k <= nzb_v_inner(j+1,i) & 1382 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j <= nysv ) & 1383 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn ) & 1384 ) THEN 1385 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 ) 1416 IF ( k <= nzb_v_inner(j+1,i) .OR. & 1417 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1418 .AND. j <= nysv ) .OR. & 1419 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1420 .AND. j == nyn ) ) & 1421 THEN 1422 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 21 ) 1386 1423 ELSEIF ( k <= nzb_v_inner(j+2,i) .OR. k <= nzb_v_inner(j-1,i) & 1387 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv+1 )& 1388 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn-1 )& 1389 ) THEN 1424 .OR. & 1425 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1426 .AND. j == nysv+1) .OR. & 1427 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1428 .AND. j == nyn-1 ) ) & 1429 THEN 1390 1430 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 22 ) 1391 1431 ! … … 1427 1467 !-- w component - x-direction 1428 1468 !-- WS1 (27), WS3 (28), WS5 (29) 1429 IF ( k <= nzb_w_inner(j,i+1) .OR. ( ( inflow_l .OR. outflow_l )& 1430 .AND. i == nxl ) .OR. ( ( inflow_r .OR. outflow_r ) & 1431 .AND. i == nxr ) ) THEN 1432 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 ) 1469 IF ( k <= nzb_w_inner(j,i+1) .OR. & 1470 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1471 .AND. i == nxl ) .OR. & 1472 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1473 .AND. i == nxr ) ) & 1474 THEN 1475 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 27 ) 1433 1476 ELSEIF ( k <= nzb_w_inner(j,i+2) .OR. k <= nzb_w_inner(j,i-1) & 1434 .OR. ( ( inflow_r .OR. outflow_r ) .AND. i == nxr-1 ) & 1435 .OR. ( ( inflow_l .OR. outflow_l ) .AND. i == nxlu ) & 1436 ) THEN 1477 .OR. & 1478 ( ( inflow_r .OR. outflow_r .OR. nest_bound_r ) & 1479 .AND. i == nxr-1 ) .OR. & 1480 ( ( inflow_l .OR. outflow_l .OR. nest_bound_l ) & 1481 .AND. i == nxlu ) ) & 1482 THEN 1437 1483 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 28 ) 1438 1484 ! … … 1448 1494 !-- w component - y-direction 1449 1495 !-- WS1 (30), WS3 (31), WS5 (32) 1450 IF ( k <= nzb_w_inner(j+1,i) .OR. ( ( inflow_s .OR. outflow_s )& 1451 .AND. j == nys ) .OR. ( ( inflow_n .OR. outflow_n ) & 1452 .AND. j == nyn ) ) THEN 1453 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 ) 1496 IF ( k <= nzb_w_inner(j+1,i) .OR. & 1497 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1498 .AND. j == nys ) .OR. & 1499 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1500 .AND. j == nyn ) ) & 1501 THEN 1502 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 30 ) 1454 1503 ELSEIF ( k <= nzb_w_inner(j+2,i) .OR. k <= nzb_w_inner(j-1,i) & 1455 .OR. ( ( inflow_s .OR. outflow_s ) .AND. j == nysv ) & 1456 .OR. ( ( inflow_n .OR. outflow_n ) .AND. j == nyn-1 ) & 1457 ) THEN 1504 .OR. & 1505 ( ( inflow_s .OR. outflow_s .OR. nest_bound_s ) & 1506 .AND. j == nysv ) .OR. & 1507 ( ( inflow_n .OR. outflow_n .OR. nest_bound_n ) & 1508 .AND. j == nyn-1 ) ) & 1509 THEN 1458 1510 wall_flags_0(k,j,i) = IBSET( wall_flags_0(k,j,i), 31 ) 1459 1511 ! … … 1504 1556 !-- Set boundary flags at inflow and outflow boundary in case of 1505 1557 !-- non-cyclic boundary conditions. 1506 IF ( inflow_l .OR. outflow_l ) THEN1558 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 1507 1559 wall_flags_0(:,:,nxl-1) = wall_flags_0(:,:,nxl) 1508 1560 wall_flags_00(:,:,nxl-1) = wall_flags_00(:,:,nxl) 1509 1561 ENDIF 1510 1562 1511 IF ( inflow_r .OR. outflow_r ) THEN1563 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 1512 1564 wall_flags_0(:,:,nxr+1) = wall_flags_0(:,:,nxr) 1513 1565 wall_flags_00(:,:,nxr+1) = wall_flags_00(:,:,nxr) 1514 1566 ENDIF 1515 1567 1516 IF ( inflow_n .OR. outflow_n ) THEN1568 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 1517 1569 wall_flags_0(:,nyn+1,:) = wall_flags_0(:,nyn,:) 1518 1570 wall_flags_00(:,nyn+1,:) = wall_flags_00(:,nyn,:) 1519 1571 ENDIF 1520 1572 1521 IF ( inflow_s .OR. outflow_s ) THEN1573 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 1522 1574 wall_flags_0(:,nys-1,:) = wall_flags_0(:,nys,:) 1523 1575 wall_flags_00(:,nys-1,:) = wall_flags_00(:,nys,:) -
palm/trunk/SOURCE/init_pegrid.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 129 129 io_blocks, io_group, maximum_grid_level, & 130 130 maximum_parallel_io_streams, message_string, & 131 mg_switch_to_pe0_level, momentum_advec, neutral, psolver, & 131 mg_switch_to_pe0_level, momentum_advec, nest_bound_l, & 132 nest_bound_n, nest_bound_r, nest_bound_s, neutral, psolver, & 132 133 outflow_l, outflow_n, outflow_r, outflow_s, recycling_width, & 133 134 scalar_advec, subdomain_size … … 147 148 USE pegrid 148 149 150 #if defined( PMC_ACTIVE ) 151 USE pmc_interface, & 152 ONLY: cpl_npex,cpl_npey 153 #endif 154 149 155 USE transpose_indices, & 150 156 ONLY: nxl_y, nxl_yd, nxl_z, nxr_y, nxr_yd, nxr_z, nyn_x, nyn_z, nys_x,& … … 206 212 CALL location_message( 'creating virtual PE grids + MPI derived data types', & 207 213 .FALSE. ) 214 #if defined( PMC_ACTIVE ) 215 ! 216 !-- In case of nested-domain runs, the processor grid is explicitly given 217 !-- by the user in the nestpar-NAMELIST 218 pdims(1) = cpl_npex 219 pdims(2) = cpl_npey 220 #else 208 221 ! 209 222 !-- Determine the processor topology or check it, if prescribed by the user … … 243 256 244 257 ENDIF 258 #endif 245 259 246 260 ! … … 1058 1072 #if defined( __parallel ) && ! defined ( __check ) 1059 1073 ! 1060 !-- Setting of flags for inflow/outflow conditions in case of non-cyclic1074 !-- Setting of flags for inflow/outflow/nesting conditions in case of non-cyclic 1061 1075 !-- horizontal boundary conditions. 1062 1076 IF ( pleft == MPI_PROC_NULL ) THEN … … 1065 1079 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 1066 1080 outflow_l = .TRUE. 1081 #if defined( PMC_ACTIVE ) 1082 ELSEIF ( bc_lr == 'nested' ) THEN 1083 nest_bound_l = .TRUE. 1084 #endif 1067 1085 ENDIF 1068 1086 ENDIF … … 1073 1091 ELSEIF ( bc_lr == 'radiation/dirichlet' ) THEN 1074 1092 inflow_r = .TRUE. 1093 #if defined( PMC_ACTIVE ) 1094 ELSEIF ( bc_lr == 'nested' ) THEN 1095 nest_bound_r = .TRUE. 1096 #endif 1075 1097 ENDIF 1076 1098 ENDIF … … 1081 1103 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 1082 1104 inflow_s = .TRUE. 1105 #if defined( PMC_ACTIVE ) 1106 ELSEIF ( bc_ns == 'nested' ) THEN 1107 nest_bound_s = .TRUE. 1108 #endif 1083 1109 ENDIF 1084 1110 ENDIF … … 1089 1115 ELSEIF ( bc_ns == 'radiation/dirichlet' ) THEN 1090 1116 outflow_n = .TRUE. 1117 #if defined( PMC_ACTIVE ) 1118 ELSEIF ( bc_ns == 'nested' ) THEN 1119 nest_bound_n = .TRUE. 1120 #endif 1091 1121 ENDIF 1092 1122 ENDIF … … 1139 1169 !-- At the inflow or outflow, u or v, respectively, have to be calculated for 1140 1170 !-- one more grid point. 1141 IF ( inflow_l .OR. outflow_l ) THEN1171 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 1142 1172 nxlu = nxl + 1 1143 1173 ELSE 1144 1174 nxlu = nxl 1145 1175 ENDIF 1146 IF ( inflow_s .OR. outflow_s ) THEN1176 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 1147 1177 nysv = nys + 1 1148 1178 ELSE -
palm/trunk/SOURCE/modules.f90
r1739 r1762 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! +nest_* variables, size of volume_flow arrays increased by one element 22 22 ! 23 23 ! Former revisions: … … 711 711 masking_method = .FALSE., mg_switch_to_pe0 = .FALSE., & 712 712 monotonic_adjustment = .FALSE., & 713 nest_bound_l = .FALSE., nest_bound_n = .FALSE., & 714 nest_bound_r = .FALSE., nest_bound_s = .FALSE., & 715 nest_domain = .FALSE., & 713 716 neutral = .FALSE., nudging = .FALSE., & 714 717 ocean = .FALSE., on_device = .FALSE., & … … 828 831 vg_vertical_gradient(10) = 0.0_wp, & 829 832 vg_vertical_gradient_level(10) = -9999999.9_wp, & 830 volume_flow(1: 2) = 0.0_wp, volume_flow_area(1:2) = 0.0_wp, &831 volume_flow_initial(1: 2) = 0.0_wp, wall_heatflux(0:4) = 0.0_wp, &833 volume_flow(1:3) = 0.0_wp, volume_flow_area(1:3) = 0.0_wp, & 834 volume_flow_initial(1:3) = 0.0_wp, wall_heatflux(0:4) = 0.0_wp, & 832 835 wall_humidityflux(0:4) = 0.0_wp, wall_nrflux(0:4) = 0.0_wp, & 833 836 wall_qflux(0:4) = 0.0_wp, wall_qrflux(0:4) = 0.0_wp, & -
palm/trunk/SOURCE/palm.f90
r1748 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 113 113 ONLY: coupling_char, coupling_mode, do2d_at_begin, do3d_at_begin, & 114 114 io_blocks, io_group, large_scale_forcing, message_string, & 115 n udging, simulated_time, simulated_time_chr,&115 nest_domain, nudging, simulated_time, simulated_time_chr, & 116 116 user_interface_current_revision, & 117 117 user_interface_required_revision, version, wall_heatflux, & … … 144 144 145 145 USE pegrid 146 147 #if defined( PMC_ACTIVE ) 148 USE pmc_interface, & 149 ONLY: cpl_id, pmci_init, pmci_modelconfiguration 150 #endif 146 151 147 152 USE statistics, & … … 176 181 !-- it will be defined in init_pegrid but is used before in cpu_log. 177 182 CALL MPI_INIT( ierr ) 183 184 #if defined( PMC_ACTIVE ) 185 ! 186 !-- Initialize the coupling for nested-domain runs 187 CALL pmci_init( comm_palm ) 188 comm2d = comm_palm 189 190 IF ( cpl_id >= 2 ) THEN 191 nest_domain = .TRUE. 192 WRITE( coupling_char, '(A1,I1.1)') '_', cpl_id 193 ENDIF 194 195 CALL MPI_COMM_SIZE( comm_palm, numprocs, ierr ) 196 CALL MPI_COMM_RANK( comm_palm, myid, ierr ) 197 #else 178 198 CALL MPI_COMM_SIZE( MPI_COMM_WORLD, numprocs, ierr ) 179 199 CALL MPI_COMM_RANK( MPI_COMM_WORLD, myid, ierr ) 180 200 comm_palm = MPI_COMM_WORLD 181 201 comm2d = MPI_COMM_WORLD 182 183 ! 184 !-- Initialize PE topology in case of coupled runs202 ! 203 !-- Initialize PE topology in case of coupled atmosphere-ocean runs (comm_palm 204 !-- will be splitted in init_coupling) 185 205 CALL init_coupling 206 #endif 186 207 #endif 187 208 … … 291 312 !-- Initialize all necessary variables 292 313 CALL init_3d_model 314 315 #if defined( PMC_ACTIVE ) 316 ! 317 !-- Coupling protocol setup for nested-domain runs 318 CALL pmci_modelconfiguration 319 #endif 293 320 294 321 ! -
palm/trunk/SOURCE/parin.f90
r1692 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 176 176 limiter_sedimentation, nc_const, ventilation_effect 177 177 178 USE control_parameters, & 179 ONLY: alpha_surface, averaging_interval, averaging_interval_pr, & 180 bc_e_b, bc_lr, bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, & 181 bc_q_b, bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t, & 182 bottom_salinityflux, building_height, building_length_x, & 183 building_length_y, building_wall_left, building_wall_south, & 184 call_microphysics_at_all_substeps, call_psolver_at_all_substeps,& 185 canyon_height, & 186 canyon_width_x, canyon_width_y, canyon_wall_left, & 187 canyon_wall_south, cfl_factor, & 188 cloud_droplets, cloud_physics, cloud_scheme, & 189 cloud_top_radiation, conserve_volume_flow, & 190 conserve_volume_flow_mode, constant_flux_layer, & 191 coupling_start_time, & 192 create_disturbances, cycle_mg, data_output, data_output_masks, & 193 data_output_pr, data_output_2d_on_each_pe, & 194 disturbance_amplitude, disturbance_energy_limit, & 195 disturbance_level_b, disturbance_level_t, dissipation_1d, & 196 do2d_at_begin, do3d_at_begin, & 197 dp_external, dp_level_b, dp_smooth, dpdxy, & 198 drizzle, dt, dt_averaging_input, dt_averaging_input_pr, & 199 dt_coupling, dt_data_output, dt_data_output_av, dt_disturb, & 200 dt_domask, dt_dopr, dt_dopr_listing, dt_dots, dt_do2d_xy, & 201 dt_do2d_xz, dt_do2d_yz, dt_do3d, dt_max, dt_restart, & 202 dt_run_control, dz, dz_max, dz_stretch_factor, dz_stretch_level,& 203 end_time, ensemble_member_nr, e_init, e_min, fft_method, & 204 force_print_header, & 205 galilei_transformation, host, humidity, inflow_damping_height, & 206 inflow_damping_width, inflow_disturbance_begin, & 207 inflow_disturbance_end, initializing_actions, io_blocks, & 208 io_group, km_constant, & 209 large_scale_forcing, & 210 large_scale_subsidence, & 211 loop_optimization, masking_method, mask_scale_x, mask_scale_y, & 212 mask_scale_z, mask_x, mask_y, mask_z, mask_x_loop, & 213 mask_y_loop, mask_z_loop, maximum_cpu_time_allowed, & 214 maximum_parallel_io_streams, max_pr_user, message_string, & 215 mg_cycles, mg_switch_to_pe0_level, mixing_length_1d, & 216 momentum_advec, most_method, netcdf_data_format, & 217 netcdf_precision, neutral, ngsrb, normalizing_region, nsor, & 218 nsor_ini, nudging, ocean, & 219 omega, omega_sor, passive_scalar, phi, nz_do3d, & 220 prandtl_number, precipitation, & 221 precipitation_amount_interval, psolver, pt_damping_factor, & 222 pt_damping_width, pt_reference, pt_surface, & 223 pt_surface_initial_change, pt_vertical_gradient, & 224 pt_vertical_gradient_level, q_surface, & 225 q_surface_initial_change, q_vertical_gradient, & 226 q_vertical_gradient_level, random_generator, & 227 random_heatflux, rayleigh_damping_factor, & 228 rayleigh_damping_height, recycling_width, recycling_yshift, & 229 reference_state, residual_limit, & 230 restart_time, return_addres, return_username, & 231 revision, roughness_length, runnr, & 232 run_identifier, sa_surface, sa_vertical_gradient, & 233 sa_vertical_gradient_level, scalar_advec, & 234 scalar_rayleigh_damping, & 235 section_xy, section_xz, section_yz, skip_time_data_output, & 236 skip_time_data_output_av, skip_time_dopr, skip_time_do2d_xy, & 237 skip_time_do2d_xz, skip_time_do2d_yz, skip_time_do3d, & 238 skip_time_domask, subs_vertical_gradient, & 239 subs_vertical_gradient_level, surface_heatflux, & 240 surface_pressure, surface_scalarflux, surface_waterflux, & 241 synchronous_exchange,s_surface, s_surface_initial_change, & 242 s_vertical_gradient, s_vertical_gradient_level, & 243 termination_time_needed, timestep_scheme, topography, & 244 topography_grid_convention, top_heatflux, top_momentumflux_u, & 245 top_momentumflux_v, top_salinityflux, & 246 transpose_compute_overlap, turbulence, turbulent_inflow, & 247 ug_surface, ug_vertical_gradient, ug_vertical_gradient_level, & 248 use_subsidence_tendencies, use_surface_fluxes, use_cmax, & 249 use_top_fluxes, use_ug_for_galilei_tr, use_upstream_for_tke, & 250 uv_heights, u_bulk, u_profile, vg_surface, vg_vertical_gradient,& 251 vg_vertical_gradient_level, v_bulk, v_profile, & 252 wall_adjustment, wall_heatflux, wall_humidityflux, & 253 wall_scalarflux, write_binary, zeta_max, zeta_min, z0h_factor, & 254 z_max_do2d 178 USE control_parameters 255 179 256 180 USE cpulog, & … … 418 342 READ ( 11, inipar, ERR=10, END=11 ) 419 343 344 #if defined ( PMC_ACTIVE ) 345 ! 346 !-- In nested domains, npex or npey must not be given in \$inipar 347 !-- because here the PE-grids are always defined in the nestpar-NAMELIST 348 IF ( ( npex /= -1 ) .OR. ( npey /= -1 ) ) THEN 349 message_string = 'npex or npey must not be given in \$inipar ' // & 350 'in nested domains' 351 CALL message( 'parin', 'PAXXXX', 1, 2, 0, 6, 0 ) 352 ENDIF 353 #else 354 ! 355 !-- Make sure that no nesting boundary conditions are defined if 356 !-- PMC_ACTIVE is not defined. Otherwise initiate abort. 357 IF ( ( bc_lr == 'nested' ) .OR. ( bc_ns == 'nested' ) .OR. ( bc_uv_t == 'nested' ) .OR. & 358 ( bc_pt_t == 'nested' ) .OR. ( bc_q_t == 'nested') .OR. ( bc_sa_t == 'nested') .OR. & 359 ( bc_p_t == 'nested' ) ) THEN 360 message_string = 'Nested boundary conditions are not allowed ' // & 361 'since the cpp flag PMC_ACTIVE is not set' 362 CALL message( 'parin', 'PAXXXX', 1, 2, 0, 6, 0 ) 363 ENDIF 364 #endif 365 420 366 #if defined ( __check ) 421 367 ! -
palm/trunk/SOURCE/poismg.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 259 259 USE control_parameters, & 260 260 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l, & 261 inflow_n, inflow_r, inflow_s, outflow_l, outflow_n, outflow_r, & 261 inflow_n, inflow_r, inflow_s, nest_bound_l, nest_bound_n, & 262 nest_bound_r, nest_bound_s, outflow_l, outflow_n, outflow_r, & 262 263 outflow_s 263 264 … … 353 354 354 355 IF ( .NOT. bc_lr_cyc ) THEN 355 IF ( inflow_l .OR. outflow_l ) r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l)) 356 IF ( inflow_r .OR. outflow_r ) r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l)) 356 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 357 r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l)) 358 ENDIF 359 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 360 r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l)) 361 ENDIF 357 362 ENDIF 358 363 359 364 IF ( .NOT. bc_ns_cyc ) THEN 360 IF ( inflow_n .OR. outflow_n ) r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:) 361 IF ( inflow_s .OR. outflow_s ) r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:) 365 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 366 r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:) 367 ENDIF 368 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 369 r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:) 370 ENDIF 362 371 ENDIF 363 372 … … 393 402 USE control_parameters, & 394 403 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l, & 395 inflow_n, inflow_r, inflow_s, outflow_l, outflow_n, outflow_r, & 404 inflow_n, inflow_r, inflow_s, nest_bound_l, nest_bound_n, & 405 nest_bound_r, nest_bound_s, outflow_l, outflow_n, outflow_r, & 396 406 outflow_s 397 407 … … 560 570 561 571 IF ( .NOT. bc_lr_cyc ) THEN 562 IF (inflow_l .OR. outflow_l) f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l)) 563 IF (inflow_r .OR. outflow_r) f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l)) 572 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 573 f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l)) 574 ENDIF 575 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 576 f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l)) 577 ENDIF 564 578 ENDIF 565 579 566 580 IF ( .NOT. bc_ns_cyc ) THEN 567 IF (inflow_n .OR. outflow_n) f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:) 568 IF (inflow_s .OR. outflow_s) f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:) 581 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 582 f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:) 583 ENDIF 584 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 585 f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:) 586 ENDIF 569 587 ENDIF 570 588 … … 600 618 USE control_parameters, & 601 619 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l, & 602 inflow_n, inflow_r, inflow_s, outflow_l, outflow_n, outflow_r, & 620 inflow_n, inflow_r, inflow_s, nest_bound_l, nest_bound_n, & 621 nest_bound_r, nest_bound_s, outflow_l, outflow_n, outflow_r, & 603 622 outflow_s 604 623 … … 668 687 669 688 IF ( .NOT. bc_lr_cyc ) THEN 670 IF (inflow_l .OR. outflow_l) temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l)) 671 IF (inflow_r .OR. outflow_r) temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l)) 689 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 690 temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l)) 691 ENDIF 692 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 693 temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l)) 694 ENDIF 672 695 ENDIF 673 696 674 697 IF ( .NOT. bc_ns_cyc ) THEN 675 IF (inflow_n .OR. outflow_n) temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:) 676 IF (inflow_s .OR. outflow_s) temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:) 698 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 699 temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:) 700 ENDIF 701 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 702 temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:) 703 ENDIF 677 704 ENDIF 678 705 … … 709 736 USE control_parameters, & 710 737 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l, & 711 inflow_n, inflow_r, inflow_s, ngsrb, outflow_l, outflow_n, & 738 inflow_n, inflow_r, inflow_s, ngsrb, nest_bound_l, & 739 nest_bound_n, nest_bound_r, nest_bound_s, outflow_l, outflow_n, & 712 740 outflow_r, outflow_s 713 741 … … 1068 1096 1069 1097 IF ( .NOT. bc_lr_cyc ) THEN 1070 IF ( inflow_l .OR. outflow_l ) THEN1098 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 1071 1099 p_mg(:,:,nxl_mg(l)-1) = p_mg(:,:,nxl_mg(l)) 1072 1100 ENDIF 1073 IF ( inflow_r .OR. outflow_r ) THEN1101 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 1074 1102 p_mg(:,:,nxr_mg(l)+1) = p_mg(:,:,nxr_mg(l)) 1075 1103 ENDIF … … 1077 1105 1078 1106 IF ( .NOT. bc_ns_cyc ) THEN 1079 IF ( inflow_n .OR. outflow_n ) THEN1107 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 1080 1108 p_mg(:,nyn_mg(l)+1,:) = p_mg(:,nyn_mg(l),:) 1081 1109 ENDIF 1082 IF ( inflow_s .OR. outflow_s ) THEN1110 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 1083 1111 p_mg(:,nys_mg(l)-1,:) = p_mg(:,nys_mg(l),:) 1084 1112 ENDIF … … 1296 1324 gamma_mg, grid_level, grid_level_count, ibc_p_b, ibc_p_t, & 1297 1325 inflow_l, inflow_n, inflow_r, inflow_s, maximum_grid_level, & 1298 mg_switch_to_pe0_level, mg_switch_to_pe0, ngsrb, outflow_l, & 1299 outflow_n, outflow_r, outflow_s 1326 mg_switch_to_pe0_level, mg_switch_to_pe0, nest_domain, & 1327 nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s, ngsrb, & 1328 outflow_l, outflow_n, outflow_r, outflow_s 1300 1329 1301 1330 … … 1446 1475 outflow_l = .TRUE. 1447 1476 outflow_r = .FALSE. 1477 ELSEIF ( nest_domain ) THEN 1478 nest_bound_l = .TRUE. 1479 nest_bound_r = .TRUE. 1448 1480 ENDIF 1449 1481 … … 1458 1490 outflow_n = .TRUE. 1459 1491 outflow_s = .FALSE. 1492 ELSEIF ( nest_domain ) THEN 1493 nest_bound_s = .TRUE. 1494 nest_bound_n = .TRUE. 1460 1495 ENDIF 1461 1496 … … 1528 1563 ELSEIF ( bc_lr_raddir ) THEN 1529 1564 outflow_l = .TRUE. 1565 ELSEIF ( nest_domain ) THEN 1566 nest_bound_l = .TRUE. 1530 1567 ENDIF 1531 1568 ENDIF … … 1536 1573 ELSEIF ( bc_lr_raddir ) THEN 1537 1574 inflow_r = .TRUE. 1575 ELSEIF ( nest_domain ) THEN 1576 nest_bound_r = .TRUE. 1538 1577 ENDIF 1539 1578 ENDIF … … 1544 1583 ELSEIF ( bc_ns_raddir ) THEN 1545 1584 inflow_s = .TRUE. 1585 ELSEIF ( nest_domain ) THEN 1586 nest_bound_s = .TRUE. 1546 1587 ENDIF 1547 1588 ENDIF … … 1552 1593 ELSEIF ( bc_ns_raddir ) THEN 1553 1594 outflow_n = .TRUE. 1595 ELSEIF ( nest_domain ) THEN 1596 nest_bound_n = .TRUE. 1554 1597 ENDIF 1555 1598 ENDIF -
palm/trunk/SOURCE/poismg_fast.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 240 240 USE control_parameters, & 241 241 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l,& 242 inflow_n, inflow_r, inflow_s, masking_method, outflow_l, & 242 inflow_n, inflow_r, inflow_s, masking_method, nest_bound_l, & 243 nest_bound_n, nest_bound_r, nest_bound_s, outflow_l, & 243 244 outflow_n, outflow_r, outflow_s, topography 244 245 … … 393 394 394 395 IF ( .NOT. bc_lr_cyc ) THEN 395 IF ( inflow_l .OR. outflow_l ) r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l)) 396 IF ( inflow_r .OR. outflow_r ) r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l)) 396 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 397 r(:,:,nxl_mg(l)-1) = r(:,:,nxl_mg(l)) 398 ENDIF 399 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 400 r(:,:,nxr_mg(l)+1) = r(:,:,nxr_mg(l)) 401 ENDIF 397 402 ENDIF 398 403 399 404 IF ( .NOT. bc_ns_cyc ) THEN 400 IF ( inflow_n .OR. outflow_n ) r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:) 401 IF ( inflow_s .OR. outflow_s ) r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:) 405 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 406 r(:,nyn_mg(l)+1,:) = r(:,nyn_mg(l),:) 407 ENDIF 408 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 409 r(:,nys_mg(l)-1,:) = r(:,nys_mg(l),:) 410 ENDIF 402 411 ENDIF 403 412 … … 434 443 USE control_parameters, & 435 444 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l,& 436 inflow_n, inflow_r, inflow_s, masking_method, outflow_l, & 445 inflow_n, inflow_r, inflow_s, masking_method, nest_bound_l, & 446 nest_bound_n, nest_bound_r, nest_bound_s, outflow_l, & 437 447 outflow_n, outflow_r, outflow_s, topography 438 448 … … 635 645 636 646 IF ( .NOT. bc_lr_cyc ) THEN 637 IF (inflow_l .OR. outflow_l) f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l)) 638 IF (inflow_r .OR. outflow_r) f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l)) 647 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 648 f_mg(:,:,nxl_mg(l)-1) = f_mg(:,:,nxl_mg(l)) 649 ENDIF 650 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 651 f_mg(:,:,nxr_mg(l)+1) = f_mg(:,:,nxr_mg(l)) 652 ENDIF 639 653 ENDIF 640 654 641 655 IF ( .NOT. bc_ns_cyc ) THEN 642 IF (inflow_n .OR. outflow_n) f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:) 643 IF (inflow_s .OR. outflow_s) f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:) 656 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 657 f_mg(:,nyn_mg(l)+1,:) = f_mg(:,nyn_mg(l),:) 658 ENDIF 659 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 660 f_mg(:,nys_mg(l)-1,:) = f_mg(:,nys_mg(l),:) 661 ENDIF 644 662 ENDIF 645 663 … … 679 697 USE control_parameters, & 680 698 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l,& 681 inflow_n, inflow_r, inflow_s, outflow_l, outflow_n, & 699 inflow_n, inflow_r, inflow_s, nest_bound_l, nest_bound_n, & 700 nest_bound_r, nest_bound_s, outflow_l, outflow_n, & 682 701 outflow_r, outflow_s 683 702 … … 790 809 791 810 IF ( .NOT. bc_lr_cyc ) THEN 792 IF (inflow_l .OR. outflow_l) temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l)) 793 IF (inflow_r .OR. outflow_r) temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l)) 811 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 812 temp(:,:,nxl_mg(l)-1) = temp(:,:,nxl_mg(l)) 813 ENDIF 814 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 815 temp(:,:,nxr_mg(l)+1) = temp(:,:,nxr_mg(l)) 816 ENDIF 794 817 ENDIF 795 818 796 819 IF ( .NOT. bc_ns_cyc ) THEN 797 IF (inflow_n .OR. outflow_n) temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:) 798 IF (inflow_s .OR. outflow_s) temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:) 820 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 821 temp(:,nyn_mg(l)+1,:) = temp(:,nyn_mg(l),:) 822 ENDIF 823 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 824 temp(:,nys_mg(l)-1,:) = temp(:,nys_mg(l),:) 825 ENDIF 799 826 ENDIF 800 827 … … 832 859 USE control_parameters, & 833 860 ONLY: bc_lr_cyc, bc_ns_cyc, grid_level, ibc_p_b, ibc_p_t, inflow_l,& 834 inflow_n, inflow_r, inflow_s, masking_method, ngsrb, & 861 inflow_n, inflow_r, inflow_s, masking_method, nest_bound_l, & 862 nest_bound_n, nest_bound_r, nest_bound_s, ngsrb, & 835 863 outflow_l, outflow_n, outflow_r, outflow_s, topography 836 864 … … 1411 1439 CALL special_exchange_horiz( p_mg, color ) 1412 1440 1413 1414 IF ( inflow_l .OR. outflow_l ) THEN1441 IF ( .NOT. bc_lr_cyc ) THEN 1442 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) THEN 1415 1443 p_mg(:,:,nxl_mg(l)-1) = p_mg(:,:,nxl_mg(l)) 1416 1444 ENDIF 1417 IF ( inflow_r .OR. outflow_r ) THEN1445 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) THEN 1418 1446 p_mg(:,:,nxr_mg(l)+1) = p_mg(:,:,nxr_mg(l)) 1419 1447 ENDIF … … 1421 1449 1422 1450 IF ( .NOT. bc_ns_cyc ) THEN 1423 IF ( inflow_n .OR. outflow_n ) THEN1451 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) THEN 1424 1452 p_mg(:,nyn_mg(l)+1,:) = p_mg(:,nyn_mg(l),:) 1425 1453 ENDIF 1426 IF ( inflow_s .OR. outflow_s ) THEN1454 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) THEN 1427 1455 p_mg(:,nys_mg(l)-1,:) = p_mg(:,nys_mg(l),:) 1428 1456 ENDIF … … 1913 1941 gamma_mg, grid_level, grid_level_count, ibc_p_b, ibc_p_t, & 1914 1942 inflow_l, inflow_n, inflow_r, inflow_s, maximum_grid_level, & 1915 mg_switch_to_pe0_level, mg_switch_to_pe0, ngsrb, outflow_l, & 1916 outflow_n, outflow_r, outflow_s 1943 mg_switch_to_pe0_level, mg_switch_to_pe0, nest_domain, & 1944 nest_bound_l, nest_bound_n, nest_bound_r, nest_bound_s, & 1945 ngsrb, outflow_l, outflow_n, outflow_r, outflow_s 1917 1946 1918 1947 USE indices, & … … 2062 2091 outflow_l = .TRUE. 2063 2092 outflow_r = .FALSE. 2093 ELSEIF ( nest_domain ) THEN 2094 nest_bound_l = .TRUE. 2095 nest_bound_r = .TRUE. 2064 2096 ENDIF 2065 2097 … … 2074 2106 outflow_n = .TRUE. 2075 2107 outflow_s = .FALSE. 2108 ELSEIF ( nest_domain ) THEN 2109 nest_bound_s = .TRUE. 2110 nest_bound_n = .TRUE. 2076 2111 ENDIF 2077 2112 … … 2146 2181 ELSEIF ( bc_lr_raddir ) THEN 2147 2182 outflow_l = .TRUE. 2183 ELSEIF ( nest_domain ) THEN 2184 nest_bound_l = .TRUE. 2148 2185 ENDIF 2149 2186 ENDIF … … 2154 2191 ELSEIF ( bc_lr_raddir ) THEN 2155 2192 inflow_r = .TRUE. 2193 ELSEIF ( nest_domain ) THEN 2194 nest_bound_r = .TRUE. 2156 2195 ENDIF 2157 2196 ENDIF … … 2162 2201 ELSEIF ( bc_ns_raddir ) THEN 2163 2202 inflow_s = .TRUE. 2203 ELSEIF ( nest_domain ) THEN 2204 nest_bound_s = .TRUE. 2164 2205 ENDIF 2165 2206 ENDIF … … 2170 2211 ELSEIF ( bc_ns_raddir ) THEN 2171 2212 outflow_n = .TRUE. 2213 ELSEIF ( nest_domain ) THEN 2214 nest_bound_n = .TRUE. 2172 2215 ENDIF 2173 2216 ENDIF -
palm/trunk/SOURCE/pres.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 98 98 ONLY: bc_lr_cyc, bc_ns_cyc, conserve_volume_flow, dt_3d, & 99 99 gathered_size, ibc_p_b, ibc_p_t, intermediate_timestep_count, & 100 mg_switch_to_pe0_level, on_device, outflow_l, outflow_n, & 101 outflow_r, outflow_s, psolver, simulated_time, subdomain_size, & 102 topography, volume_flow, volume_flow_area, volume_flow_initial 100 mg_switch_to_pe0_level, nest_domain, nest_bound_l, & 101 nest_bound_n, nest_bound_r, nest_bound_s, on_device, outflow_l, & 102 outflow_n, outflow_r, outflow_s, psolver, simulated_time, & 103 subdomain_size, topography, volume_flow, volume_flow_area, & 104 volume_flow_initial 103 105 104 106 USE cpulog, & … … 138 140 REAL(wp) :: d_weight_pres !< 139 141 140 REAL(wp), DIMENSION(1: 2) :: volume_flow_l !<141 REAL(wp), DIMENSION(1: 2) :: volume_flow_offset !<142 REAL(wp), DIMENSION(1:3) :: volume_flow_l !< 143 REAL(wp), DIMENSION(1:3) :: volume_flow_offset !< 142 144 REAL(wp), DIMENSION(1:nzt) :: w_l !< 143 145 REAL(wp), DIMENSION(1:nzt) :: w_l_l !< … … 162 164 !-- cannot be used in the iterative solver. Therefore, its initial value is 163 165 !-- stored on p_loc, which is then iteratively advanced in every substep. 164 IF ( intermediate_timestep_count == 1 ) THEN166 IF ( intermediate_timestep_count <= 1 ) THEN 165 167 DO i = nxl-1, nxr+1 166 168 DO j = nys-1, nyn+1 … … 267 269 268 270 ! 269 !-- Remove mean vertical velocity 270 IF ( ibc_p_b == 1 .AND. ibc_p_t == 1 ) THEN 271 !-- Remove mean vertical velocity in case that Neumann conditions are 272 !-- used both at bottom and top boundary, and if not a nested domain 273 IF ( ibc_p_b == 1 .AND. ibc_p_t == 1 .AND. .NOT. nest_domain) THEN 271 274 IF ( simulated_time > 0.0_wp ) THEN ! otherwise nzb_w_inner not yet known 272 275 w_l = 0.0_wp; w_l_l = 0.0_wp … … 561 564 !$OMP END PARALLEL 562 565 563 ELSE 566 ELSEIF ( intermediate_timestep_count > 1 ) THEN 564 567 !$OMP PARALLEL PRIVATE (i,j,k) 565 568 !$OMP DO -
palm/trunk/SOURCE/sor.f90
r1683 r1762 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 64 64 USE control_parameters, & 65 65 ONLY: bc_lr_cyc, bc_ns_cyc, ibc_p_b, ibc_p_t, inflow_l, inflow_n, & 66 inflow_r, inflow_s, n_sor, omega_sor, outflow_l, outflow_n, & 66 inflow_r, inflow_s, nest_bound_l, nest_bound_n, nest_bound_r, & 67 nest_bound_s, n_sor, omega_sor, outflow_l, outflow_n, & 67 68 outflow_r, outflow_s 68 69 … … 154 155 !-- Horizontal (Neumann) boundary conditions in case of non-cyclic boundaries 155 156 IF ( .NOT. bc_lr_cyc ) THEN 156 IF ( inflow_l .OR. outflow_l ) p(:,:,nxl-1) = p(:,:,nxl)157 IF ( inflow_r .OR. outflow_r ) p(:,:,nxr+1) = p(:,:,nxr)157 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) p(:,:,nxl-1) = p(:,:,nxl) 158 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) p(:,:,nxr+1) = p(:,:,nxr) 158 159 ENDIF 159 160 IF ( .NOT. bc_ns_cyc ) THEN 160 IF ( inflow_n .OR. outflow_n ) p(:,nyn+1,:) = p(:,nyn,:)161 IF ( inflow_s .OR. outflow_s ) p(:,nys-1,:) = p(:,nys,:)161 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) p(:,nyn+1,:) = p(:,nyn,:) 162 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) p(:,nys-1,:) = p(:,nys,:) 162 163 ENDIF 163 164 … … 216 217 !-- Horizontal (Neumann) boundary conditions in case of non-cyclic boundaries 217 218 IF ( .NOT. bc_lr_cyc ) THEN 218 IF ( inflow_l .OR. outflow_l ) p(:,:,nxl-1) = p(:,:,nxl)219 IF ( inflow_r .OR. outflow_r ) p(:,:,nxr+1) = p(:,:,nxr)219 IF ( inflow_l .OR. outflow_l .OR. nest_bound_l ) p(:,:,nxl-1) = p(:,:,nxl) 220 IF ( inflow_r .OR. outflow_r .OR. nest_bound_r ) p(:,:,nxr+1) = p(:,:,nxr) 220 221 ENDIF 221 222 IF ( .NOT. bc_ns_cyc ) THEN 222 IF ( inflow_n .OR. outflow_n ) p(:,nyn+1,:) = p(:,nyn,:)223 IF ( inflow_s .OR. outflow_s ) p(:,nys-1,:) = p(:,nys,:)223 IF ( inflow_n .OR. outflow_n .OR. nest_bound_n ) p(:,nyn+1,:) = p(:,nyn,:) 224 IF ( inflow_s .OR. outflow_s .OR. nest_bound_s ) p(:,nys-1,:) = p(:,nys,:) 224 225 ENDIF 225 226 -
palm/trunk/SOURCE/time_integration.f90
r1737 r1762 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! Introduction of nested domain feature 22 22 ! 23 23 ! Former revisions: … … 165 165 166 166 USE arrays_3d, & 167 ONLY: diss, dzu, e _p, nr_p, prho, pt, pt_p, pt_init, q_init, q, ql,&168 ql _c, ql_v, ql_vp, qr_p, q_p, ref_state, rho, sa_p, tend, u,&169 u _p, v, vpt, v_p, w_p167 ONLY: diss, dzu, e, e_p, nr_p, prho, pt, pt_p, pt_init, q_init, q, & 168 ql, ql_c, ql_v, ql_vp, qr_p, q_p, ref_state, rho, sa_p, tend, & 169 u, u_p, v, vpt, v_p, w, w_p 170 170 171 171 USE calc_mean_profile_mod, & … … 188 188 icloud_scheme, intermediate_timestep_count, & 189 189 intermediate_timestep_count_max, large_scale_forcing, & 190 loop_optimization, lsf_surf, lsf_vert, masks, mid, 190 loop_optimization, lsf_surf, lsf_vert, masks, mid, nest_domain, & 191 191 netcdf_data_format, neutral, nr_timesteps_this_run, nudging, & 192 192 ocean, on_device, passive_scalar, precipitation, & … … 235 235 USE pegrid 236 236 237 #if defined( PMC_ACTIVE ) 238 USE pmc_interface, & 239 ONLY: client_to_server, nesting_mode, & 240 pmci_ensure_nest_mass_conservation, pmci_client_datatrans, & 241 pmci_client_initialize, pmci_client_synchronize, & 242 pmci_server_datatrans, pmci_server_initialize, & 243 pmci_server_synchronize, pmci_update_new, server_to_client 244 #endif 245 237 246 USE production_e_mod, & 238 247 ONLY: production_e_init … … 290 299 ENDIF 291 300 301 #if defined( PMC_ACTIVE ) 302 ! 303 !-- TO_DO: try to give more meaningful comments here 304 !-- Domain nesting: From server to client commmunication 305 !-- ( direction=SERVER_TO_CLIENT ) 306 !-- Nest initial conditions 307 ! 308 !-- Send initial condition data from server to client 309 CALL pmci_server_initialize 310 ! 311 !-- Receive and interpolate initial data on client 312 CALL pmci_client_initialize 313 ! 314 !-- TO_DO, maybe removed 315 !-- Obs. Nesting may be unnecessary at this point. 316 ! 317 !-- Nest boundary conditions 318 CALL pmci_server_datatrans( server_to_client ) 319 CALL pmci_client_datatrans( server_to_client ) 320 321 IF ( nesting_mode == 'two-way' ) THEN 322 CALL pmci_server_datatrans( client_to_server ) 323 CALL pmci_client_datatrans( client_to_server ) 324 ! 325 !-- Exchange_horiz is needed for all server-domains after the anterpolation 326 CALL exchange_horiz( u, nbgp ) 327 CALL exchange_horiz( v, nbgp ) 328 CALL exchange_horiz( w, nbgp ) 329 CALL exchange_horiz( pt, nbgp ) 330 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 331 intermediate_timestep_count = 0 332 CALL pres 333 ENDIF 334 ! 335 !-- Correct the w top-BC in nest domains to ensure mass conservation. 336 !-- Copy the interpolated/anterpolated boundary values to the _p 337 !-- arrays, too, to make sure the interpolated/anterpolated boundary 338 !-- values are carried over from one RK inner step to another. 339 !-- These actions must not be done for the root domain. 340 IF ( nest_domain ) THEN 341 CALL pmci_ensure_nest_mass_conservation 342 CALL pmci_update_new 343 ENDIF 344 #endif 292 345 293 346 #if defined( __dvrp_graphics ) … … 309 362 IF ( simulated_time /= 0.0_wp ) THEN 310 363 CALL timestep 311 ENDIF 364 365 #if defined( PMC_ACTIVE ) 366 ! 367 !-- TO_DO: try to give more detailed and meaningful comments here 368 !-- Server side must be called first 369 CALL pmci_server_synchronize 370 CALL pmci_client_synchronize 371 #endif 372 ENDIF 373 312 374 313 375 ! … … 628 690 !-- Swap the time levels in preparation for the next time step. 629 691 CALL swap_timelevel 692 693 #if defined( PMC_ACTIVE ) 694 ! 695 !-- TO_DO: try to give more meaningful comments here 696 !-- Domain nesting 697 !-- Note that the nesting operations are omitted intentionally on the 698 !-- first two RK-substeps. 699 CALL cpu_log( log_point(60), 'nesting', 'start' ) 700 ! 701 !-- From server to client commmunication ( direction=SERVER_TO_CLIENT ) 702 CALL pmci_server_datatrans( server_to_client ) 703 CALL pmci_client_datatrans( server_to_client ) 704 705 IF ( nesting_mode == 'two-way' ) THEN 706 ! 707 !-- From client to server commmunication ( direction=CLIENT_TO_SERVER ) 708 CALL pmci_server_datatrans( client_to_server ) 709 CALL pmci_client_datatrans( client_to_server ) 710 ! 711 !-- Exchange_horiz is needed for all server-domains after the 712 !-- anterpolation 713 CALL exchange_horiz( u, nbgp ) 714 CALL exchange_horiz( v, nbgp ) 715 CALL exchange_horiz( w, nbgp ) 716 CALL exchange_horiz( pt, nbgp ) 717 IF ( humidity .OR. passive_scalar ) THEN 718 CALL exchange_horiz( q, nbgp ) 719 ENDIF 720 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 721 ENDIF 722 ! 723 !-- Correct the w top-BC in nest domains to ensure mass conservation. 724 !-- This action must never be done for the root domain. 725 IF ( nest_domain ) THEN 726 CALL pmci_ensure_nest_mass_conservation 727 ! 728 !-- pmc_update_new is not necessary if nesting is made at each substep. 729 CALL pmci_update_new 730 ENDIF 731 732 CALL cpu_log( log_point(60), 'nesting', 'stop' ) 733 #endif 630 734 631 735 ! … … 1041 1145 ! 1042 1146 !-- Output elapsed simulated time in form of a progress bar on stdout 1147 !-- TO_DO: should be done by root domain later 1148 #if ! defined( PMC_ACTIVE ) 1043 1149 IF ( myid == 0 ) CALL output_progress_bar 1150 #endif 1044 1151 1045 1152 CALL cpu_log( log_point_s(10), 'timesteps', 'stop' ) … … 1048 1155 ENDDO ! time loop 1049 1156 1157 !-- TO_DO: should be done by root domain later 1158 #if ! defined( PMC_ACTIVE ) 1050 1159 IF ( myid == 0 ) CALL finish_progress_bar 1160 #endif 1051 1161 1052 1162 #if defined( __dvrp_graphics )
Note: See TracChangeset
for help on using the changeset viewer.