source: palm/trunk/SOURCE/run_control.f90 @ 1319

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

last commit documented

  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
1 SUBROUTINE run_control
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!
23!
24! Former revisions:
25! -----------------
26! $Id: run_control.f90 1319 2014-03-17 15:08:44Z raasch $
27!
28! 1318 2014-03-17 13:35:16Z raasch
29! module interfaces removed
30!
31! 1257 2013-11-08 15:18:40Z raasch
32! output format for theta* changed to avoid output of *****
33!
34! 1036 2012-10-22 13:43:42Z raasch
35! code put under GPL (PALM 3.9)
36!
37! 1001 2012-09-13 14:08:46Z raasch
38! all actions concerning leapfrog scheme removed
39!
40! 97 2007-06-21 08:23:15Z raasch
41! Timestep and z_i format changed
42!
43! 87 2007-05-22 15:46:47Z raasch
44! var_hom renamed pr_palm
45!
46! 82 2007-04-16 15:40:52Z raasch
47! Preprocessor strings for different linux clusters changed to "lc",
48! routine local_flush is used for buffer flushing
49!
50! RCS Log replace by Id keyword, revision history cleaned up
51!
52! Revision 1.20  2006/06/02 15:23:47  raasch
53! cpp-directives extended for lctit
54!
55! Revision 1.1  1997/08/11 06:25:38  raasch
56! Initial revision
57!
58!
59! Description:
60! ------------
61! Computation and output of run-control quantities
62!------------------------------------------------------------------------------!
63
64    USE cpulog
65    USE indices
66    USE pegrid
67    USE statistics
68    USE control_parameters
69
70    IMPLICIT NONE
71
72    CHARACTER (LEN=1) ::  disturb_chr
73
74!
75!-- If required, do statistics
76    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
77
78!
79!-- Flow_statistics has its own cpu-time measurement
80    CALL cpu_log( log_point(11), 'run_control', 'start' )
81
82!
83!-- Output
84    IF ( myid == 0 )  THEN
85
86!
87!--    Check, whether file unit is already open (may have been opened in header
88!--    before)
89       CALL check_open( 15 )
90
91!
92!--    If required, write header
93       IF ( .NOT. run_control_header )  THEN
94          WRITE ( 15, 100 )
95          run_control_header = .TRUE.
96       ENDIF
97
98!
99!--    If required, set disturbance flag
100       IF ( disturbance_created )  THEN
101          disturb_chr = 'D'
102       ELSE
103          disturb_chr = ' '
104       ENDIF
105       WRITE ( 15, 101 )  runnr, current_timestep_number, simulated_time_chr,  &
106                          simulated_time-INT( simulated_time ), dt_3d,         &
107                          timestep_reason, u_max, disturb_chr,                 &
108                          v_max, disturb_chr, w_max, hom(nzb,1,pr_palm,0),     &
109                          hom(nzb+8,1,pr_palm,0), hom(nzb+3,1,pr_palm,0),      &
110                          hom(nzb+6,1,pr_palm,0), hom(nzb+4,1,pr_palm,0),      &
111                          hom(nzb+5,1,pr_palm,0), hom(nzb+9,1,pr_palm,0),      &
112                          hom(nzb+10,1,pr_palm,0), u_max_ijk(1:3),             &
113                          v_max_ijk(1:3), w_max_ijk(1:3),                      &
114                          advected_distance_x/1000.0,                          &
115                          advected_distance_y/1000.0, mgcycles
116!
117!--    Write buffer contents to disc immediately
118       CALL local_flush( 15 )
119
120    ENDIF
121!
122!-- If required, reset disturbance flag. This has to be done outside the above
123!-- IF-loop, because the flag would otherwise only be reset on PE0
124    IF ( disturbance_created )  disturbance_created = .FALSE.
125
126    CALL cpu_log( log_point(11), 'run_control', 'stop' )
127
128!
129!-- Formats
130100 FORMAT (///'Run-control output:'/ &
131              &'------------------'// &
132          &'RUN  ITER. HH:MM:SS.SS    DT(E)     UMAX     VMAX     WMAX     U', &
133          &'*    W*      THETA*     Z_I     ENERG.   DISTENERG    DIVOLD    ', &
134          &' DIVNEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVEC', &
135          &'Y   MGCYC'/                                                        &
136          &'----------------------------------------------------------------', &
137          &'----------------------------------------------------------------', &
138          &'----------------------------------------------------------------', &
139          &'---------')
140101 FORMAT (I3,1X,I6,1X,A8,F3.2,1X,F8.4,A1,1X,F8.4,A1,F8.4,A1,F8.4,2X,F5.3,2X, &
141            F4.2, &
142            2X,E10.3,2X,F6.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3)
143
144 END SUBROUTINE run_control
Note: See TracBrowser for help on using the repository browser.