Changeset 3288 for palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
- Timestamp:
- Sep 28, 2018 10:23:08 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/synthetic_turbulence_generator_mod.f90
r3274 r3288 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Introduce module parameter for number of inflow profiles 23 23 ! 24 24 ! Former revisions: … … 152 152 153 153 USE control_parameters, & 154 ONLY: initializing_actions, message_string, syn_turb_gen 154 ONLY: initializing_actions, num_mean_inflow_profiles, message_string, & 155 syn_turb_gen 155 156 156 157 USE cpulog, & … … 439 440 440 441 USE arrays_3d, & 441 ONLY: d dzw, u_init, v_init, zu442 ONLY: dzw, ddzw, u_init, v_init, zu, zw 442 443 443 444 USE control_parameters, & … … 445 446 446 447 USE grid_variables, & 447 ONLY: ddx, ddy 448 ONLY: ddx, ddy, dx, dy 448 449 449 450 USE indices, & … … 510 511 511 512 IF ( .NOT. ALLOCATED( mean_inflow_profiles ) ) & 512 ALLOCATE( mean_inflow_profiles(nzb:nzt+1, 5) )513 ALLOCATE( mean_inflow_profiles(nzb:nzt+1,1:num_mean_inflow_profiles) ) 513 514 514 515 ALLOCATE ( a11(nzb:nzt+1), a21(nzb:nzt+1), a22(nzb:nzt+1), & … … 528 529 IF ( MOD( nz , pdims(1) ) /= 0 .AND. myidx == id_stg_right ) & 529 530 nzt_x_stg = nzt_x_stg + myidx * ( nnz - INT( nnz ) ) 530 ! nzt_x_stg = myidx * nnz + MOD( nz , pdims(1) )531 531 532 532 IF ( nesting_offline .OR. ( child_domain .AND. rans_mode_parent & … … 538 538 IF ( MOD( nz , pdims(2) ) /= 0 .AND. myidy == id_stg_north ) & 539 539 nzt_y_stg = nzt_y_stg + myidy * ( nnz - INT( nnz ) ) 540 ! nzt_y_stg = myidy * nnz + MOD( nz , pdims(2) )541 540 ENDIF 542 541 … … 670 669 ELSE 671 670 ! 672 !-- Set-up defaul length scales. Assume exponentially decreasing length 673 !-- scales and isotropic turbulence. 671 !-- Set-up default turbulent length scales. From the numerical point of 672 !-- view the imposed perturbations should not be immediately dissipated 673 !-- by the numerics. The numerical dissipation, however, acts on scales 674 !-- up to 8 x the grid spacing. For this reason, set the turbulence 675 !-- length scale to 8 time the grid spacing. Further, above the boundary 676 !-- layer height, set turbulence lenght scales to zero (equivalent to not 677 !-- imposing any perturbations) in order to save computational costs. 674 678 !-- Typical length (time) scales of 100 m (s) should be a good compromise 675 679 !-- between all stratrifications. Near-surface variances are fixed to … … 684 688 zu(k) > 0.3 * zu(nzt) & 685 689 ) 686 length_scale_z = length_scale_surface * EXP( dum_exp ) 690 length_scale_z = 8.0_wp * MIN( dx, dy, dzw(k) ) 691 692 ! IF ( zu(k) > zi_richardson ) 687 693 688 694 nux(k) = MAX( INT( length_scale_z * ddx ), 1 ) … … 709 715 710 716 ENDDO 717 711 718 nux(nzb) = nux(nzb+1) 712 719 nuy(nzb) = nuy(nzb+1)
Note: See TracChangeset
for help on using the changeset viewer.