[1] | 1 | SUBROUTINE print_1d |
---|
| 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 | ! |
---|
[1310] | 17 | ! Copyright 1997-2014 Leibniz Universitaet Hannover |
---|
[1036] | 18 | !--------------------------------------------------------------------------------! |
---|
| 19 | ! |
---|
[484] | 20 | ! Current revisions: |
---|
[1] | 21 | ! ----------------- |
---|
[1321] | 22 | ! |
---|
| 23 | ! |
---|
| 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: print_1d.f90 1321 2014-03-20 09:40:40Z maronga $ |
---|
| 27 | ! |
---|
| 28 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 29 | ! ONLY-attribute added to USE-statements, |
---|
| 30 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 31 | ! kinds are defined in new module kinds, |
---|
| 32 | ! old module precision_kind is removed, |
---|
| 33 | ! revision history before 2012 removed, |
---|
| 34 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 35 | ! all variable declaration statements |
---|
[1] | 36 | ! |
---|
[1319] | 37 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 38 | ! barrier argument removed from cpu_log, |
---|
| 39 | ! module interfaces removed |
---|
| 40 | ! |
---|
[1037] | 41 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 42 | ! code put under GPL (PALM 3.9) |
---|
| 43 | ! |
---|
[3] | 44 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 45 | ! |
---|
[1] | 46 | ! Revision 1.1 1997/09/19 07:45:22 raasch |
---|
| 47 | ! Initial revision |
---|
| 48 | ! |
---|
| 49 | ! |
---|
| 50 | ! Description: |
---|
| 51 | ! ------------ |
---|
| 52 | ! List output of 1D-profiles. |
---|
| 53 | !------------------------------------------------------------------------------! |
---|
| 54 | |
---|
[1320] | 55 | USE arrays_3d, & |
---|
| 56 | ONLY: zu, zw |
---|
| 57 | |
---|
| 58 | USE control_parameters, & |
---|
| 59 | ONLY: run_description_header, simulated_time_chr |
---|
| 60 | |
---|
| 61 | USE cpulog, & |
---|
| 62 | ONLY: cpu_log, log_point |
---|
| 63 | |
---|
| 64 | USE indices, & |
---|
| 65 | ONLY: nzb, nzt |
---|
| 66 | |
---|
| 67 | USE kinds |
---|
| 68 | |
---|
[1] | 69 | USE pegrid |
---|
| 70 | |
---|
[1320] | 71 | USE statistics, & |
---|
| 72 | ONLY: flow_statistics_called, hom, region, statistic_regions |
---|
| 73 | |
---|
[1] | 74 | IMPLICIT NONE |
---|
| 75 | |
---|
| 76 | |
---|
[1320] | 77 | CHARACTER (LEN=20) :: period_chr !: |
---|
[1] | 78 | |
---|
[1320] | 79 | INTEGER(iwp) :: k !: |
---|
| 80 | INTEGER(iwp) :: sr !: |
---|
[1] | 81 | |
---|
[1320] | 82 | |
---|
[1] | 83 | ! |
---|
| 84 | !-- If required, compute statistics. |
---|
| 85 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
| 86 | |
---|
| 87 | ! |
---|
| 88 | !-- Flow_statistics has its own cpu-time measuring. |
---|
| 89 | CALL cpu_log( log_point(18), 'print_1d', 'start' ) |
---|
| 90 | |
---|
| 91 | IF ( myid == 0 ) THEN |
---|
| 92 | ! |
---|
| 93 | !-- Open file for list output of profiles. |
---|
| 94 | CALL check_open( 16 ) |
---|
| 95 | |
---|
| 96 | ! |
---|
| 97 | !-- Prepare header. |
---|
| 98 | period_chr = ' no time-average!' |
---|
| 99 | |
---|
| 100 | ! |
---|
| 101 | !-- Output for the total domain (and each subregion, if applicable). |
---|
| 102 | DO sr = 0, statistic_regions |
---|
| 103 | ! |
---|
| 104 | !-- Write header. |
---|
| 105 | WRITE ( 16, 112 ) |
---|
| 106 | WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
| 107 | TRIM( region( sr ) ), TRIM( period_chr ), 'uv' |
---|
| 108 | WRITE ( 16, 105 ) TRIM( simulated_time_chr ) |
---|
| 109 | ! ELSE |
---|
| 110 | ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & |
---|
| 111 | ! averaging_interval_pr, average_count_pr |
---|
| 112 | ! ENDIF |
---|
| 113 | WRITE ( 16, 111 ) |
---|
| 114 | |
---|
| 115 | ! |
---|
| 116 | !-- Output of values on the scalar levels. |
---|
| 117 | WRITE ( 16, 120 ) |
---|
| 118 | WRITE ( 16, 111 ) |
---|
| 119 | DO k = nzt+1, nzb, -1 |
---|
| 120 | WRITE ( 16, 121) k, zu(k), hom(k,1,1,sr), & |
---|
| 121 | hom(k,1,1,sr) - hom(k,1,5,sr), & |
---|
| 122 | hom(k,1,2,sr), & |
---|
| 123 | hom(k,1,2,sr) - hom(k,1,6,sr), & |
---|
| 124 | hom(k,1,4,sr), & |
---|
| 125 | hom(k,1,4,sr) - hom(k,1,7,sr), & |
---|
| 126 | hom(k,1,8,sr), hom(k,1,9,sr), & |
---|
| 127 | hom(k,1,10,sr), hom(k,1,11,sr), zu(k), k |
---|
| 128 | ENDDO |
---|
| 129 | WRITE ( 16, 111 ) |
---|
| 130 | WRITE ( 16, 120 ) |
---|
| 131 | WRITE ( 16, 111 ) |
---|
| 132 | |
---|
| 133 | ! |
---|
| 134 | !-- Output of values on the w-levels. |
---|
| 135 | WRITE ( 16, 112 ) |
---|
| 136 | WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
| 137 | TRIM( region( sr ) ), TRIM( period_chr ), 'w' |
---|
| 138 | WRITE ( 16, 105 ) TRIM( simulated_time_chr ) |
---|
| 139 | ! ELSE |
---|
| 140 | ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & |
---|
| 141 | ! averaging_interval_pr, average_count_pr |
---|
| 142 | ! ENDIF |
---|
| 143 | WRITE ( 16, 111 ) |
---|
| 144 | |
---|
| 145 | WRITE ( 16, 130 ) |
---|
| 146 | WRITE ( 16, 111 ) |
---|
| 147 | DO k = nzt+1, nzb, -1 |
---|
| 148 | WRITE ( 16, 131) k, zw(k), hom(k,1,16,sr), & |
---|
| 149 | hom(k,1,18,sr), hom(k,1,12,sr), & |
---|
| 150 | hom(k,1,19,sr), hom(k,1,14,sr), & |
---|
| 151 | hom(k,1,20,sr), zw(k), k |
---|
| 152 | ENDDO |
---|
| 153 | WRITE ( 16, 111 ) |
---|
| 154 | WRITE ( 16, 130 ) |
---|
| 155 | WRITE ( 16, 111 ) |
---|
| 156 | |
---|
| 157 | ENDDO |
---|
| 158 | |
---|
| 159 | ENDIF |
---|
| 160 | |
---|
[1318] | 161 | CALL cpu_log( log_point(18), 'print_1d', 'stop' ) |
---|
[1] | 162 | |
---|
| 163 | ! |
---|
| 164 | !-- Formats. |
---|
| 165 | 100 FORMAT (1X,A/1X,10('-')/ & |
---|
| 166 | ' Horizontally',A,' averaged profiles on the ',A,'-level') |
---|
| 167 | 105 FORMAT (' Time: ',A) |
---|
| 168 | 106 FORMAT (' Time: ',A,18X,'averaged over',F7.1,' s (',I4, & |
---|
| 169 | ' Single times)') |
---|
| 170 | 111 FORMAT (1X,131('-')) |
---|
| 171 | 112 FORMAT (/) |
---|
| 172 | 120 FORMAT (' k zu u du v dv pt dpt ', & |
---|
| 173 | 'e Km Kh l zu k') |
---|
| 174 | 121 FORMAT (1X,I4,1X,F7.1,1X,F6.2,1X,F5.2,1X,F6.2,1X,F5.2,2X,F6.2,1X,F5.2, & |
---|
| 175 | 1X,F6.4,1X,F5.2,1X,F5.2,1X,F6.2,1X,F7.1,2X,I4) |
---|
| 176 | 130 FORMAT (' k zw w''pt'' wpt w''u'' wu ', & |
---|
| 177 | ' w''v'' wv zw k') |
---|
| 178 | 131 FORMAT (1X,I4,1X,F7.1,6(1X,E9.3),1X,F7.1,2X,I4) |
---|
| 179 | |
---|
| 180 | |
---|
| 181 | END SUBROUTINE print_1d |
---|