[1] | 1 | SUBROUTINE run_control |
---|
| 2 | |
---|
[1036] | 3 | !--------------------------------------------------------------------------------! |
---|
| 4 | ! This file is part of PALM. |
---|
| 5 | ! |
---|
| 6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
| 7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
| 8 | ! either version 3 of the License, or (at your option) any later version. |
---|
| 9 | ! |
---|
| 10 | ! PALM is distributed in the hope that it will be useful, but WITHOUT ANY |
---|
| 11 | ! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR |
---|
| 12 | ! A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
---|
| 13 | ! |
---|
| 14 | ! You should have received a copy of the GNU General Public License along with |
---|
| 15 | ! PALM. If not, see <http://www.gnu.org/licenses/>. |
---|
| 16 | ! |
---|
| 17 | ! Copyright 1997-2012 Leibniz University Hannover |
---|
| 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
| 22 | ! |
---|
[1002] | 23 | ! |
---|
[1] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
[3] | 26 | ! $Id: run_control.f90 1037 2012-10-22 14:10:22Z suehring $ |
---|
[83] | 27 | ! |
---|
[1037] | 28 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 29 | ! code put under GPL (PALM 3.9) |
---|
| 30 | ! |
---|
[1002] | 31 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 32 | ! all actions concerning leapfrog scheme removed |
---|
| 33 | ! |
---|
[98] | 34 | ! 97 2007-06-21 08:23:15Z raasch |
---|
| 35 | ! Timestep and z_i format changed |
---|
| 36 | ! |
---|
[90] | 37 | ! 87 2007-05-22 15:46:47Z raasch |
---|
| 38 | ! var_hom renamed pr_palm |
---|
| 39 | ! |
---|
[83] | 40 | ! 82 2007-04-16 15:40:52Z raasch |
---|
| 41 | ! Preprocessor strings for different linux clusters changed to "lc", |
---|
| 42 | ! routine local_flush is used for buffer flushing |
---|
| 43 | ! |
---|
[3] | 44 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 45 | ! |
---|
[1] | 46 | ! Revision 1.20 2006/06/02 15:23:47 raasch |
---|
| 47 | ! cpp-directives extended for lctit |
---|
| 48 | ! |
---|
| 49 | ! Revision 1.1 1997/08/11 06:25:38 raasch |
---|
| 50 | ! Initial revision |
---|
| 51 | ! |
---|
| 52 | ! |
---|
| 53 | ! Description: |
---|
| 54 | ! ------------ |
---|
| 55 | ! Computation and output of run-control quantities |
---|
| 56 | !------------------------------------------------------------------------------! |
---|
| 57 | |
---|
| 58 | USE cpulog |
---|
| 59 | USE indices |
---|
| 60 | USE interfaces |
---|
| 61 | USE pegrid |
---|
| 62 | USE statistics |
---|
| 63 | USE control_parameters |
---|
| 64 | |
---|
| 65 | IMPLICIT NONE |
---|
| 66 | |
---|
[1001] | 67 | CHARACTER (LEN=1) :: disturb_chr |
---|
[1] | 68 | |
---|
| 69 | ! |
---|
| 70 | !-- If required, do statistics |
---|
| 71 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
| 72 | |
---|
| 73 | ! |
---|
| 74 | !-- Flow_statistics has its own cpu-time measurement |
---|
| 75 | CALL cpu_log( log_point(11), 'run_control', 'start' ) |
---|
| 76 | |
---|
| 77 | ! |
---|
| 78 | !-- Output |
---|
| 79 | IF ( myid == 0 ) THEN |
---|
| 80 | |
---|
| 81 | ! |
---|
| 82 | !-- Check, whether file unit is already open (may have been opened in header |
---|
| 83 | !-- before) |
---|
| 84 | CALL check_open( 15 ) |
---|
| 85 | |
---|
| 86 | ! |
---|
| 87 | !-- If required, write header |
---|
| 88 | IF ( .NOT. run_control_header ) THEN |
---|
| 89 | WRITE ( 15, 100 ) |
---|
| 90 | run_control_header = .TRUE. |
---|
| 91 | ENDIF |
---|
| 92 | |
---|
| 93 | ! |
---|
| 94 | !-- If required, set disturbance flag |
---|
| 95 | IF ( disturbance_created ) THEN |
---|
| 96 | disturb_chr = 'D' |
---|
| 97 | ELSE |
---|
| 98 | disturb_chr = ' ' |
---|
| 99 | ENDIF |
---|
| 100 | WRITE ( 15, 101 ) runnr, current_timestep_number, simulated_time_chr, & |
---|
| 101 | simulated_time-INT( simulated_time ), dt_3d, & |
---|
[1001] | 102 | timestep_reason, u_max, disturb_chr, & |
---|
[87] | 103 | v_max, disturb_chr, w_max, hom(nzb,1,pr_palm,0), & |
---|
| 104 | hom(nzb+8,1,pr_palm,0), hom(nzb+3,1,pr_palm,0), & |
---|
| 105 | hom(nzb+6,1,pr_palm,0), hom(nzb+4,1,pr_palm,0), & |
---|
| 106 | hom(nzb+5,1,pr_palm,0), hom(nzb+9,1,pr_palm,0), & |
---|
| 107 | hom(nzb+10,1,pr_palm,0), u_max_ijk(1:3), & |
---|
[1] | 108 | v_max_ijk(1:3), w_max_ijk(1:3), & |
---|
| 109 | advected_distance_x/1000.0, & |
---|
| 110 | advected_distance_y/1000.0, mgcycles |
---|
| 111 | ! |
---|
| 112 | !-- Write buffer contents to disc immediately |
---|
[82] | 113 | CALL local_flush( 15 ) |
---|
| 114 | |
---|
[1] | 115 | ENDIF |
---|
| 116 | ! |
---|
| 117 | !-- If required, reset disturbance flag. This has to be done outside the above |
---|
| 118 | !-- IF-loop, because the flag would otherwise only be reset on PE0 |
---|
| 119 | IF ( disturbance_created ) disturbance_created = .FALSE. |
---|
| 120 | |
---|
| 121 | CALL cpu_log( log_point(11), 'run_control', 'stop' ) |
---|
| 122 | |
---|
| 123 | ! |
---|
| 124 | !-- Formats |
---|
| 125 | 100 FORMAT (///'Run-control output:'/ & |
---|
| 126 | &'------------------'// & |
---|
[97] | 127 | &'RUN ITER. HH:MM:SS.SS DT(E) UMAX VMAX WMAX U', & |
---|
| 128 | &'* W* THETA* Z_I ENERG. DISTENERG DIVOLD DIV', & |
---|
| 129 | &'NEW UMAX(KJI) VMAX(KJI) WMAX(KJI) ADVECX ADVECY ', & |
---|
| 130 | &'MGCYC'/ & |
---|
| 131 | &'----------------------------------------------------------------', & |
---|
| 132 | &'----------------------------------------------------------------', & |
---|
| 133 | &'----------------------------------------------------------------', & |
---|
| 134 | &'-----') |
---|
[1001] | 135 | 101 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, & |
---|
[1] | 136 | F4.2, & |
---|
[97] | 137 | 2X,F6.3,2X,F6.0,1X,4(E10.3,1X),3(3(I4),1X),F8.3,1X,F8.3,5X,I3) |
---|
[1] | 138 | |
---|
| 139 | END SUBROUTINE run_control |
---|