source: palm/trunk/SOURCE/disturb_heatflux.f90 @ 1318

Last change on this file since 1318 was 1318, checked in by raasch, 8 years ago

former files/routines cpu_log and cpu_statistics combined to one module,
which also includes the former data module cpulog from the modules-file,
module interfaces removed

  • Property svn:keywords set to Id
File size: 2.8 KB
Line 
1 SUBROUTINE disturb_heatflux
2
3!--------------------------------------------------------------------------------!
4! This file is part of PALM.
5!
6! PALM is free software: you can redistribute it and/or modify it under the terms
7! of the GNU General Public License as published by the Free Software Foundation,
8! either version 3 of the License, or (at your option) any later version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2014 Leibniz Universitaet Hannover
18!--------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22! module interfaces removed
23!
24! Former revisions:
25! -----------------
26! $Id: disturb_heatflux.f90 1318 2014-03-17 13:35:16Z raasch $
27!
28! 1036 2012-10-22 13:43:42Z raasch
29! code put under GPL (PALM 3.9)
30!
31! 555 2010-09-07 07:32:53Z raasch
32! Bugfix in if statement
33!
34! RCS Log replace by Id keyword, revision history cleaned up
35!
36! Revision 1.7  2006/08/04 14:35:07  raasch
37! Additional parameter in function random_gauss which limits the range of the
38! created random numbers, izuf renamed iran
39!
40! Revision 1.1  1998/03/25 20:03:47  raasch
41! Initial revision
42!
43!
44! Description:
45! ------------
46! Generate random, normally distributed heatflux values and store them as the
47! near-surface heatflux.
48! On parallel computers, too, this random generator is called at all grid points
49! of the total array in order to guarantee the same random distribution of the
50! total array regardless of the number of processors used during the model run.
51!------------------------------------------------------------------------------!
52
53    USE arrays_3d
54    USE control_parameters
55    USE cpulog
56    USE grid_variables
57    USE indices
58
59    IMPLICIT NONE
60
61    INTEGER ::  i, j
62    REAL    ::  random_gauss, randomnumber
63
64
65    CALL cpu_log( log_point(23), 'disturb_heatflux', 'start' )
66
67!
68!-- Generate random disturbances and store them
69    DO  i = 0, nx
70       DO  j = 0, ny
71          randomnumber = random_gauss( iran, 5.0 )
72          IF ( nxl <= i  .AND.  nxr >= i  .AND.  nys <= j  .AND.  nyn >= j ) &
73          THEN
74             IF ( nzb_s_inner(j,i) == 0 )  THEN
75                shf(j,i) = randomnumber * surface_heatflux
76             ELSE
77!
78!--             Over topography surface_heatflux is replaced by wall_heatflux(0)
79                shf(j,i) = randomnumber * wall_heatflux(0)
80             ENDIF
81          ENDIF
82       ENDDO
83    ENDDO
84
85!
86!-- Exchange lateral boundary conditions for the heatflux array
87    CALL exchange_horiz_2d( shf )
88
89    CALL cpu_log( log_point(23), 'disturb_heatflux', 'stop' )
90
91
92 END SUBROUTINE disturb_heatflux
Note: See TracBrowser for help on using the repository browser.