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

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