SUBROUTINE disturb_heatflux !------------------------------------------------------------------------------! ! Current revisions: ! ----------------- ! ! ! Former revisions: ! ----------------- ! $Id: disturb_heatflux.f90 484 2010-02-05 07:36:54Z maronga $ ! RCS Log replace by Id keyword, revision history cleaned up ! ! 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.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