1 | !> @file write_3d_binary.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-2016 Leibniz Universitaet Hannover |
---|
17 | !--------------------------------------------------------------------------------! |
---|
18 | ! |
---|
19 | ! Current revisions: |
---|
20 | ! ----------------- |
---|
21 | ! |
---|
22 | ! |
---|
23 | ! Former revisions: |
---|
24 | ! ----------------- |
---|
25 | ! $Id: write_3d_binary.f90 1852 2016-04-08 14:07:36Z hoffmann $ |
---|
26 | ! |
---|
27 | ! 1849 2016-04-08 11:33:18Z hoffmann |
---|
28 | ! prr, precipitation_amount moved to arrays_3d |
---|
29 | ! |
---|
30 | ! 1833 2016-04-07 14:23:03Z raasch |
---|
31 | ! statistics module replaced by spectra module |
---|
32 | ! |
---|
33 | ! 1822 2016-04-07 07:49:42Z hoffmann |
---|
34 | ! icloud_scheme replaced by microphysics_* |
---|
35 | ! |
---|
36 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
37 | ! Added z0q and z0q_av |
---|
38 | ! |
---|
39 | ! 1709 2015-11-04 14:47:01Z maronga |
---|
40 | ! Added rad_lw_out_change_0, increased binary_version |
---|
41 | ! |
---|
42 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
43 | ! Added output of radiative heating rates for RRTMG. Added output of ol. Removed |
---|
44 | ! output of rif. |
---|
45 | ! |
---|
46 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
47 | ! Code annotations made doxygen readable |
---|
48 | ! |
---|
49 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
50 | ! Adapted for RRTMG |
---|
51 | ! |
---|
52 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
53 | ! Added support for binary ouput of land surface and radiation model data. |
---|
54 | ! |
---|
55 | ! 1400 2014-05-09 14:03:54Z knoop |
---|
56 | ! writing of arrays for random_generator_parallel added |
---|
57 | ! |
---|
58 | ! 1359 2014-04-11 17:15:14Z hoffmann |
---|
59 | ! Bugfix using cloud_droplets solved. qc, qr*, nr* are no longer written in case |
---|
60 | ! of cloud_droplets = .TRUE. |
---|
61 | ! |
---|
62 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
63 | ! ONLY-attribute added to USE-statements, |
---|
64 | ! revision history before 2012 removed, |
---|
65 | ! comment fields (!:) to be used for variable explanations added to |
---|
66 | ! all variable declaration statements |
---|
67 | ! |
---|
68 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
69 | ! module interfaces removed |
---|
70 | ! |
---|
71 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
72 | ! qr and nr are restricted to precipitation |
---|
73 | ! |
---|
74 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
75 | ! necessary expansions according to the two new prognostic equations (nr, qr) |
---|
76 | ! of the two-moment cloud physics scheme: |
---|
77 | ! +prr, prr_av, *, *_av, *s, *sws, *swst |
---|
78 | ! |
---|
79 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
80 | ! code put under GPL (PALM 3.9) |
---|
81 | ! |
---|
82 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
83 | ! all actions concerning leapfrog- and ups-scheme removed |
---|
84 | ! |
---|
85 | ! 978 2012-08-09 08:28:32Z fricke |
---|
86 | ! +z0h, z0h_av |
---|
87 | ! |
---|
88 | ! Revision 1.1 1998/03/18 20:20:21 raasch |
---|
89 | ! Initial revision |
---|
90 | ! |
---|
91 | ! |
---|
92 | ! Description: |
---|
93 | ! ------------ |
---|
94 | !> Binary output of variables and arrays for restarts. |
---|
95 | !------------------------------------------------------------------------------! |
---|
96 | SUBROUTINE write_3d_binary |
---|
97 | |
---|
98 | |
---|
99 | USE arrays_3d, & |
---|
100 | ONLY: e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, & |
---|
101 | prr, precipitation_amount, qr, & |
---|
102 | qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, & |
---|
103 | rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us, & |
---|
104 | usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst, & |
---|
105 | w, w_m_l, w_m_n, w_m_r, w_m_s, z0, z0h, z0q |
---|
106 | |
---|
107 | USE averaging |
---|
108 | |
---|
109 | USE control_parameters, & |
---|
110 | ONLY: iran, humidity, passive_scalar, cloud_physics, cloud_droplets, & |
---|
111 | microphysics_seifert, ocean, topography |
---|
112 | |
---|
113 | USE indices, & |
---|
114 | ONLY: nxl, nxr, nys, nyn, nzb, nzt |
---|
115 | |
---|
116 | USE land_surface_model_mod, & |
---|
117 | ONLY: c_liq_av, c_soil_av, c_veg_av, ghf_eb_av, lai_av, & |
---|
118 | qsws_eb_av, qsws_liq_eb_av, qsws_soil_eb_av, qsws_veg_eb_av, & |
---|
119 | land_surface, m_liq_eb, m_liq_eb_av, m_soil, m_soil_av, & |
---|
120 | nzb_soil, nzt_soil, shf_eb_av, t_soil, t_soil_av |
---|
121 | |
---|
122 | USE particle_attributes, & |
---|
123 | ONLY: iran_part |
---|
124 | |
---|
125 | USE pegrid |
---|
126 | |
---|
127 | USE radiation_model_mod, & |
---|
128 | ONLY: radiation, rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, & |
---|
129 | rad_lw_out, rad_lw_out_av, rad_lw_out_change_0, rad_lw_cs_hr, & |
---|
130 | rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av, rad_sw_in, & |
---|
131 | rad_sw_in_av, rad_sw_out, rad_sw_out_av, rad_sw_cs_hr, & |
---|
132 | rad_sw_cs_hr_av, rad_sw_hr, rad_sw_hr_av |
---|
133 | |
---|
134 | USE random_function_mod, & |
---|
135 | ONLY: random_iv, random_iy |
---|
136 | |
---|
137 | USE random_generator_parallel, & |
---|
138 | ONLY: id_random_array, seq_random_array |
---|
139 | |
---|
140 | USE spectra_mod, & |
---|
141 | ONLY: spectrum_x, spectrum_y |
---|
142 | |
---|
143 | IMPLICIT NONE |
---|
144 | |
---|
145 | CHARACTER (LEN=10) :: binary_version !< |
---|
146 | |
---|
147 | |
---|
148 | ! |
---|
149 | !-- Write control parameters and other variables for restart. |
---|
150 | IF ( myid == 0 ) CALL write_var_list |
---|
151 | |
---|
152 | ! |
---|
153 | !-- Write arrays. |
---|
154 | binary_version = '4.3' |
---|
155 | |
---|
156 | WRITE ( 14 ) binary_version |
---|
157 | |
---|
158 | WRITE ( 14 ) numprocs, myid, nxl, nxr, nys, nyn, nzb, nzt |
---|
159 | |
---|
160 | ! |
---|
161 | !-- Attention: After changes to the following output commands the version number |
---|
162 | !-- --------- of the variable binary_version must be changed! |
---|
163 | !-- Also, the list of arrays to be read in read_3d_binary must be |
---|
164 | !-- adjusted accordingly. |
---|
165 | |
---|
166 | |
---|
167 | IF ( land_surface ) THEN |
---|
168 | IF ( ALLOCATED( c_liq_av ) ) THEN |
---|
169 | WRITE ( 14 ) 'c_liq_av '; WRITE ( 14 ) c_liq_av |
---|
170 | ENDIF |
---|
171 | IF ( ALLOCATED( c_soil_av ) ) THEN |
---|
172 | WRITE ( 14 ) 'c_soil_av '; WRITE ( 14 ) c_soil_av |
---|
173 | ENDIF |
---|
174 | IF ( ALLOCATED( c_veg_av ) ) THEN |
---|
175 | WRITE ( 14 ) 'c_veg_av '; WRITE ( 14 ) c_veg_av |
---|
176 | ENDIF |
---|
177 | ENDIF |
---|
178 | WRITE ( 14 ) 'e '; WRITE ( 14 ) e |
---|
179 | IF ( ALLOCATED( e_av ) ) THEN |
---|
180 | WRITE ( 14 ) 'e_av '; WRITE ( 14 ) e_av |
---|
181 | ENDIF |
---|
182 | WRITE ( 14 ) 'iran '; WRITE ( 14 ) iran, iran_part |
---|
183 | IF ( land_surface ) THEN |
---|
184 | IF ( ALLOCATED( ghf_eb_av ) ) THEN |
---|
185 | WRITE ( 14 ) 'ghf_eb_av '; WRITE ( 14 ) ghf_eb_av |
---|
186 | ENDIF |
---|
187 | ENDIF |
---|
188 | WRITE ( 14 ) 'kh '; WRITE ( 14 ) kh |
---|
189 | WRITE ( 14 ) 'km '; WRITE ( 14 ) km |
---|
190 | IF ( land_surface ) THEN |
---|
191 | IF ( ALLOCATED( lai_av ) ) THEN |
---|
192 | WRITE ( 14 ) 'lai_av '; WRITE ( 14 ) lai_av |
---|
193 | ENDIF |
---|
194 | ENDIF |
---|
195 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
196 | WRITE ( 14 ) 'lpt_av '; WRITE ( 14 ) lpt_av |
---|
197 | ENDIF |
---|
198 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
199 | WRITE ( 14 ) 'lwp_av '; WRITE ( 14 ) lwp_av |
---|
200 | ENDIF |
---|
201 | IF ( land_surface ) THEN |
---|
202 | WRITE ( 14 ) 'm_liq_eb '; WRITE ( 14 ) m_liq_eb |
---|
203 | IF ( ALLOCATED( m_liq_eb_av ) ) THEN |
---|
204 | WRITE ( 14 ) 'm_liq_eb_av '; WRITE ( 14 ) m_liq_eb_av |
---|
205 | ENDIF |
---|
206 | WRITE ( 14 ) 'm_soil '; WRITE ( 14 ) m_soil |
---|
207 | IF ( ALLOCATED( m_soil_av ) ) THEN |
---|
208 | WRITE ( 14 ) 'm_soil_av '; WRITE ( 14 ) m_soil_av |
---|
209 | ENDIF |
---|
210 | ENDIF |
---|
211 | WRITE ( 14 ) 'ol '; WRITE ( 14 ) ol |
---|
212 | WRITE ( 14 ) 'p '; WRITE ( 14 ) p |
---|
213 | IF ( ALLOCATED( p_av ) ) THEN |
---|
214 | WRITE ( 14 ) 'p_av '; WRITE ( 14 ) p_av |
---|
215 | ENDIF |
---|
216 | IF ( ALLOCATED( pc_av ) ) THEN |
---|
217 | WRITE ( 14 ) 'pc_av '; WRITE ( 14 ) pc_av |
---|
218 | ENDIF |
---|
219 | IF ( ALLOCATED( pr_av ) ) THEN |
---|
220 | WRITE ( 14 ) 'pr_av '; WRITE ( 14 ) pr_av |
---|
221 | ENDIF |
---|
222 | IF ( ALLOCATED( prr ) ) THEN |
---|
223 | WRITE ( 14 ) 'prr '; WRITE ( 14 ) prr |
---|
224 | ENDIF |
---|
225 | IF ( ALLOCATED( prr_av ) ) THEN |
---|
226 | WRITE ( 14 ) 'prr_av '; WRITE ( 14 ) prr_av |
---|
227 | ENDIF |
---|
228 | IF ( ALLOCATED( precipitation_amount ) ) THEN |
---|
229 | WRITE ( 14 ) 'precipitation_amount'; WRITE ( 14 ) precipitation_amount |
---|
230 | ENDIF |
---|
231 | IF ( ALLOCATED( precipitation_rate_av ) ) THEN |
---|
232 | WRITE ( 14 ) 'precipitation_rate_a'; WRITE ( 14 ) & |
---|
233 | precipitation_rate_av |
---|
234 | ENDIF |
---|
235 | WRITE ( 14 ) 'pt '; WRITE ( 14 ) pt |
---|
236 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
237 | WRITE ( 14 ) 'pt_av '; WRITE ( 14 ) pt_av |
---|
238 | ENDIF |
---|
239 | IF ( humidity .OR. passive_scalar ) THEN |
---|
240 | WRITE ( 14 ) 'q '; WRITE ( 14 ) q |
---|
241 | IF ( ALLOCATED( q_av ) ) THEN |
---|
242 | WRITE ( 14 ) 'q_av '; WRITE ( 14 ) q_av |
---|
243 | ENDIF |
---|
244 | IF ( cloud_physics .OR. cloud_droplets ) THEN |
---|
245 | WRITE ( 14 ) 'ql '; WRITE ( 14 ) ql |
---|
246 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
247 | WRITE ( 14 ) 'ql_av '; WRITE ( 14 ) ql_av |
---|
248 | ENDIF |
---|
249 | IF ( .NOT. cloud_droplets ) THEN |
---|
250 | WRITE ( 14 ) 'qc '; WRITE ( 14 ) qc |
---|
251 | IF ( ALLOCATED( qc_av ) ) THEN |
---|
252 | WRITE ( 14 ) 'qc_av '; WRITE ( 14 ) qc_av |
---|
253 | ENDIF |
---|
254 | IF ( microphysics_seifert ) THEN |
---|
255 | WRITE ( 14 ) 'nr '; WRITE ( 14 ) nr |
---|
256 | IF ( ALLOCATED( nr_av ) ) THEN |
---|
257 | WRITE ( 14 ) 'nr_av '; WRITE ( 14 ) nr_av |
---|
258 | ENDIF |
---|
259 | WRITE ( 14 ) 'nrs '; WRITE ( 14 ) nrs |
---|
260 | WRITE ( 14 ) 'nrsws '; WRITE ( 14 ) nrsws |
---|
261 | WRITE ( 14 ) 'nrswst '; WRITE ( 14 ) nrswst |
---|
262 | WRITE ( 14 ) 'qr '; WRITE ( 14 ) qr |
---|
263 | IF ( ALLOCATED( qr_av ) ) THEN |
---|
264 | WRITE ( 14 ) 'qr_av '; WRITE ( 14 ) qr_av |
---|
265 | ENDIF |
---|
266 | WRITE ( 14 ) 'qrs '; WRITE ( 14 ) qrs |
---|
267 | WRITE ( 14 ) 'qrsws '; WRITE ( 14 ) qrsws |
---|
268 | WRITE ( 14 ) 'qrswst '; WRITE ( 14 ) qrswst |
---|
269 | ENDIF |
---|
270 | ENDIF |
---|
271 | ENDIF |
---|
272 | WRITE ( 14 ) 'qs '; WRITE ( 14 ) qs |
---|
273 | WRITE ( 14 ) 'qsws '; WRITE ( 14 ) qsws |
---|
274 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
275 | WRITE ( 14 ) 'qsws_av '; WRITE ( 14 ) qsws_av |
---|
276 | ENDIF |
---|
277 | WRITE ( 14 ) 'qswst '; WRITE ( 14 ) qswst |
---|
278 | ENDIF |
---|
279 | IF ( land_surface ) THEN |
---|
280 | IF ( ALLOCATED( qsws_eb_av ) ) THEN |
---|
281 | WRITE ( 14 ) 'qsws_eb_av '; WRITE ( 14 ) qsws_eb_av |
---|
282 | ENDIF |
---|
283 | IF ( ALLOCATED( qsws_liq_eb_av ) ) THEN |
---|
284 | WRITE ( 14 ) 'qsws_liq_eb_av '; WRITE ( 14 ) qsws_liq_eb_av |
---|
285 | ENDIF |
---|
286 | IF ( ALLOCATED( qsws_soil_eb_av ) ) THEN |
---|
287 | WRITE ( 14 ) 'qsws_soil_eb_av '; WRITE ( 14 ) qsws_soil_eb_av |
---|
288 | ENDIF |
---|
289 | IF ( ALLOCATED( qsws_veg_eb_av ) ) THEN |
---|
290 | WRITE ( 14 ) 'qsws_veg_eb_av '; WRITE ( 14 ) qsws_veg_eb_av |
---|
291 | ENDIF |
---|
292 | ENDIF |
---|
293 | IF ( ALLOCATED( rad_net ) ) THEN |
---|
294 | WRITE ( 14 ) 'rad_net '; WRITE ( 14 ) rad_net |
---|
295 | ENDIF |
---|
296 | IF ( radiation ) THEN |
---|
297 | IF ( ALLOCATED( rad_net_av ) ) THEN |
---|
298 | WRITE ( 14 ) 'rad_net_av '; WRITE ( 14 ) rad_net_av |
---|
299 | ENDIF |
---|
300 | IF ( ALLOCATED( rad_lw_in ) ) THEN |
---|
301 | WRITE ( 14 ) 'rad_lw_in '; WRITE ( 14 ) rad_lw_in |
---|
302 | ENDIF |
---|
303 | IF ( ALLOCATED( rad_lw_in_av ) ) THEN |
---|
304 | WRITE ( 14 ) 'rad_lw_in_av '; WRITE ( 14 ) rad_lw_in_av |
---|
305 | ENDIF |
---|
306 | IF ( ALLOCATED( rad_lw_out ) ) THEN |
---|
307 | WRITE ( 14 ) 'rad_lw_out '; WRITE ( 14 ) rad_lw_out |
---|
308 | ENDIF |
---|
309 | IF ( ALLOCATED( rad_lw_out_av ) ) THEN |
---|
310 | WRITE ( 14 ) 'rad_lw_out_av '; WRITE ( 14 ) rad_lw_out_av |
---|
311 | ENDIF |
---|
312 | IF ( ALLOCATED( rad_lw_out_change_0 ) ) THEN |
---|
313 | WRITE ( 14 ) 'rad_lw_out_change_0 ' |
---|
314 | WRITE ( 14 ) rad_lw_out_change_0 |
---|
315 | ENDIF |
---|
316 | IF ( ALLOCATED( rad_lw_cs_hr ) ) THEN |
---|
317 | WRITE ( 14 ) 'rad_lw_cs_hr '; WRITE ( 14 ) rad_lw_cs_hr |
---|
318 | ENDIF |
---|
319 | IF ( ALLOCATED( rad_lw_cs_hr_av ) ) THEN |
---|
320 | WRITE ( 14 ) 'rad_lw_cs_hr_av '; WRITE ( 14 ) rad_lw_cs_hr_av |
---|
321 | ENDIF |
---|
322 | IF ( ALLOCATED( rad_lw_hr ) ) THEN |
---|
323 | WRITE ( 14 ) 'rad_lw_hr '; WRITE ( 14 ) rad_lw_hr |
---|
324 | ENDIF |
---|
325 | IF ( ALLOCATED( rad_lw_hr_av ) ) THEN |
---|
326 | WRITE ( 14 ) 'rad_lw_hr_av '; WRITE ( 14 ) rad_lw_hr_av |
---|
327 | ENDIF |
---|
328 | IF ( ALLOCATED( rad_sw_in ) ) THEN |
---|
329 | WRITE ( 14 ) 'rad_sw_in '; WRITE ( 14 ) rad_sw_in |
---|
330 | ENDIF |
---|
331 | IF ( ALLOCATED( rad_sw_in_av ) ) THEN |
---|
332 | WRITE ( 14 ) 'rad_sw_in_av '; WRITE ( 14 ) rad_sw_in_av |
---|
333 | ENDIF |
---|
334 | IF ( ALLOCATED( rad_sw_out ) ) THEN |
---|
335 | WRITE ( 14 ) 'rad_sw_out '; WRITE ( 14 ) rad_sw_out |
---|
336 | ENDIF |
---|
337 | IF ( ALLOCATED( rad_sw_out_av ) ) THEN |
---|
338 | WRITE ( 14 ) 'rad_sw_out_av '; WRITE ( 14 ) rad_sw_out_av |
---|
339 | ENDIF |
---|
340 | IF ( ALLOCATED( rad_sw_cs_hr ) ) THEN |
---|
341 | WRITE ( 14 ) 'rad_sw_cs_hr '; WRITE ( 14 ) rad_sw_cs_hr |
---|
342 | ENDIF |
---|
343 | IF ( ALLOCATED( rad_sw_cs_hr_av ) ) THEN |
---|
344 | WRITE ( 14 ) 'rad_sw_cs_hr_av '; WRITE ( 14 ) rad_sw_cs_hr_av |
---|
345 | ENDIF |
---|
346 | IF ( ALLOCATED( rad_sw_hr ) ) THEN |
---|
347 | WRITE ( 14 ) 'rad_sw_hr '; WRITE ( 14 ) rad_sw_hr |
---|
348 | ENDIF |
---|
349 | IF ( ALLOCATED( rad_sw_hr_av ) ) THEN |
---|
350 | WRITE ( 14 ) 'rad_sw_hr_av '; WRITE ( 14 ) rad_sw_hr_av |
---|
351 | ENDIF |
---|
352 | ENDIF |
---|
353 | IF ( ocean ) THEN |
---|
354 | IF ( ALLOCATED( rho_av ) ) THEN |
---|
355 | WRITE ( 14 ) 'rho_av '; WRITE ( 14 ) rho_av |
---|
356 | ENDIF |
---|
357 | WRITE ( 14 ) 'sa '; WRITE ( 14 ) sa |
---|
358 | IF ( ALLOCATED( sa_av ) ) THEN |
---|
359 | WRITE ( 14 ) 'sa_av '; WRITE ( 14 ) sa_av |
---|
360 | ENDIF |
---|
361 | WRITE ( 14 ) 'saswsb '; WRITE ( 14 ) saswsb |
---|
362 | WRITE ( 14 ) 'saswst '; WRITE ( 14 ) saswst |
---|
363 | ENDIF |
---|
364 | IF ( land_surface ) THEN |
---|
365 | WRITE ( 14 ) 't_soil '; WRITE ( 14 ) t_soil |
---|
366 | IF ( ALLOCATED( t_soil_av ) ) THEN |
---|
367 | WRITE ( 14 ) 't_soil_av '; WRITE ( 14 ) t_soil_av |
---|
368 | ENDIF |
---|
369 | ENDIF |
---|
370 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
371 | WRITE ( 14 ) 'ql_c_av '; WRITE ( 14 ) ql_c_av |
---|
372 | ENDIF |
---|
373 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
374 | WRITE ( 14 ) 'ql_v_av '; WRITE ( 14 ) ql_v_av |
---|
375 | ENDIF |
---|
376 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
377 | WRITE ( 14 ) 'ql_vp_av '; WRITE ( 14 ) ql_vp_av |
---|
378 | ENDIF |
---|
379 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
380 | WRITE ( 14 ) 'qv_av '; WRITE ( 14 ) qv_av |
---|
381 | ENDIF |
---|
382 | WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv |
---|
383 | WRITE ( 14 ) random_iy |
---|
384 | IF ( ALLOCATED( seq_random_array ) ) THEN |
---|
385 | WRITE ( 14 ) 'seq_random_array '; WRITE ( 14 ) id_random_array |
---|
386 | WRITE ( 14 ) seq_random_array |
---|
387 | ENDIF |
---|
388 | IF ( topography /= 'flat' ) THEN |
---|
389 | WRITE ( 14 ) 'rif_wall '; WRITE ( 14 ) rif_wall |
---|
390 | ENDIF |
---|
391 | IF ( ALLOCATED( s_av ) ) THEN |
---|
392 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
393 | ENDIF |
---|
394 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
395 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
396 | WRITE ( 14 ) 'shf_av '; WRITE ( 14 ) shf_av |
---|
397 | ENDIF |
---|
398 | IF ( land_surface ) THEN |
---|
399 | IF ( ALLOCATED( shf_eb_av ) ) THEN |
---|
400 | WRITE ( 14 ) 'shf_eb_av '; WRITE ( 14 ) shf_eb_av |
---|
401 | ENDIF |
---|
402 | ENDIF |
---|
403 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
404 | WRITE ( 14 ) 'spectrum_x '; WRITE ( 14 ) spectrum_x |
---|
405 | WRITE ( 14 ) 'spectrum_y '; WRITE ( 14 ) spectrum_y |
---|
406 | ENDIF |
---|
407 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
408 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
409 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
410 | ENDIF |
---|
411 | WRITE ( 14 ) 'tswst '; WRITE ( 14 ) tswst |
---|
412 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
413 | IF ( ALLOCATED( u_av ) ) THEN |
---|
414 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
415 | ENDIF |
---|
416 | IF ( ALLOCATED( u_m_l ) ) THEN |
---|
417 | WRITE ( 14 ) 'u_m_l '; WRITE ( 14 ) u_m_l |
---|
418 | ENDIF |
---|
419 | IF ( ALLOCATED( u_m_n ) ) THEN |
---|
420 | WRITE ( 14 ) 'u_m_n '; WRITE ( 14 ) u_m_n |
---|
421 | ENDIF |
---|
422 | IF ( ALLOCATED( u_m_r ) ) THEN |
---|
423 | WRITE ( 14 ) 'u_m_r '; WRITE ( 14 ) u_m_r |
---|
424 | ENDIF |
---|
425 | IF ( ALLOCATED( u_m_s ) ) THEN |
---|
426 | WRITE ( 14 ) 'u_m_s '; WRITE ( 14 ) u_m_s |
---|
427 | ENDIF |
---|
428 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
429 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
430 | WRITE ( 14 ) 'uswst '; WRITE ( 14 ) uswst |
---|
431 | IF ( ALLOCATED( us_av ) ) THEN |
---|
432 | WRITE ( 14 ) 'us_av '; WRITE ( 14 ) us_av |
---|
433 | ENDIF |
---|
434 | WRITE ( 14 ) 'v '; WRITE ( 14 ) v |
---|
435 | IF ( ALLOCATED( v_av ) ) THEN |
---|
436 | WRITE ( 14 ) 'v_av '; WRITE ( 14 ) v_av |
---|
437 | ENDIF |
---|
438 | IF ( ALLOCATED( v_m_l ) ) THEN |
---|
439 | WRITE ( 14 ) 'v_m_l '; WRITE ( 14 ) v_m_l |
---|
440 | ENDIF |
---|
441 | IF ( ALLOCATED( v_m_n ) ) THEN |
---|
442 | WRITE ( 14 ) 'v_m_n '; WRITE ( 14 ) v_m_n |
---|
443 | ENDIF |
---|
444 | IF ( ALLOCATED( v_m_r ) ) THEN |
---|
445 | WRITE ( 14 ) 'v_m_r '; WRITE ( 14 ) v_m_r |
---|
446 | ENDIF |
---|
447 | IF ( ALLOCATED( v_m_s ) ) THEN |
---|
448 | WRITE ( 14 ) 'v_m_s '; WRITE ( 14 ) v_m_s |
---|
449 | ENDIF |
---|
450 | IF ( humidity ) THEN |
---|
451 | WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt |
---|
452 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
453 | WRITE ( 14 ) 'vpt_av '; WRITE ( 14 ) vpt_av |
---|
454 | ENDIF |
---|
455 | ENDIF |
---|
456 | WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws |
---|
457 | WRITE ( 14 ) 'vswst '; WRITE ( 14 ) vswst |
---|
458 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
459 | IF ( ALLOCATED( w_av ) ) THEN |
---|
460 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
461 | ENDIF |
---|
462 | IF ( ALLOCATED( w_m_l ) ) THEN |
---|
463 | WRITE ( 14 ) 'w_m_l '; WRITE ( 14 ) w_m_l |
---|
464 | ENDIF |
---|
465 | IF ( ALLOCATED( w_m_n ) ) THEN |
---|
466 | WRITE ( 14 ) 'w_m_n '; WRITE ( 14 ) w_m_n |
---|
467 | ENDIF |
---|
468 | IF ( ALLOCATED( w_m_r ) ) THEN |
---|
469 | WRITE ( 14 ) 'w_m_r '; WRITE ( 14 ) w_m_r |
---|
470 | ENDIF |
---|
471 | IF ( ALLOCATED( w_m_s ) ) THEN |
---|
472 | WRITE ( 14 ) 'w_m_s '; WRITE ( 14 ) w_m_s |
---|
473 | ENDIF |
---|
474 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
475 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
476 | WRITE ( 14 ) 'z0_av '; WRITE ( 14 ) z0_av |
---|
477 | ENDIF |
---|
478 | WRITE ( 14 ) 'z0h '; WRITE ( 14 ) z0h |
---|
479 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
480 | WRITE ( 14 ) 'z0h_av '; WRITE ( 14 ) z0h_av |
---|
481 | ENDIF |
---|
482 | WRITE ( 14 ) 'z0q '; WRITE ( 14 ) z0q |
---|
483 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
484 | WRITE ( 14 ) 'z0q_av '; WRITE ( 14 ) z0q_av |
---|
485 | ENDIF |
---|
486 | |
---|
487 | ! |
---|
488 | !-- Write end label. Unit 14 is closed in the main program. |
---|
489 | WRITE ( 14 ) '*** end *** ' |
---|
490 | |
---|
491 | END SUBROUTINE write_3d_binary |
---|
492 | |
---|