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