Changeset 4433
- Timestamp:
- Feb 28, 2020 10:14:43 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/turbulence_closure_mod.f90
r4370 r4433 25 25 ! ----------------- 26 26 ! $Id$ 27 ! remove warning for newly implemented RANS mode 28 ! 29 ! 4370 2020-01-10 14:00:44Z raasch 27 30 ! vector directives added to force vectorization on Intel19 compiler 28 ! 31 ! 29 32 ! 4346 2019-12-18 11:55:56Z motisi 30 33 ! Introduction of wall_flags_total_0, which currently sets bits based on static 31 34 ! topography information used in wall_flags_static_0 32 ! 35 ! 33 36 ! 4329 2019-12-10 15:46:36Z motisi 34 37 ! Renamed wall_flags_0 to wall_flags_static_0 35 ! 38 ! 36 39 ! 4182 2019-08-22 15:20:23Z scharf 37 40 ! Corrected "Former revisions" section 38 ! 41 ! 39 42 ! 4177 2019-08-20 14:32:34Z gronemeier 40 43 ! add comment 41 ! 44 ! 42 45 ! 4170 2019-08-19 17:12:31Z gronemeier 43 46 ! - add performance optimizations according to K. Ketelsen … … 46 49 ! - bugfix in using l_wall in initialization (consider wall_adjustment_factor) 47 50 ! - always initialize diss and save the dissipation to that array 48 ! 51 ! 49 52 ! 4168 2019-08-16 13:50:17Z suehring 50 53 ! Replace function get_topography_top_index by topo_top_ind 51 ! 54 ! 52 55 ! 4110 2019-07-22 17:05:21Z suehring 53 ! pass integer flag array as well as boundary flags to WS scalar advection 56 ! pass integer flag array as well as boundary flags to WS scalar advection 54 57 ! routine 55 ! 58 ! 56 59 ! 4109 2019-07-22 17:00:34Z suehring 57 60 ! - Modularize setting of boundary conditions for TKE and dissipation 58 61 ! - Neumann boundary condition for TKE at model top is set also in child domain 59 ! - Revise setting of Neumann boundary conditions at non-cyclic lateral 62 ! - Revise setting of Neumann boundary conditions at non-cyclic lateral 60 63 ! boundaries 61 ! - Bugfix, set Neumann boundary condition for TKE at vertical wall instead of 64 ! - Bugfix, set Neumann boundary condition for TKE at vertical wall instead of 62 65 ! an implicit Dirichlet boundary condition which implied a sink of TKE 63 66 ! at vertical walls 64 ! 67 ! 65 68 ! 4048 2019-06-21 21:00:21Z knoop 66 69 ! write out preprocessor directives; remove tailing whitespaces … … 78 81 ! 3684 2019-01-20 20:20:58Z knoop 79 82 ! Remove unused variable simulated_time 80 ! 83 ! 81 84 ! 2696 2017-12-14 17:12:51Z kanani 82 85 ! Initial revision … … 161 164 USE statistics, & 162 165 ONLY: hom, hom_sum, statistic_regions 163 166 164 167 USE surface_mod, & 165 168 ONLY: bc_h, & … … 312 315 USE pmc_interface, & 313 316 ONLY : rans_mode_parent 314 317 315 318 IMPLICIT NONE 316 319 … … 325 328 ! 326 329 !-- In LES mode, Neumann conditions with de/x_i=0 are assumed at solid walls. 327 !-- Note, only TKE is prognostic in this case and dissipation is only 328 !-- a diagnostic quantity. 330 !-- Note, only TKE is prognostic in this case and dissipation is only 331 !-- a diagnostic quantity. 329 332 IF ( .NOT. rans_mode ) THEN 330 333 ! … … 335 338 !$ACC PRESENT(bc_h, e_p) 336 339 DO m = 1, bc_h(l)%ns 337 i = bc_h(l)%i(m) 340 i = bc_h(l)%i(m) 338 341 j = bc_h(l)%j(m) 339 342 k = bc_h(l)%k(m) … … 345 348 DO l = 0, 3 346 349 ! 347 !-- Note concerning missing ACC directive for this loop: Even though 348 !-- the data structure bc_v is present, it may not contain any 349 !-- allocated arrays in the flat but also in a topography case, 350 !-- leading to a runtime error. Therefore, omit ACC directives 351 !-- for this loop, in contrast to the bc_h loop. 350 !-- Note concerning missing ACC directive for this loop: Even though 351 !-- the data structure bc_v is present, it may not contain any 352 !-- allocated arrays in the flat but also in a topography case, 353 !-- leading to a runtime error. Therefore, omit ACC directives 354 !-- for this loop, in contrast to the bc_h loop. 352 355 !$OMP PARALLEL DO PRIVATE( i, j, k ) 353 356 DO m = 1, bc_v(l)%ns 354 i = bc_v(l)%i(m) 357 i = bc_v(l)%i(m) 355 358 j = bc_v(l)%j(m) 356 359 k = bc_v(l)%k(m) … … 427 430 ! 428 431 !-- Nesting case: if parent operates in RANS mode and child in LES mode, 429 !-- no TKE is transfered. This case, set Neumann conditions at lateral and 430 !-- top child boundaries. 432 !-- no TKE is transfered. This case, set Neumann conditions at lateral and 433 !-- top child boundaries. 431 434 !-- If not ( both either in RANS or in LES mode ), TKE boundary condition 432 !-- is treated in the nesting. 435 !-- is treated in the nesting. 433 436 If ( child_domain ) THEN 434 437 IF ( rans_mode_parent .AND. .NOT. rans_mode ) THEN … … 443 446 ENDIF 444 447 ! 445 !-- At in- and outflow boundaries also set Neumann boundary conditions 446 !-- for the SGS-TKE. An exception is made for the child domain if 447 !-- both parent and child operate in RANS mode. This case no 448 !-- At in- and outflow boundaries also set Neumann boundary conditions 449 !-- for the SGS-TKE. An exception is made for the child domain if 450 !-- both parent and child operate in RANS mode. This case no 448 451 !-- lateral Neumann boundary conditions will be set but Dirichlet 449 452 !-- conditions will be set in the nesting. … … 456 459 IF ( bc_dirichlet_n .OR. bc_radiation_n ) THEN 457 460 e_p(:,nyn+1,:) = e_p(:,nyn,:) 458 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 461 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 459 462 ENDIF 460 463 IF ( bc_dirichlet_l .OR. bc_radiation_l ) THEN 461 464 e_p(:,:,nxl-1) = e_p(:,:,nxl) 462 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 465 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 463 466 ENDIF 464 467 IF ( bc_dirichlet_r .OR. bc_radiation_r ) THEN 465 468 e_p(:,:,nxr+1) = e_p(:,:,nxr) 466 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 469 IF ( rans_tke_e ) diss_p(:,nyn+1,:) = diss_p(:,nyn,:) 467 470 ENDIF 468 471 ENDIF … … 470 473 471 474 ! 472 !-- Boundary conditions for TKE dissipation rate in RANS mode. 475 !-- Boundary conditions for TKE dissipation rate in RANS mode. 473 476 IF ( rans_tke_e ) THEN 474 477 ! … … 550 553 ENDIF 551 554 552 END SUBROUTINE tcm_boundary_conds 553 555 END SUBROUTINE tcm_boundary_conds 556 554 557 !------------------------------------------------------------------------------! 555 558 ! Description: … … 607 610 CALL message( 'tcm_check_parameters', 'PA0501', 1, 2, 0, 6, 0 ) 608 611 ENDIF 609 610 message_string = 'RANS mode is still in development! ' // &611 '&Not all features of PALM are yet compatible '// &612 'with RANS mode. &Use at own risk!'613 CALL message( 'tcm_check_parameters', 'PA0502', 0, 1, 0, 6, 0 )614 612 615 613 ELSE … … 1495 1493 l_wall(k,j,i) = MIN( l_wall(k,j,i), l_grid(k), & 1496 1494 SQRT( 0.25_wp * dx**2 + & 1497 ( zw(k) - zu(k) )**2 ) ) 1495 ( zw(k) - zu(k) )**2 ) ) 1498 1496 ! 1499 1497 !-- xy-distance (horizontal edges) … … 4113 4111 ! 4114 4112 !-- Neumann boundary condition for dissipation diss(nzb,:,:) = diss(nzb+1,:,:). 4115 !-- Note, bc cannot be set in tcm_boundary conditions as the dissipation 4116 !-- in LES mode is only a diagnostic quantity. 4113 !-- Note, bc cannot be set in tcm_boundary conditions as the dissipation 4114 !-- in LES mode is only a diagnostic quantity. 4117 4115 IF ( .NOT. rans_tke_e .AND. ( use_sgs_for_particles .OR. & 4118 4116 wang_kernel .OR. collision_turbulence ) ) THEN … … 4294 4292 !-- For each surface type determine start and end index (in case of elevated 4295 4293 !-- topography several up/downward facing surfaces may exist. 4296 !-- Note, bc cannot be set in tcm_boundary conditions as the dissipation 4297 !-- in LES mode is only a diagnostic quantity. 4294 !-- Note, bc cannot be set in tcm_boundary conditions as the dissipation 4295 !-- in LES mode is only a diagnostic quantity. 4298 4296 IF ( .NOT. rans_tke_e .AND. ( use_sgs_for_particles .OR. wang_kernel & 4299 4297 .OR. collision_turbulence ) ) THEN … … 4684 4682 !-- @note The following code cannot be transferred to a subroutine 4685 4683 !-- due to errors when using OpenACC directives. The execution 4686 !-- crashes reliably if a subroutine is called at this point (the 4684 !-- crashes reliably if a subroutine is called at this point (the 4687 4685 !-- reasong for this behaviour is unknown, however). 4688 4686 dvar_dz = atmos_ocean_sign * ( var(k+1,j,i) - var(k-1,j,i) ) * dd2zu(k)
Note: See TracChangeset
for help on using the changeset viewer.