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

Last change on this file since 82 was 82, checked in by raasch, 14 years ago

vorlaeufige Standalone-Version fuer Linux-Cluster

  • Property svn:keywords set to Id
File size: 4.0 KB
Line 
1 SUBROUTINE run_control
2
3!------------------------------------------------------------------------------!
4! Actual revisions:
5! -----------------
6! Preprocessor strings for different linux clusters changed to "lc",
7! routine local_flush is used for buffer flushing
8!
9! Former revisions:
10! -----------------
11! $Id: run_control.f90 82 2007-04-16 15:40:52Z raasch $
12! RCS Log replace by Id keyword, revision history cleaned up
13!
14! Revision 1.20  2006/06/02 15:23:47  raasch
15! cpp-directives extended for lctit
16!
17! Revision 1.1  1997/08/11 06:25:38  raasch
18! Initial revision
19!
20!
21! Description:
22! ------------
23! Computation and output of run-control quantities
24!------------------------------------------------------------------------------!
25
26    USE cpulog
27    USE indices
28    USE interfaces
29    USE pegrid
30    USE statistics
31    USE control_parameters
32
33    IMPLICIT NONE
34
35    CHARACTER (LEN=1) ::  change_chr, disturb_chr
36
37!
38!-- If required, do statistics
39    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
40
41!
42!-- Flow_statistics has its own cpu-time measurement
43    CALL cpu_log( log_point(11), 'run_control', 'start' )
44
45!
46!-- Output
47    IF ( myid == 0 )  THEN
48
49!
50!--    Check, whether file unit is already open (may have been opened in header
51!--    before)
52       CALL check_open( 15 )
53
54!
55!--    If required, write header
56       IF ( .NOT. run_control_header )  THEN
57          WRITE ( 15, 100 )
58          run_control_header = .TRUE.
59       ENDIF
60
61!
62!--    Output the the beginning of the run receives no information about an
63!--    Euler-timestep
64       IF ( dt_changed  .AND.  simulated_time /= 0.0  .AND. &
65            timestep_scheme(1:5) /= 'runge' )  THEN
66          IF ( timestep_scheme == 'leapfrog' )  THEN
67             change_chr = 'L'
68          ELSE
69             change_chr = 'E'
70          ENDIF
71       ELSE
72          change_chr = ' '
73       ENDIF
74!
75!--    If required, set disturbance flag
76       IF ( disturbance_created )  THEN
77          disturb_chr = 'D'
78       ELSE
79          disturb_chr = ' '
80       ENDIF
81       WRITE ( 15, 101 )  runnr, current_timestep_number, simulated_time_chr,  &
82                          simulated_time-INT( simulated_time ), dt_3d,         &
83                          timestep_reason, change_chr, u_max, disturb_chr,     &
84                          v_max, disturb_chr, w_max, hom(nzb,1,var_hom,0),     &
85                          hom(nzb+8,1,var_hom,0), hom(nzb+3,1,var_hom,0),      &
86                          hom(nzb+6,1,var_hom,0), hom(nzb+4,1,var_hom,0),      &
87                          hom(nzb+5,1,var_hom,0), hom(nzb+9,1,var_hom,0),      &
88                          hom(nzb+10,1,var_hom,0), u_max_ijk(1:3),             &
89                          v_max_ijk(1:3), w_max_ijk(1:3),                      &
90                          advected_distance_x/1000.0,                          &
91                          advected_distance_y/1000.0, mgcycles
92!
93!--    Write buffer contents to disc immediately
94       CALL local_flush( 15 )
95
96    ENDIF
97!
98!-- If required, reset disturbance flag. This has to be done outside the above
99!-- IF-loop, because the flag would otherwise only be reset on PE0
100    IF ( disturbance_created )  disturbance_created = .FALSE.
101
102    CALL cpu_log( log_point(11), 'run_control', 'stop' )
103
104!
105!-- Formats
106100 FORMAT (///'Run-control output:'/ &
107              &'------------------'// &
108           &'RUN  ITER. HH:MM:SS.SS   DT(E)     UMAX     VMAX     WMAX     U*', &
109           &'    W*   THETA*   Z_I     ENERG.   DISTENERG    DIVOLD     DIVNE', &
110           &'W     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   MG', &
111           &'CYC'/ &
112           &'----------------------------------------------------------------', &
113           &'----------------------------------------------------------------', &
114           &'----------------------------------------------------------------', &
115           &'--')
116101 FORMAT (I3,1X,I6,1X,A8,F3.2,1X,F7.4,A1,A1,F8.4,A1,F8.4,A1,F8.4,2X,F5.3,2X, &
117            F4.2, &
118            2X,F6.3,2X,F5.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3)
119
120 END SUBROUTINE run_control
Note: See TracBrowser for help on using the repository browser.