1 | SUBROUTINE write_3d_binary |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------! |
---|
4 | ! Actual revisions: |
---|
5 | ! ----------------- |
---|
6 | ! +rif_wall |
---|
7 | ! |
---|
8 | ! Former revisions: |
---|
9 | ! ----------------- |
---|
10 | ! $Id: write_3d_binary.f90 51 2007-03-07 08:38:00Z raasch $ |
---|
11 | ! |
---|
12 | ! 19 2007-02-23 04:53:48Z raasch |
---|
13 | ! +qswst, qswst_m, tswst, tswst_m |
---|
14 | ! |
---|
15 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
16 | ! |
---|
17 | ! Revision 1.21 2006/08/04 15:05:11 raasch |
---|
18 | ! +iran, iran_part |
---|
19 | ! |
---|
20 | ! Revision 1.1 1998/03/18 20:20:21 raasch |
---|
21 | ! Initial revision |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Description: |
---|
25 | ! ------------ |
---|
26 | ! Binary output of variables and arrays for restarts. |
---|
27 | !------------------------------------------------------------------------------! |
---|
28 | |
---|
29 | USE arrays_3d |
---|
30 | USE averaging |
---|
31 | USE control_parameters |
---|
32 | USE cpulog |
---|
33 | USE indices |
---|
34 | USE interfaces |
---|
35 | USE particle_attributes |
---|
36 | USE pegrid |
---|
37 | USE profil_parameter |
---|
38 | USE random_function_mod |
---|
39 | USE statistics |
---|
40 | |
---|
41 | IMPLICIT NONE |
---|
42 | |
---|
43 | CHARACTER (LEN=10) :: binary_version |
---|
44 | |
---|
45 | |
---|
46 | CALL cpu_log( log_point(22), 'write_3d_binary', 'start' ) |
---|
47 | |
---|
48 | CALL check_open( 14 ) |
---|
49 | |
---|
50 | ! |
---|
51 | !-- Write control parameters and other variables for restart. |
---|
52 | CALL write_var_list |
---|
53 | |
---|
54 | ! |
---|
55 | !-- Write arrays. |
---|
56 | binary_version = '3.0' |
---|
57 | |
---|
58 | WRITE ( 14 ) binary_version |
---|
59 | |
---|
60 | WRITE ( 14 ) numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt |
---|
61 | |
---|
62 | ! |
---|
63 | !-- Attention: After changes to the following output commands the version number |
---|
64 | !-- --------- of the variable binary_version must be changed! |
---|
65 | !-- Also, the list of arrays to be read in read_3d_binary must be |
---|
66 | !-- adjusted accordingly. |
---|
67 | |
---|
68 | WRITE ( 14 ) 'e '; WRITE ( 14 ) e |
---|
69 | IF ( ALLOCATED( e_av ) ) THEN |
---|
70 | WRITE ( 14 ) 'e_av '; WRITE ( 14 ) e_av |
---|
71 | ENDIF |
---|
72 | WRITE ( 14 ) 'e_m '; WRITE ( 14 ) e_m |
---|
73 | WRITE ( 14 ) 'iran '; WRITE ( 14 ) iran, iran_part |
---|
74 | WRITE ( 14 ) 'kh '; WRITE ( 14 ) kh |
---|
75 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
76 | WRITE ( 14 ) 'kh_m '; WRITE ( 14 ) kh_m |
---|
77 | ENDIF |
---|
78 | WRITE ( 14 ) 'km '; WRITE ( 14 ) km |
---|
79 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
80 | WRITE ( 14 ) 'km_m '; WRITE ( 14 ) km_m |
---|
81 | ENDIF |
---|
82 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
83 | WRITE ( 14 ) 'lwp_av '; WRITE ( 14 ) lwp_av |
---|
84 | ENDIF |
---|
85 | WRITE ( 14 ) 'p '; WRITE ( 14 ) p |
---|
86 | IF ( ALLOCATED( p_av ) ) THEN |
---|
87 | WRITE ( 14 ) 'p_av '; WRITE ( 14 ) p_av |
---|
88 | ENDIF |
---|
89 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
90 | WRITE ( 14 ) 'pc_av '; WRITE ( 14 ) pc_av |
---|
91 | ENDIF |
---|
92 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
93 | WRITE ( 14 ) 'pr_av '; WRITE ( 14 ) pr_av |
---|
94 | ENDIF |
---|
95 | WRITE ( 14 ) 'pt '; WRITE ( 14 ) pt |
---|
96 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
97 | WRITE ( 14 ) 'pt_av '; WRITE ( 14 ) pt_av |
---|
98 | ENDIF |
---|
99 | WRITE ( 14 ) 'pt_m '; WRITE ( 14 ) pt_m |
---|
100 | IF ( moisture .OR. passive_scalar ) THEN |
---|
101 | WRITE ( 14 ) 'q '; WRITE ( 14 ) q |
---|
102 | IF ( ALLOCATED( q_av ) ) THEN |
---|
103 | WRITE ( 14 ) 'q_av '; WRITE ( 14 ) q_av |
---|
104 | ENDIF |
---|
105 | WRITE ( 14 ) 'q_m '; WRITE ( 14 ) q_m |
---|
106 | IF ( cloud_physics ) THEN |
---|
107 | WRITE ( 14 ) 'ql '; WRITE ( 14 ) ql |
---|
108 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
109 | WRITE ( 14 ) 'ql_av '; WRITE ( 14 ) ql_av |
---|
110 | ENDIF |
---|
111 | ENDIF |
---|
112 | WRITE ( 14 ) 'qs '; WRITE ( 14 ) qs |
---|
113 | WRITE ( 14 ) 'qsws '; WRITE ( 14 ) qsws |
---|
114 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
115 | WRITE ( 14 ) 'qsws_m '; WRITE ( 14 ) qsws_m |
---|
116 | ENDIF |
---|
117 | WRITE ( 14 ) 'qswst '; WRITE ( 14 ) qswst |
---|
118 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
119 | WRITE ( 14 ) 'qswst_m '; WRITE ( 14 ) qswst_m |
---|
120 | ENDIF |
---|
121 | ENDIF |
---|
122 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
123 | WRITE ( 14 ) 'ql_c_av '; WRITE ( 14 ) ql_c_av |
---|
124 | ENDIF |
---|
125 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
126 | WRITE ( 14 ) 'ql_v_av '; WRITE ( 14 ) ql_v_av |
---|
127 | ENDIF |
---|
128 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
129 | WRITE ( 14 ) 'ql_vp_av '; WRITE ( 14 ) ql_vp_av |
---|
130 | ENDIF |
---|
131 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
132 | WRITE ( 14 ) 'qv_av '; WRITE ( 14 ) qv_av |
---|
133 | ENDIF |
---|
134 | WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv |
---|
135 | WRITE ( 14 ) random_iy |
---|
136 | WRITE ( 14 ) 'rif '; WRITE ( 14 ) rif |
---|
137 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
138 | WRITE ( 14 ) 'rif_m '; WRITE ( 14 ) rif_m |
---|
139 | ENDIF |
---|
140 | IF ( topography /= 'flat' ) THEN |
---|
141 | WRITE ( 14 ) 'rif_wall '; WRITE ( 14 ) rif_wall |
---|
142 | ENDIF |
---|
143 | IF ( ALLOCATED( s_av ) ) THEN |
---|
144 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
145 | ENDIF |
---|
146 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
147 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
148 | WRITE ( 14 ) 'shf_m '; WRITE ( 14 ) shf_m |
---|
149 | ENDIF |
---|
150 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
151 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
152 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
153 | ENDIF |
---|
154 | WRITE ( 14 ) 'tswst '; WRITE ( 14 ) tswst |
---|
155 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
156 | WRITE ( 14 ) 'tswst_m '; WRITE ( 14 ) tswst_m |
---|
157 | ENDIF |
---|
158 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
159 | IF ( ALLOCATED( u_av ) ) THEN |
---|
160 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
161 | ENDIF |
---|
162 | WRITE ( 14 ) 'u_m '; WRITE ( 14 ) u_m |
---|
163 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
164 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
165 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
166 | WRITE ( 14 ) 'usws_m '; WRITE ( 14 ) usws_m |
---|
167 | ENDIF |
---|
168 | IF ( ALLOCATED( us_av ) ) THEN |
---|
169 | WRITE ( 14 ) 'us_av '; WRITE ( 14 ) us_av |
---|
170 | ENDIF |
---|
171 | WRITE ( 14 ) 'v '; WRITE ( 14 ) v |
---|
172 | WRITE ( 14 ) 'volume_flow_area '; WRITE ( 14 ) volume_flow_area |
---|
173 | WRITE ( 14 ) 'volume_flow_initial '; WRITE ( 14 ) volume_flow_initial |
---|
174 | IF ( ALLOCATED( v_av ) ) THEN |
---|
175 | WRITE ( 14 ) 'v_av '; WRITE ( 14 ) v_av |
---|
176 | ENDIF |
---|
177 | WRITE ( 14 ) 'v_m '; WRITE ( 14 ) v_m |
---|
178 | IF ( moisture ) THEN |
---|
179 | WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt |
---|
180 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
181 | WRITE ( 14 ) 'vpt_av '; WRITE ( 14 ) vpt_av |
---|
182 | ENDIF |
---|
183 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
184 | WRITE ( 14 ) 'vpt_m '; WRITE ( 14 ) vpt_m |
---|
185 | ENDIF |
---|
186 | ENDIF |
---|
187 | WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws |
---|
188 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
189 | WRITE ( 14 ) 'vsws_m '; WRITE ( 14 ) vsws_m |
---|
190 | ENDIF |
---|
191 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
192 | IF ( ALLOCATED( w_av ) ) THEN |
---|
193 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
194 | ENDIF |
---|
195 | WRITE ( 14 ) 'w_m '; WRITE ( 14 ) w_m |
---|
196 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
197 | |
---|
198 | WRITE ( 14 ) 'cross_linecolors '; WRITE ( 14 ) cross_linecolors |
---|
199 | WRITE ( 14 ) 'cross_linestyles '; WRITE ( 14 ) cross_linestyles |
---|
200 | WRITE ( 14 ) 'cross_normalized_x '; WRITE ( 14 ) cross_normalized_x |
---|
201 | WRITE ( 14 ) 'cross_normalized_y '; WRITE ( 14 ) cross_normalized_y |
---|
202 | WRITE ( 14 ) 'cross_normx_factor '; WRITE ( 14 ) cross_normx_factor |
---|
203 | WRITE ( 14 ) 'cross_normy_factor '; WRITE ( 14 ) cross_normy_factor |
---|
204 | WRITE ( 14 ) 'cross_profiles '; WRITE ( 14 ) cross_profiles |
---|
205 | WRITE ( 14 ) 'cross_profile_n_coun' |
---|
206 | WRITE ( 14 ) cross_profile_number_count |
---|
207 | WRITE ( 14 ) 'cross_profile_number'; WRITE ( 14 ) cross_profile_numbers |
---|
208 | WRITE ( 14 ) 'cross_uxmax '; WRITE ( 14 ) cross_uxmax |
---|
209 | WRITE ( 14 ) 'cross_uxmax_computed'; WRITE ( 14 ) cross_uxmax_computed |
---|
210 | WRITE ( 14 ) 'cross_uxmax_normaliz'; WRITE ( 14 ) cross_uxmax_normalized |
---|
211 | WRITE ( 14 ) 'cross_uxmax_norm_com' |
---|
212 | WRITE ( 14 ) cross_uxmax_normalized_computed |
---|
213 | WRITE ( 14 ) 'cross_uxmin '; WRITE ( 14 ) cross_uxmin |
---|
214 | WRITE ( 14 ) 'cross_uxmin_computed'; WRITE ( 14 ) cross_uxmin_computed |
---|
215 | WRITE ( 14 ) 'cross_uxmin_normaliz'; WRITE ( 14 ) cross_uxmin_normalized |
---|
216 | WRITE ( 14 ) 'cross_uxmin_norm_com' |
---|
217 | WRITE ( 14 ) cross_uxmin_normalized_computed |
---|
218 | WRITE ( 14 ) 'cross_uymax '; WRITE ( 14 ) cross_uymax |
---|
219 | WRITE ( 14 ) 'cross_uymin '; WRITE ( 14 ) cross_uymin |
---|
220 | WRITE ( 14 ) 'cross_xtext '; WRITE ( 14 ) cross_xtext |
---|
221 | WRITE ( 14 ) 'dopr_crossindex '; WRITE ( 14 ) dopr_crossindex |
---|
222 | WRITE ( 14 ) 'dopr_time_count '; WRITE ( 14 ) dopr_time_count |
---|
223 | WRITE ( 14 ) 'hom_sum '; WRITE ( 14 ) hom_sum |
---|
224 | WRITE ( 14 ) 'profile_columns '; WRITE ( 14 ) profile_columns |
---|
225 | WRITE ( 14 ) 'profile_number '; WRITE ( 14 ) profile_number |
---|
226 | WRITE ( 14 ) 'profile_rows '; WRITE ( 14 ) profile_rows |
---|
227 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
228 | WRITE ( 14 ) 'spectrum_x '; WRITE ( 14 ) spectrum_x |
---|
229 | WRITE ( 14 ) 'spectrum_y '; WRITE ( 14 ) spectrum_y |
---|
230 | ENDIF |
---|
231 | |
---|
232 | ! |
---|
233 | !-- Write end label. Unit 14 is closed in the main program. |
---|
234 | WRITE ( 14 ) '*** end *** ' |
---|
235 | |
---|
236 | |
---|
237 | CALL cpu_log( log_point(22), 'write_3d_binary', 'stop' ) |
---|
238 | |
---|
239 | |
---|
240 | END SUBROUTINE write_3d_binary |
---|