Changeset 1918 for palm/trunk/SOURCE/time_integration.f90
 Timestamp:
 May 27, 2016 2:35:57 PM (5 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE/time_integration.f90
r1917 r1918 19 19 ! Current revisions: 20 20 !  21 ! 21 ! determination of time step moved to the end of the time step loop, 22 ! the first time step is now always calculated before the time step loop (i.e. 23 ! also in case of restart runs) 22 24 ! 23 25 ! Former revisions: … … 260 262 USE indices, & 261 263 ONLY: i_left, i_right, j_north, j_south, nbgp, nx, nxl, nxlg, nxr, & 262 nxrg, nyn, ny s, nzb, nzt, nzb_u_inner, nzb_v_inner264 nxrg, nyn, nyng, nys, nysg, nzb, nzt, nzb_u_inner, nzb_v_inner 263 265 264 266 USE interaction_droplets_ptq_mod, & 265 267 ONLY: interaction_droplets_ptq 268 269 USE interfaces 266 270 267 271 USE kinds … … 311 315 312 316 USE statistics, & 313 ONLY: flow_statistics_called, hom, pr_palm, sums_ls_l 317 ONLY: flow_statistics_called, hom, pr_palm, sums_ls_l, u_max, & 318 u_max_ijk, v_max, v_max_ijk, w_max, w_max_ijk 314 319 315 320 USE surface_layer_fluxes_mod, & … … 326 331 CHARACTER (LEN=9) :: time_to_string !< 327 332 328 ! 329 ! At the beginning of a simulation determine the time step as well as 330 ! determine and print out the run control parameters 331 IF ( simulated_time == 0.0_wp ) CALL timestep 333 REAL(wp) :: dt_3d_old !< temporary storage of timestep to be used for 334 !< steering of run control output interval 335 336 ! 337 ! At beginning determine the first time step 338 CALL timestep 332 339 333 340 ! … … 340 347 ENDIF 341 348 349 ! 350 ! Determine and print out the run control quantities before the first time 351 ! step of this run. For the initial run, some statistics (e.g. divergence) 352 ! need to be determined first. 353 IF ( simulated_time == 0.0_wp ) CALL flow_statistics 342 354 CALL run_control 343 355 … … 349 361 ! In case of model termination initiated by the local model the coupler 350 362 ! must not be called because this would again cause an MPI hang. 351 DO WHILE ( time_coupling >= dt_coupling .AND.terminate_coupled == 0 )363 DO WHILE ( time_coupling >= dt_coupling .AND. terminate_coupled == 0 ) 352 364 CALL surface_coupler 353 365 time_coupling = time_coupling  dt_coupling 354 366 ENDDO 355 IF (time_coupling == 0.0_wp .AND. time_since_reference_point < dt_coupling)& 367 IF (time_coupling == 0.0_wp .AND. & 368 time_since_reference_point < dt_coupling ) & 356 369 THEN 357 370 time_coupling = time_since_reference_point … … 372 385 373 386 CALL cpu_log( log_point_s(10), 'timesteps', 'start' ) 374 375 !376 ! Determine size of next time step377 IF ( simulated_time /= 0.0_wp ) THEN378 CALL timestep379 !380 ! Synchronize the timestep in case of nested run.381 IF ( nested_run ) THEN382 !383 ! Synchronize by unifying the time step.384 ! Global minimum of all timesteps is used for all.385 CALL pmci_synchronize386 ENDIF387 ENDIF388 387 389 388 ! … … 1026 1025 1027 1026 ! 1028 ! Computation and output of run control parameters.1029 ! This is also done whenever perturbations have been imposed1030 IF ( time_run_control >= dt_run_control .OR. &1031 timestep_scheme(1:5) /= 'runge' .OR. disturbance_created ) &1032 THEN1033 CALL run_control1034 IF ( time_run_control >= dt_run_control ) THEN1035 time_run_control = MOD( time_run_control, &1036 MAX( dt_run_control, dt_3d ) )1037 ENDIF1038 ENDIF1039 1040 !1041 1027 ! Profile output (ASCII) on file 1042 1028 IF ( time_dopr_listing >= dt_dopr_listing ) THEN … … 1149 1135 1150 1136 ! 1137 ! Determine size of next time step. Save timestep dt_3d because it is 1138 ! newly calculated in routine timestep, but required further below for 1139 ! steering the run control output interval 1140 dt_3d_old = dt_3d 1141 CALL timestep 1142 1143 ! 1144 ! Computation and output of run control parameters. 1145 ! This is also done whenever perturbations have been imposed 1146 IF ( time_run_control >= dt_run_control .OR. & 1147 timestep_scheme(1:5) /= 'runge' .OR. disturbance_created ) & 1148 THEN 1149 ! IF ( current_timestep_number == 1 ) THEN 1150 ! IF ( nxl < 7 .AND. nxr > 7 .AND. nys < 7 .AND. nyn > 7 ) THEN 1151 ! u(10,7,7) = 0.55 1152 ! ENDIF 1153 ! PRINT*, 'calculating minmax' 1154 ! CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, u, & 1155 ! 'abs', 0.0_wp, u_max, u_max_ijk ) 1156 ! CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, v, & 1157 ! 'abs', 0.0_wp, v_max, v_max_ijk ) 1158 ! CALL global_min_max( nzb, nzt+1, nysg, nyng, nxlg, nxrg, w, & 1159 ! 'abs', 0.0_wp, w_max, w_max_ijk ) 1160 ! PRINT*, 'calculated u_max = ', u_max, ' myid = ', myid 1161 ! ENDIF 1162 CALL run_control 1163 IF ( time_run_control >= dt_run_control ) THEN 1164 time_run_control = MOD( time_run_control, & 1165 MAX( dt_run_control, dt_3d_old ) ) 1166 ENDIF 1167 ENDIF 1168 1169 ! 1170 ! Synchronize the timestep in case of nested run. 1171 IF ( nested_run ) THEN 1172 ! 1173 ! Synchronize by unifying the time step. 1174 ! Global minimum of all timesteps is used for all. 1175 CALL pmci_synchronize 1176 ENDIF 1177 1178 ! 1151 1179 ! Output elapsed simulated time in form of a progress bar on stdout 1152 1180 IF ( myid == 0 ) CALL output_progress_bar
Note: See TracChangeset
for help on using the changeset viewer.