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