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