SUBROUTINE disturb_heatflux !------------------------------------------------------------------------------! ! Actual revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Log: disturb_heatflux.f90,v $ ! Revision 1.7 2006/08/04 14:35:07 raasch ! Additional parameter in function random_gauss which limits the range of the ! created random numbers, izuf renamed iran ! ! Revision 1.6 2006/02/23 12:14:38 raasch ! Over topography surface_heatflux is replaced by wall_heatflux(0) ! ! Revision 1.5 2001/03/30 07:22:44 raasch ! Translation of remaining German identifiers (variables, subroutines, etc.) ! ! Revision 1.4 2001/01/22 06:34:34 raasch ! Module test_variables removed ! ! Revision 1.3 2000/12/20 11:57:38 letzel ! All comments translated into English. ! ! Revision 1.2 1998/07/06 12:13:19 raasch ! + USE test_variables ! ! Revision 1.1 1998/03/25 20:03:47 raasch ! Initial revision ! ! ! Description: ! ------------ ! Generate random, normally distributed heatflux values and store them as the ! near-surface heatflux. ! On parallel computers, too, this random generator is called at all grid points ! of the total array in order to guarantee the same random distribution of the ! total array regardless of the number of processors used during the model run. !------------------------------------------------------------------------------! USE arrays_3d USE control_parameters USE cpulog USE grid_variables USE indices USE interfaces IMPLICIT NONE INTEGER :: i, j REAL :: random_gauss, randomnumber CALL cpu_log( log_point(23), 'disturb_heatflux', 'start' ) ! !-- Generate random disturbances and store them DO i = 0, nx DO j = 0, ny randomnumber = random_gauss( iran, 5.0 ) IF ( nxl <= i .AND. nxr >= i .AND. nys <= j .AND. nyn >= j ) & THEN IF ( nzb_s_inner(j,i) == 0 ) THEN shf(j,i) = randomnumber * surface_heatflux ! !-- Over topography surface_heatflux is replaced by wall_heatflux(0) shf(j,i) = randomnumber * wall_heatflux(0) ELSE ENDIF ENDIF ENDDO ENDDO ! !-- Exchange lateral boundary conditions for the heatflux array CALL exchange_horiz_2d( shf ) CALL cpu_log( log_point(23), 'disturb_heatflux', 'stop' ) END SUBROUTINE disturb_heatflux