Changeset 1762 for palm/trunk/SOURCE/time_integration.f90
- Timestamp:
- Feb 25, 2016 12:31:13 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.