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