[1] | 1 | SUBROUTINE run_control |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
| 4 | ! Actual revisions: |
---|
| 5 | ! ----------------- |
---|
| 6 | ! |
---|
| 7 | ! |
---|
| 8 | ! Former revisions: |
---|
| 9 | ! ----------------- |
---|
| 10 | ! $Log: run_control.f90,v $ |
---|
| 11 | ! Revision 1.20 2006/06/02 15:23:47 raasch |
---|
| 12 | ! cpp-directives extended for lctit |
---|
| 13 | ! |
---|
| 14 | ! Revision 1.19 2006/02/23 12:54:21 raasch |
---|
| 15 | ! Output buffer is flushed also on NEC, nt_anz renamed current_timestep_number |
---|
| 16 | ! |
---|
| 17 | ! Revision 1.18 2004/01/30 10:38:26 raasch |
---|
| 18 | ! Euler-step information removed in case of Runge-Kutta |
---|
| 19 | ! |
---|
| 20 | ! Revision 1.17 2003/10/29 09:13:18 raasch |
---|
| 21 | ! Data are forced to be immediately written on disc on IBM and Linux clusters |
---|
| 22 | ! |
---|
| 23 | ! Revision 1.16 2003/04/16 13:12:39 raasch |
---|
| 24 | ! Output format of iteration count enlarged |
---|
| 25 | ! |
---|
| 26 | ! Revision 1.15 2001/07/20 13:13:45 raasch |
---|
| 27 | ! Additional output of the number of multigrid cycles used |
---|
| 28 | ! |
---|
| 29 | ! Revision 1.14 2001/03/30 07:52:24 raasch |
---|
| 30 | ! Translation of remaining German identifiers (variables, subroutines, etc.) |
---|
| 31 | ! |
---|
| 32 | ! Revision 1.13 2001/01/22 08:04:54 raasch |
---|
| 33 | ! Module test_variables removed |
---|
| 34 | ! |
---|
| 35 | ! Revision 1.12 2001/01/03 13:46:12 letzel |
---|
| 36 | ! File output and all comments translated into English. |
---|
| 37 | ! |
---|
| 38 | ! Revision 1.11 1998/09/22 17:29:49 raasch |
---|
| 39 | ! Ausgabeformate t.w. um einige Kommastellen erweitert |
---|
| 40 | ! |
---|
| 41 | ! Revision 1.10 1998/07/06 12:32:56 raasch |
---|
| 42 | ! + USE test_variables |
---|
| 43 | ! |
---|
| 44 | ! Revision 1.9 1998/04/21 16:23:48 raasch |
---|
| 45 | ! Ausgabe von advected_distance |
---|
| 46 | ! |
---|
| 47 | ! Revision 1.8 1998/03/30 11:50:16 raasch |
---|
| 48 | ! Divergenzen stehen jetzt in hom |
---|
| 49 | ! |
---|
| 50 | ! Revision 1.7 1998/03/25 13:57:06 raasch |
---|
| 51 | ! Erweiterungen fuer Gebietsstatistiken, |
---|
| 52 | ! dt in dt_3d umbenannt |
---|
| 53 | ! |
---|
| 54 | ! Revision 1.6 1998/03/18 20:19:50 raasch |
---|
| 55 | ! Pruefen, ob Einheit 15 bereits geoeffnet ist |
---|
| 56 | ! |
---|
| 57 | ! Revision 1.5 1998/03/03 08:01:49 raasch |
---|
| 58 | ! Aufruf von flow_statistics erfolgt jetzt gegebenenfalls hier, |
---|
| 59 | ! Ausgabe von w* und z_i |
---|
| 60 | ! |
---|
| 61 | ! Revision 1.4 1998/02/04 16:10:46 raasch |
---|
| 62 | ! e_total und e_pertu stehen jetzt im Feld hom |
---|
| 63 | ! |
---|
| 64 | ! Revision 1.3 1998/01/23 10:08:01 raasch |
---|
| 65 | ! Ausgabe von u* und theta* |
---|
| 66 | ! |
---|
| 67 | ! Revision 1.2 1997/08/26 06:34:36 raasch |
---|
| 68 | ! Schoenheitskorrekturen |
---|
| 69 | ! |
---|
| 70 | ! Revision 1.1 1997/08/11 06:25:38 raasch |
---|
| 71 | ! Initial revision |
---|
| 72 | ! |
---|
| 73 | ! |
---|
| 74 | ! Description: |
---|
| 75 | ! ------------ |
---|
| 76 | ! Computation and output of run-control quantities |
---|
| 77 | !------------------------------------------------------------------------------! |
---|
| 78 | |
---|
| 79 | USE cpulog |
---|
| 80 | USE indices |
---|
| 81 | USE interfaces |
---|
| 82 | USE pegrid |
---|
| 83 | USE statistics |
---|
| 84 | USE control_parameters |
---|
| 85 | |
---|
| 86 | IMPLICIT NONE |
---|
| 87 | |
---|
| 88 | CHARACTER (LEN=1) :: change_chr, disturb_chr |
---|
| 89 | |
---|
| 90 | ! |
---|
| 91 | !-- If required, do statistics |
---|
| 92 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
| 93 | |
---|
| 94 | ! |
---|
| 95 | !-- Flow_statistics has its own cpu-time measurement |
---|
| 96 | CALL cpu_log( log_point(11), 'run_control', 'start' ) |
---|
| 97 | |
---|
| 98 | ! |
---|
| 99 | !-- Output |
---|
| 100 | IF ( myid == 0 ) THEN |
---|
| 101 | |
---|
| 102 | ! |
---|
| 103 | !-- Check, whether file unit is already open (may have been opened in header |
---|
| 104 | !-- before) |
---|
| 105 | CALL check_open( 15 ) |
---|
| 106 | |
---|
| 107 | ! |
---|
| 108 | !-- If required, write header |
---|
| 109 | IF ( .NOT. run_control_header ) THEN |
---|
| 110 | WRITE ( 15, 100 ) |
---|
| 111 | run_control_header = .TRUE. |
---|
| 112 | ENDIF |
---|
| 113 | |
---|
| 114 | ! |
---|
| 115 | !-- Output the the beginning of the run receives no information about an |
---|
| 116 | !-- Euler-timestep |
---|
| 117 | IF ( dt_changed .AND. simulated_time /= 0.0 .AND. & |
---|
| 118 | timestep_scheme(1:5) /= 'runge' ) THEN |
---|
| 119 | IF ( timestep_scheme == 'leapfrog' ) THEN |
---|
| 120 | change_chr = 'L' |
---|
| 121 | ELSE |
---|
| 122 | change_chr = 'E' |
---|
| 123 | ENDIF |
---|
| 124 | ELSE |
---|
| 125 | change_chr = ' ' |
---|
| 126 | ENDIF |
---|
| 127 | ! |
---|
| 128 | !-- If required, set disturbance flag |
---|
| 129 | IF ( disturbance_created ) THEN |
---|
| 130 | disturb_chr = 'D' |
---|
| 131 | ELSE |
---|
| 132 | disturb_chr = ' ' |
---|
| 133 | ENDIF |
---|
| 134 | WRITE ( 15, 101 ) runnr, current_timestep_number, simulated_time_chr, & |
---|
| 135 | simulated_time-INT( simulated_time ), dt_3d, & |
---|
| 136 | timestep_reason, change_chr, u_max, disturb_chr, & |
---|
| 137 | v_max, disturb_chr, w_max, hom(nzb,1,var_hom,0), & |
---|
| 138 | hom(nzb+8,1,var_hom,0), hom(nzb+3,1,var_hom,0), & |
---|
| 139 | hom(nzb+6,1,var_hom,0), hom(nzb+4,1,var_hom,0), & |
---|
| 140 | hom(nzb+5,1,var_hom,0), hom(nzb+9,1,var_hom,0), & |
---|
| 141 | hom(nzb+10,1,var_hom,0), u_max_ijk(1:3), & |
---|
| 142 | v_max_ijk(1:3), w_max_ijk(1:3), & |
---|
| 143 | advected_distance_x/1000.0, & |
---|
| 144 | advected_distance_y/1000.0, mgcycles |
---|
| 145 | #if defined( __ibm ) |
---|
| 146 | ! |
---|
| 147 | !-- Write buffer contents to disc immediately |
---|
| 148 | CALL FLUSH_( 15 ) |
---|
| 149 | #elif defined( __lcmuk ) || defined( __lctit ) || defined( __nec ) |
---|
| 150 | CALL FLUSH( 15 ) |
---|
| 151 | #endif |
---|
| 152 | ENDIF |
---|
| 153 | ! |
---|
| 154 | !-- If required, reset disturbance flag. This has to be done outside the above |
---|
| 155 | !-- IF-loop, because the flag would otherwise only be reset on PE0 |
---|
| 156 | IF ( disturbance_created ) disturbance_created = .FALSE. |
---|
| 157 | |
---|
| 158 | CALL cpu_log( log_point(11), 'run_control', 'stop' ) |
---|
| 159 | |
---|
| 160 | ! |
---|
| 161 | !-- Formats |
---|
| 162 | 100 FORMAT (///'Run-control output:'/ & |
---|
| 163 | &'------------------'// & |
---|
| 164 | &'RUN ITER. HH:MM:SS.SS DT(E) UMAX VMAX WMAX U*', & |
---|
| 165 | &' W* THETA* Z_I ENERG. DISTENERG DIVOLD DIVNE', & |
---|
| 166 | &'W UMAX(KJI) VMAX(KJI) WMAX(KJI) ADVECX ADVECY MG', & |
---|
| 167 | &'CYC'/ & |
---|
| 168 | &'----------------------------------------------------------------', & |
---|
| 169 | &'----------------------------------------------------------------', & |
---|
| 170 | &'----------------------------------------------------------------', & |
---|
| 171 | &'--') |
---|
| 172 | 101 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, & |
---|
| 173 | F4.2, & |
---|
| 174 | 2X,F6.3,2X,F5.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3) |
---|
| 175 | |
---|
| 176 | END SUBROUTINE run_control |
---|