source: palm/tags/release-3.1b/SOURCE/run_control.f90 @ 3862

Last change on this file since 3862 was 4, checked in by raasch, 17 years ago

Id keyword set as property for all *.f90 files

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