Changeset 1764 for palm/trunk/SOURCE/time_integration.f90
- Timestamp:
- Feb 28, 2016 12:45:19 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/time_integration.f90
r1763 r1764 19 19 ! Current revisions: 20 20 ! ------------------ 21 ! 21 ! PMC_ACTIVE flags removed, 22 ! nest synchronization after first call of timestep 22 23 ! 23 24 ! Former revisions: … … 238 239 USE pegrid 239 240 240 #if defined( PMC_ACTIVE )241 241 USE pmc_interface, & 242 ONLY: client_to_server, nest ing_mode,&242 ONLY: client_to_server, nested_run, nesting_mode, & 243 243 pmci_ensure_nest_mass_conservation, pmci_client_datatrans, & 244 244 pmci_client_initialize, pmci_client_synchronize, & 245 245 pmci_server_datatrans, pmci_server_initialize, & 246 246 pmci_server_synchronize, pmci_update_new, server_to_client 247 #endif248 247 249 248 USE production_e_mod, & … … 282 281 IF ( simulated_time == 0.0_wp ) CALL timestep 283 282 283 ! 284 !-- Synchronize the timestep in case of nested run. 285 !-- The server side must be called first 286 IF ( nested_run ) THEN 287 CALL pmci_server_synchronize 288 CALL pmci_client_synchronize 289 ENDIF 290 284 291 CALL run_control 285 286 292 287 293 ! … … 302 308 ENDIF 303 309 304 #if defined( PMC_ACTIVE ) 305 ! 306 !-- TO_DO: try to give more meaningful comments here 307 !-- Domain nesting: From server to client commmunication 308 !-- ( direction=SERVER_TO_CLIENT ) 309 !-- Nest initial conditions 310 ! 311 !-- Send initial condition data from server to client 312 CALL pmci_server_initialize 313 ! 314 !-- Receive and interpolate initial data on client 315 CALL pmci_client_initialize 316 ! 317 !-- TO_DO, maybe removed 318 !-- Obs. Nesting may be unnecessary at this point. 319 ! 320 !-- Nest boundary conditions 321 CALL pmci_server_datatrans( server_to_client ) 322 CALL pmci_client_datatrans( server_to_client ) 323 324 IF ( nesting_mode == 'two-way' ) THEN 325 CALL pmci_server_datatrans( client_to_server ) 326 CALL pmci_client_datatrans( client_to_server ) 327 ! 328 !-- Exchange_horiz is needed for all server-domains after the anterpolation 329 CALL exchange_horiz( u, nbgp ) 330 CALL exchange_horiz( v, nbgp ) 331 CALL exchange_horiz( w, nbgp ) 332 CALL exchange_horiz( pt, nbgp ) 333 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 334 intermediate_timestep_count = 0 335 CALL pres 310 IF ( nested_run ) THEN 311 ! 312 !-- TO_DO: try to give more meaningful comments here 313 !-- Domain nesting: From server to client commmunication 314 !-- ( direction=SERVER_TO_CLIENT ) 315 !-- Nest initial conditions 316 ! 317 !-- Send initial condition data from server to client 318 CALL pmci_server_initialize 319 ! 320 !-- Receive and interpolate initial data on client 321 CALL pmci_client_initialize 322 ! 323 !-- TO_DO, maybe removed 324 !-- Obs. Nesting may be unnecessary at this point. 325 ! 326 !-- Nest boundary conditions 327 CALL pmci_server_datatrans( server_to_client ) 328 CALL pmci_client_datatrans( server_to_client ) 329 330 IF ( nesting_mode == 'two-way' ) THEN 331 CALL pmci_server_datatrans( client_to_server ) 332 CALL pmci_client_datatrans( client_to_server ) 333 ! 334 !-- Exchange_horiz is needed for all server-domains after the anterpolation 335 CALL exchange_horiz( u, nbgp ) 336 CALL exchange_horiz( v, nbgp ) 337 CALL exchange_horiz( w, nbgp ) 338 CALL exchange_horiz( pt, nbgp ) 339 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 340 intermediate_timestep_count = 0 341 CALL pres 342 ENDIF 343 ! 344 !-- Correct the w top-BC in nest domains to ensure mass conservation. 345 !-- Copy the interpolated/anterpolated boundary values to the _p 346 !-- arrays, too, to make sure the interpolated/anterpolated boundary 347 !-- values are carried over from one RK inner step to another. 348 !-- These actions must not be done for the root domain. 349 IF ( nest_domain ) THEN 350 CALL pmci_ensure_nest_mass_conservation 351 CALL pmci_update_new 352 ENDIF 353 336 354 ENDIF 337 !338 !-- Correct the w top-BC in nest domains to ensure mass conservation.339 !-- Copy the interpolated/anterpolated boundary values to the _p340 !-- arrays, too, to make sure the interpolated/anterpolated boundary341 !-- values are carried over from one RK inner step to another.342 !-- These actions must not be done for the root domain.343 IF ( nest_domain ) THEN344 CALL pmci_ensure_nest_mass_conservation345 CALL pmci_update_new346 ENDIF347 #endif348 355 349 356 #if defined( __dvrp_graphics ) … … 366 373 CALL timestep 367 374 368 #if defined( PMC_ACTIVE ) 369 ! 370 !-- TO_DO: try to give more detailed and meaningful comments here371 !-- Server side must be called first372 CALL pmci_server_synchronize373 CALL pmci_client_synchronize374 #endif 375 IF ( nested_run ) THEN 376 ! 377 !-- TO_DO: try to give more detailed and meaningful comments here 378 !-- Server side must be called first 379 CALL pmci_server_synchronize 380 CALL pmci_client_synchronize 381 ENDIF 375 382 ENDIF 376 383 … … 694 701 CALL swap_timelevel 695 702 696 #if defined( PMC_ACTIVE ) 697 ! 698 !-- TO_DO: try to give more meaningful comments here 699 !-- Domain nesting 700 !-- Note that the nesting operations are omitted intentionally on the 701 !-- first two RK-substeps. 702 CALL cpu_log( log_point(60), 'nesting', 'start' ) 703 ! 704 !-- From server to client commmunication ( direction=SERVER_TO_CLIENT ) 705 CALL pmci_server_datatrans( server_to_client ) 706 CALL pmci_client_datatrans( server_to_client ) 707 708 IF ( nesting_mode == 'two-way' ) THEN 709 ! 710 !-- From client to server commmunication ( direction=CLIENT_TO_SERVER ) 711 CALL pmci_server_datatrans( client_to_server ) 712 CALL pmci_client_datatrans( client_to_server ) 713 ! 714 !-- Exchange_horiz is needed for all server-domains after the 715 !-- anterpolation 716 CALL exchange_horiz( u, nbgp ) 717 CALL exchange_horiz( v, nbgp ) 718 CALL exchange_horiz( w, nbgp ) 719 CALL exchange_horiz( pt, nbgp ) 720 IF ( humidity .OR. passive_scalar ) THEN 721 CALL exchange_horiz( q, nbgp ) 722 ENDIF 723 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 724 ENDIF 725 ! 726 !-- Correct the w top-BC in nest domains to ensure mass conservation. 727 !-- This action must never be done for the root domain. 728 IF ( nest_domain ) THEN 729 CALL pmci_ensure_nest_mass_conservation 730 ! 731 !-- pmc_update_new is not necessary if nesting is made at each substep. 732 CALL pmci_update_new 733 ENDIF 734 735 CALL cpu_log( log_point(60), 'nesting', 'stop' ) 736 #endif 703 IF ( nested_run ) THEN 704 ! 705 !-- TO_DO: try to give more meaningful comments here 706 !-- Domain nesting 707 !-- Note that the nesting operations are omitted intentionally on the 708 !-- first two RK-substeps. 709 CALL cpu_log( log_point(60), 'nesting', 'start' ) 710 ! 711 !-- From server to client commmunication ( direction=SERVER_TO_CLIENT ) 712 CALL pmci_server_datatrans( server_to_client ) 713 CALL pmci_client_datatrans( server_to_client ) 714 715 IF ( nesting_mode == 'two-way' ) THEN 716 ! 717 !-- From client to server commmunication ( direction=CLIENT_TO_SERVER ) 718 CALL pmci_server_datatrans( client_to_server ) 719 CALL pmci_client_datatrans( client_to_server ) 720 ! 721 !-- Exchange_horiz is needed for all server-domains after the 722 !-- anterpolation 723 CALL exchange_horiz( u, nbgp ) 724 CALL exchange_horiz( v, nbgp ) 725 CALL exchange_horiz( w, nbgp ) 726 CALL exchange_horiz( pt, nbgp ) 727 IF ( humidity .OR. passive_scalar ) THEN 728 CALL exchange_horiz( q, nbgp ) 729 ENDIF 730 IF ( .NOT. constant_diffusion ) CALL exchange_horiz( e, nbgp ) 731 ENDIF 732 ! 733 !-- Correct the w top-BC in nest domains to ensure mass conservation. 734 !-- This action must never be done for the root domain. 735 IF ( nest_domain ) THEN 736 CALL pmci_ensure_nest_mass_conservation 737 ! 738 !-- pmc_update_new is not necessary if nesting is made at each 739 !-- substep 740 CALL pmci_update_new 741 ENDIF 742 743 CALL cpu_log( log_point(60), 'nesting', 'stop' ) 744 745 ENDIF 737 746 738 747 ! … … 1148 1157 ! 1149 1158 !-- Output elapsed simulated time in form of a progress bar on stdout 1150 !-- TO_DO: should be done by root domain later1151 #if ! defined( PMC_ACTIVE )1152 1159 IF ( myid == 0 ) CALL output_progress_bar 1153 #endif1154 1160 1155 1161 CALL cpu_log( log_point_s(10), 'timesteps', 'stop' ) … … 1158 1164 ENDDO ! time loop 1159 1165 1160 !-- TO_DO: should be done by root domain later1161 #if ! defined( PMC_ACTIVE )1162 1166 IF ( myid == 0 ) CALL finish_progress_bar 1163 #endif1164 1167 1165 1168 #if defined( __dvrp_graphics )
Note: See TracChangeset
for help on using the changeset viewer.