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

Last change on this file since 345 was 98, checked in by raasch, 17 years ago

updating comments and rc-file

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