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

Last change on this file since 1025 was 1002, checked in by raasch, 12 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 3.8 KB
Line 
1 SUBROUTINE run_control
2
3!------------------------------------------------------------------------------!
4! Current revisions:
5! -----------------
6!
7!
8! Former revisions:
9! -----------------
10! $Id: run_control.f90 1002 2012-09-13 15:12:24Z letzel $
11!
12! 1001 2012-09-13 14:08:46Z raasch
13! all actions concerning leapfrog scheme removed
14!
15! 97 2007-06-21 08:23:15Z raasch
16! Timestep and z_i format changed
17!
18! 87 2007-05-22 15:46:47Z raasch
19! var_hom renamed pr_palm
20!
21! 82 2007-04-16 15:40:52Z raasch
22! Preprocessor strings for different linux clusters changed to "lc",
23! routine local_flush is used for buffer flushing
24!
25! RCS Log replace by Id keyword, revision history cleaned up
26!
27! Revision 1.20  2006/06/02 15:23:47  raasch
28! cpp-directives extended for lctit
29!
30! Revision 1.1  1997/08/11 06:25:38  raasch
31! Initial revision
32!
33!
34! Description:
35! ------------
36! Computation and output of run-control quantities
37!------------------------------------------------------------------------------!
38
39    USE cpulog
40    USE indices
41    USE interfaces
42    USE pegrid
43    USE statistics
44    USE control_parameters
45
46    IMPLICIT NONE
47
48    CHARACTER (LEN=1) ::  disturb_chr
49
50!
51!-- If required, do statistics
52    IF ( .NOT. flow_statistics_called )  CALL flow_statistics
53
54!
55!-- Flow_statistics has its own cpu-time measurement
56    CALL cpu_log( log_point(11), 'run_control', 'start' )
57
58!
59!-- Output
60    IF ( myid == 0 )  THEN
61
62!
63!--    Check, whether file unit is already open (may have been opened in header
64!--    before)
65       CALL check_open( 15 )
66
67!
68!--    If required, write header
69       IF ( .NOT. run_control_header )  THEN
70          WRITE ( 15, 100 )
71          run_control_header = .TRUE.
72       ENDIF
73
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, u_max, disturb_chr,                 &
84                          v_max, disturb_chr, w_max, hom(nzb,1,pr_palm,0),     &
85                          hom(nzb+8,1,pr_palm,0), hom(nzb+3,1,pr_palm,0),      &
86                          hom(nzb+6,1,pr_palm,0), hom(nzb+4,1,pr_palm,0),      &
87                          hom(nzb+5,1,pr_palm,0), hom(nzb+9,1,pr_palm,0),      &
88                          hom(nzb+10,1,pr_palm,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     DIV', &
110          &'NEW     UMAX(KJI)    VMAX(KJI)    WMAX(KJI)   ADVECX   ADVECY   ', &
111          &'MGCYC'/                                                            &
112          &'----------------------------------------------------------------', &
113          &'----------------------------------------------------------------', &
114          &'----------------------------------------------------------------', &
115          &'-----')
116101 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, &
117            F4.2, &
118            2X,F6.3,2X,F6.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.