1 | !> @file print_1d.f90 |
---|
2 | !------------------------------------------------------------------------------! |
---|
3 | ! This file is part of the PALM model system. |
---|
4 | ! |
---|
5 | ! PALM is free software: you can redistribute it and/or modify it under the |
---|
6 | ! terms of the GNU General Public License as published by the Free Software |
---|
7 | ! Foundation, either version 3 of the License, or (at your option) any later |
---|
8 | ! 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-2018 Leibniz Universitaet Hannover |
---|
18 | !------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: print_1d.f90 2718 2018-01-02 08:49:38Z suehring $ |
---|
27 | ! Corrected "Former revisions" section |
---|
28 | ! |
---|
29 | ! 2696 2017-12-14 17:12:51Z kanani |
---|
30 | ! Change in file header (GPL part) |
---|
31 | ! |
---|
32 | ! 2101 2017-01-05 16:42:31Z suehring |
---|
33 | ! |
---|
34 | ! 2000 2016-08-20 18:09:15Z knoop |
---|
35 | ! Forced header and separation lines into 80 columns |
---|
36 | ! |
---|
37 | ! 1697 2015-10-28 17:14:10Z raasch |
---|
38 | ! small E- and F-FORMAT changes to avoid informative compiler messages about |
---|
39 | ! insufficient field width |
---|
40 | ! |
---|
41 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
42 | ! Code annotations made doxygen readable |
---|
43 | ! |
---|
44 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
45 | ! ONLY-attribute added to USE-statements, |
---|
46 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
47 | ! kinds are defined in new module kinds, |
---|
48 | ! old module precision_kind is removed, |
---|
49 | ! revision history before 2012 removed, |
---|
50 | ! comment fields (!:) to be used for variable explanations added to |
---|
51 | ! all variable declaration statements |
---|
52 | ! |
---|
53 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
54 | ! barrier argument removed from cpu_log, |
---|
55 | ! module interfaces removed |
---|
56 | ! |
---|
57 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
58 | ! code put under GPL (PALM 3.9) |
---|
59 | ! |
---|
60 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
61 | ! |
---|
62 | ! Revision 1.1 1997/09/19 07:45:22 raasch |
---|
63 | ! Initial revision |
---|
64 | ! |
---|
65 | ! |
---|
66 | ! Description: |
---|
67 | ! ------------ |
---|
68 | !> List output of 1D-profiles. |
---|
69 | !------------------------------------------------------------------------------! |
---|
70 | SUBROUTINE print_1d |
---|
71 | |
---|
72 | |
---|
73 | USE arrays_3d, & |
---|
74 | ONLY: zu, zw |
---|
75 | |
---|
76 | USE control_parameters, & |
---|
77 | ONLY: run_description_header, simulated_time_chr |
---|
78 | |
---|
79 | USE cpulog, & |
---|
80 | ONLY: cpu_log, log_point |
---|
81 | |
---|
82 | USE indices, & |
---|
83 | ONLY: nzb, nzt |
---|
84 | |
---|
85 | USE kinds |
---|
86 | |
---|
87 | USE pegrid |
---|
88 | |
---|
89 | USE statistics, & |
---|
90 | ONLY: flow_statistics_called, hom, region, statistic_regions |
---|
91 | |
---|
92 | IMPLICIT NONE |
---|
93 | |
---|
94 | |
---|
95 | CHARACTER (LEN=20) :: period_chr !< |
---|
96 | |
---|
97 | INTEGER(iwp) :: k !< |
---|
98 | INTEGER(iwp) :: sr !< |
---|
99 | |
---|
100 | |
---|
101 | ! |
---|
102 | !-- If required, compute statistics. |
---|
103 | IF ( .NOT. flow_statistics_called ) CALL flow_statistics |
---|
104 | |
---|
105 | ! |
---|
106 | !-- Flow_statistics has its own cpu-time measuring. |
---|
107 | CALL cpu_log( log_point(18), 'print_1d', 'start' ) |
---|
108 | |
---|
109 | IF ( myid == 0 ) THEN |
---|
110 | ! |
---|
111 | !-- Open file for list output of profiles. |
---|
112 | CALL check_open( 16 ) |
---|
113 | |
---|
114 | ! |
---|
115 | !-- Prepare header. |
---|
116 | period_chr = ' no time-average!' |
---|
117 | |
---|
118 | ! |
---|
119 | !-- Output for the total domain (and each subregion, if applicable). |
---|
120 | DO sr = 0, statistic_regions |
---|
121 | ! |
---|
122 | !-- Write header. |
---|
123 | WRITE ( 16, 112 ) |
---|
124 | WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
125 | TRIM( region( sr ) ), TRIM( period_chr ), 'uv' |
---|
126 | WRITE ( 16, 105 ) TRIM( simulated_time_chr ) |
---|
127 | ! ELSE |
---|
128 | ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & |
---|
129 | ! averaging_interval_pr, average_count_pr |
---|
130 | ! ENDIF |
---|
131 | WRITE ( 16, 111 ) |
---|
132 | |
---|
133 | ! |
---|
134 | !-- Output of values on the scalar levels. |
---|
135 | WRITE ( 16, 120 ) |
---|
136 | WRITE ( 16, 111 ) |
---|
137 | DO k = nzt+1, nzb, -1 |
---|
138 | WRITE ( 16, 121) k, zu(k), hom(k,1,1,sr), & |
---|
139 | hom(k,1,1,sr) - hom(k,1,5,sr), & |
---|
140 | hom(k,1,2,sr), & |
---|
141 | hom(k,1,2,sr) - hom(k,1,6,sr), & |
---|
142 | hom(k,1,4,sr), & |
---|
143 | hom(k,1,4,sr) - hom(k,1,7,sr), & |
---|
144 | hom(k,1,8,sr), hom(k,1,9,sr), & |
---|
145 | hom(k,1,10,sr), hom(k,1,11,sr), zu(k), k |
---|
146 | ENDDO |
---|
147 | WRITE ( 16, 111 ) |
---|
148 | WRITE ( 16, 120 ) |
---|
149 | WRITE ( 16, 111 ) |
---|
150 | |
---|
151 | ! |
---|
152 | !-- Output of values on the w-levels. |
---|
153 | WRITE ( 16, 112 ) |
---|
154 | WRITE ( 16, 100 ) TRIM( run_description_header ) // ' ' // & |
---|
155 | TRIM( region( sr ) ), TRIM( period_chr ), 'w' |
---|
156 | WRITE ( 16, 105 ) TRIM( simulated_time_chr ) |
---|
157 | ! ELSE |
---|
158 | ! WRITE ( 16, 106 ) TRIM( simulated_time_chr ), & |
---|
159 | ! averaging_interval_pr, average_count_pr |
---|
160 | ! ENDIF |
---|
161 | WRITE ( 16, 111 ) |
---|
162 | |
---|
163 | WRITE ( 16, 130 ) |
---|
164 | WRITE ( 16, 111 ) |
---|
165 | DO k = nzt+1, nzb, -1 |
---|
166 | WRITE ( 16, 131) k, zw(k), hom(k,1,16,sr), & |
---|
167 | hom(k,1,18,sr), hom(k,1,12,sr), & |
---|
168 | hom(k,1,19,sr), hom(k,1,14,sr), & |
---|
169 | hom(k,1,20,sr), zw(k), k |
---|
170 | ENDDO |
---|
171 | WRITE ( 16, 111 ) |
---|
172 | WRITE ( 16, 130 ) |
---|
173 | WRITE ( 16, 111 ) |
---|
174 | |
---|
175 | ENDDO |
---|
176 | |
---|
177 | ENDIF |
---|
178 | |
---|
179 | CALL cpu_log( log_point(18), 'print_1d', 'stop' ) |
---|
180 | |
---|
181 | ! |
---|
182 | !-- Formats. |
---|
183 | 100 FORMAT (1X,A/1X,10('-')/ & |
---|
184 | ' Horizontally',A,' averaged profiles on the ',A,'-level') |
---|
185 | 105 FORMAT (' Time: ',A) |
---|
186 | 106 FORMAT (' Time: ',A,18X,'averaged over',F7.1,' s (',I4, & |
---|
187 | ' Single times)') |
---|
188 | 111 FORMAT (1X,131('-')) |
---|
189 | 112 FORMAT (/) |
---|
190 | 120 FORMAT (' k zu u du v dv pt dpt ', & |
---|
191 | ' e Km Kh l zu k') |
---|
192 | 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, & |
---|
193 | 1X,F7.4,1X,F5.2,1X,F5.2,1X,F6.2,1X,F7.1,2X,I4) |
---|
194 | 130 FORMAT (' k zw w''pt'' wpt w''u'' wu ',& |
---|
195 | ' w''v'' wv zw k') |
---|
196 | 131 FORMAT (1X,I4,1X,F7.1,6(1X,E10.3),1X,F7.1,2X,I4) |
---|
197 | |
---|
198 | |
---|
199 | END SUBROUTINE print_1d |
---|