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 1960 2016-07-12 16:34:24Z suehring $ |
---|
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, s, sa, ssws, sswst, & |
---|
103 | saswsb, saswst, rif_wall, shf, ss, ts, tswst, u, u_m_l, u_m_n, & |
---|
104 | u_m_r, u_m_s, us, usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, & |
---|
105 | vpt, vsws, vswst, 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 ) 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 ( passive_scalar ) THEN |
---|
280 | WRITE ( 14 ) 's '; WRITE ( 14 ) s |
---|
281 | IF ( ALLOCATED( s_av ) ) THEN |
---|
282 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
283 | ENDIF |
---|
284 | WRITE ( 14 ) 'ss '; WRITE ( 14 ) ss |
---|
285 | WRITE ( 14 ) 'ssws '; WRITE ( 14 ) ssws |
---|
286 | IF ( ALLOCATED( ssws_av ) ) THEN |
---|
287 | WRITE ( 14 ) 'ssws_av '; WRITE ( 14 ) ssws_av |
---|
288 | ENDIF |
---|
289 | WRITE ( 14 ) 'sswst '; WRITE ( 14 ) sswst |
---|
290 | ENDIF |
---|
291 | IF ( land_surface ) THEN |
---|
292 | IF ( ALLOCATED( qsws_eb_av ) ) THEN |
---|
293 | WRITE ( 14 ) 'qsws_eb_av '; WRITE ( 14 ) qsws_eb_av |
---|
294 | ENDIF |
---|
295 | IF ( ALLOCATED( qsws_liq_eb_av ) ) THEN |
---|
296 | WRITE ( 14 ) 'qsws_liq_eb_av '; WRITE ( 14 ) qsws_liq_eb_av |
---|
297 | ENDIF |
---|
298 | IF ( ALLOCATED( qsws_soil_eb_av ) ) THEN |
---|
299 | WRITE ( 14 ) 'qsws_soil_eb_av '; WRITE ( 14 ) qsws_soil_eb_av |
---|
300 | ENDIF |
---|
301 | IF ( ALLOCATED( qsws_veg_eb_av ) ) THEN |
---|
302 | WRITE ( 14 ) 'qsws_veg_eb_av '; WRITE ( 14 ) qsws_veg_eb_av |
---|
303 | ENDIF |
---|
304 | ENDIF |
---|
305 | IF ( ALLOCATED( rad_net ) ) THEN |
---|
306 | WRITE ( 14 ) 'rad_net '; WRITE ( 14 ) rad_net |
---|
307 | ENDIF |
---|
308 | IF ( radiation ) THEN |
---|
309 | IF ( ALLOCATED( rad_net_av ) ) THEN |
---|
310 | WRITE ( 14 ) 'rad_net_av '; WRITE ( 14 ) rad_net_av |
---|
311 | ENDIF |
---|
312 | IF ( ALLOCATED( rad_lw_in ) ) THEN |
---|
313 | WRITE ( 14 ) 'rad_lw_in '; WRITE ( 14 ) rad_lw_in |
---|
314 | ENDIF |
---|
315 | IF ( ALLOCATED( rad_lw_in_av ) ) THEN |
---|
316 | WRITE ( 14 ) 'rad_lw_in_av '; WRITE ( 14 ) rad_lw_in_av |
---|
317 | ENDIF |
---|
318 | IF ( ALLOCATED( rad_lw_out ) ) THEN |
---|
319 | WRITE ( 14 ) 'rad_lw_out '; WRITE ( 14 ) rad_lw_out |
---|
320 | ENDIF |
---|
321 | IF ( ALLOCATED( rad_lw_out_av ) ) THEN |
---|
322 | WRITE ( 14 ) 'rad_lw_out_av '; WRITE ( 14 ) rad_lw_out_av |
---|
323 | ENDIF |
---|
324 | IF ( ALLOCATED( rad_lw_out_change_0 ) ) THEN |
---|
325 | WRITE ( 14 ) 'rad_lw_out_change_0 ' |
---|
326 | WRITE ( 14 ) rad_lw_out_change_0 |
---|
327 | ENDIF |
---|
328 | IF ( ALLOCATED( rad_lw_cs_hr ) ) THEN |
---|
329 | WRITE ( 14 ) 'rad_lw_cs_hr '; WRITE ( 14 ) rad_lw_cs_hr |
---|
330 | ENDIF |
---|
331 | IF ( ALLOCATED( rad_lw_cs_hr_av ) ) THEN |
---|
332 | WRITE ( 14 ) 'rad_lw_cs_hr_av '; WRITE ( 14 ) rad_lw_cs_hr_av |
---|
333 | ENDIF |
---|
334 | IF ( ALLOCATED( rad_lw_hr ) ) THEN |
---|
335 | WRITE ( 14 ) 'rad_lw_hr '; WRITE ( 14 ) rad_lw_hr |
---|
336 | ENDIF |
---|
337 | IF ( ALLOCATED( rad_lw_hr_av ) ) THEN |
---|
338 | WRITE ( 14 ) 'rad_lw_hr_av '; WRITE ( 14 ) rad_lw_hr_av |
---|
339 | ENDIF |
---|
340 | IF ( ALLOCATED( rad_sw_in ) ) THEN |
---|
341 | WRITE ( 14 ) 'rad_sw_in '; WRITE ( 14 ) rad_sw_in |
---|
342 | ENDIF |
---|
343 | IF ( ALLOCATED( rad_sw_in_av ) ) THEN |
---|
344 | WRITE ( 14 ) 'rad_sw_in_av '; WRITE ( 14 ) rad_sw_in_av |
---|
345 | ENDIF |
---|
346 | IF ( ALLOCATED( rad_sw_out ) ) THEN |
---|
347 | WRITE ( 14 ) 'rad_sw_out '; WRITE ( 14 ) rad_sw_out |
---|
348 | ENDIF |
---|
349 | IF ( ALLOCATED( rad_sw_out_av ) ) THEN |
---|
350 | WRITE ( 14 ) 'rad_sw_out_av '; WRITE ( 14 ) rad_sw_out_av |
---|
351 | ENDIF |
---|
352 | IF ( ALLOCATED( rad_sw_cs_hr ) ) THEN |
---|
353 | WRITE ( 14 ) 'rad_sw_cs_hr '; WRITE ( 14 ) rad_sw_cs_hr |
---|
354 | ENDIF |
---|
355 | IF ( ALLOCATED( rad_sw_cs_hr_av ) ) THEN |
---|
356 | WRITE ( 14 ) 'rad_sw_cs_hr_av '; WRITE ( 14 ) rad_sw_cs_hr_av |
---|
357 | ENDIF |
---|
358 | IF ( ALLOCATED( rad_sw_hr ) ) THEN |
---|
359 | WRITE ( 14 ) 'rad_sw_hr '; WRITE ( 14 ) rad_sw_hr |
---|
360 | ENDIF |
---|
361 | IF ( ALLOCATED( rad_sw_hr_av ) ) THEN |
---|
362 | WRITE ( 14 ) 'rad_sw_hr_av '; WRITE ( 14 ) rad_sw_hr_av |
---|
363 | ENDIF |
---|
364 | ENDIF |
---|
365 | IF ( ocean ) THEN |
---|
366 | IF ( ALLOCATED( rho_av ) ) THEN |
---|
367 | WRITE ( 14 ) 'rho_av '; WRITE ( 14 ) rho_av |
---|
368 | ENDIF |
---|
369 | WRITE ( 14 ) 'sa '; WRITE ( 14 ) sa |
---|
370 | IF ( ALLOCATED( sa_av ) ) THEN |
---|
371 | WRITE ( 14 ) 'sa_av '; WRITE ( 14 ) sa_av |
---|
372 | ENDIF |
---|
373 | WRITE ( 14 ) 'saswsb '; WRITE ( 14 ) saswsb |
---|
374 | WRITE ( 14 ) 'saswst '; WRITE ( 14 ) saswst |
---|
375 | ENDIF |
---|
376 | IF ( land_surface ) THEN |
---|
377 | WRITE ( 14 ) 't_soil '; WRITE ( 14 ) t_soil |
---|
378 | IF ( ALLOCATED( t_soil_av ) ) THEN |
---|
379 | WRITE ( 14 ) 't_soil_av '; WRITE ( 14 ) t_soil_av |
---|
380 | ENDIF |
---|
381 | ENDIF |
---|
382 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
383 | WRITE ( 14 ) 'ql_c_av '; WRITE ( 14 ) ql_c_av |
---|
384 | ENDIF |
---|
385 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
386 | WRITE ( 14 ) 'ql_v_av '; WRITE ( 14 ) ql_v_av |
---|
387 | ENDIF |
---|
388 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
389 | WRITE ( 14 ) 'ql_vp_av '; WRITE ( 14 ) ql_vp_av |
---|
390 | ENDIF |
---|
391 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
392 | WRITE ( 14 ) 'qv_av '; WRITE ( 14 ) qv_av |
---|
393 | ENDIF |
---|
394 | WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv |
---|
395 | WRITE ( 14 ) random_iy |
---|
396 | IF ( ALLOCATED( seq_random_array ) ) THEN |
---|
397 | WRITE ( 14 ) 'seq_random_array '; WRITE ( 14 ) id_random_array |
---|
398 | WRITE ( 14 ) seq_random_array |
---|
399 | ENDIF |
---|
400 | IF ( topography /= 'flat' ) THEN |
---|
401 | WRITE ( 14 ) 'rif_wall '; WRITE ( 14 ) rif_wall |
---|
402 | ENDIF |
---|
403 | IF ( ALLOCATED( s_av ) ) THEN |
---|
404 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
405 | ENDIF |
---|
406 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
407 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
408 | WRITE ( 14 ) 'shf_av '; WRITE ( 14 ) shf_av |
---|
409 | ENDIF |
---|
410 | IF ( land_surface ) THEN |
---|
411 | IF ( ALLOCATED( shf_eb_av ) ) THEN |
---|
412 | WRITE ( 14 ) 'shf_eb_av '; WRITE ( 14 ) shf_eb_av |
---|
413 | ENDIF |
---|
414 | ENDIF |
---|
415 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
416 | WRITE ( 14 ) 'spectrum_x '; WRITE ( 14 ) spectrum_x |
---|
417 | WRITE ( 14 ) 'spectrum_y '; WRITE ( 14 ) spectrum_y |
---|
418 | ENDIF |
---|
419 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
420 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
421 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
422 | ENDIF |
---|
423 | WRITE ( 14 ) 'tswst '; WRITE ( 14 ) tswst |
---|
424 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
425 | IF ( ALLOCATED( u_av ) ) THEN |
---|
426 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
427 | ENDIF |
---|
428 | IF ( ALLOCATED( u_m_l ) ) THEN |
---|
429 | WRITE ( 14 ) 'u_m_l '; WRITE ( 14 ) u_m_l |
---|
430 | ENDIF |
---|
431 | IF ( ALLOCATED( u_m_n ) ) THEN |
---|
432 | WRITE ( 14 ) 'u_m_n '; WRITE ( 14 ) u_m_n |
---|
433 | ENDIF |
---|
434 | IF ( ALLOCATED( u_m_r ) ) THEN |
---|
435 | WRITE ( 14 ) 'u_m_r '; WRITE ( 14 ) u_m_r |
---|
436 | ENDIF |
---|
437 | IF ( ALLOCATED( u_m_s ) ) THEN |
---|
438 | WRITE ( 14 ) 'u_m_s '; WRITE ( 14 ) u_m_s |
---|
439 | ENDIF |
---|
440 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
441 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
442 | WRITE ( 14 ) 'uswst '; WRITE ( 14 ) uswst |
---|
443 | IF ( ALLOCATED( us_av ) ) THEN |
---|
444 | WRITE ( 14 ) 'us_av '; WRITE ( 14 ) us_av |
---|
445 | ENDIF |
---|
446 | WRITE ( 14 ) 'v '; WRITE ( 14 ) v |
---|
447 | IF ( ALLOCATED( v_av ) ) THEN |
---|
448 | WRITE ( 14 ) 'v_av '; WRITE ( 14 ) v_av |
---|
449 | ENDIF |
---|
450 | IF ( ALLOCATED( v_m_l ) ) THEN |
---|
451 | WRITE ( 14 ) 'v_m_l '; WRITE ( 14 ) v_m_l |
---|
452 | ENDIF |
---|
453 | IF ( ALLOCATED( v_m_n ) ) THEN |
---|
454 | WRITE ( 14 ) 'v_m_n '; WRITE ( 14 ) v_m_n |
---|
455 | ENDIF |
---|
456 | IF ( ALLOCATED( v_m_r ) ) THEN |
---|
457 | WRITE ( 14 ) 'v_m_r '; WRITE ( 14 ) v_m_r |
---|
458 | ENDIF |
---|
459 | IF ( ALLOCATED( v_m_s ) ) THEN |
---|
460 | WRITE ( 14 ) 'v_m_s '; WRITE ( 14 ) v_m_s |
---|
461 | ENDIF |
---|
462 | IF ( humidity ) THEN |
---|
463 | WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt |
---|
464 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
465 | WRITE ( 14 ) 'vpt_av '; WRITE ( 14 ) vpt_av |
---|
466 | ENDIF |
---|
467 | ENDIF |
---|
468 | WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws |
---|
469 | WRITE ( 14 ) 'vswst '; WRITE ( 14 ) vswst |
---|
470 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
471 | IF ( ALLOCATED( w_av ) ) THEN |
---|
472 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
473 | ENDIF |
---|
474 | IF ( ALLOCATED( w_m_l ) ) THEN |
---|
475 | WRITE ( 14 ) 'w_m_l '; WRITE ( 14 ) w_m_l |
---|
476 | ENDIF |
---|
477 | IF ( ALLOCATED( w_m_n ) ) THEN |
---|
478 | WRITE ( 14 ) 'w_m_n '; WRITE ( 14 ) w_m_n |
---|
479 | ENDIF |
---|
480 | IF ( ALLOCATED( w_m_r ) ) THEN |
---|
481 | WRITE ( 14 ) 'w_m_r '; WRITE ( 14 ) w_m_r |
---|
482 | ENDIF |
---|
483 | IF ( ALLOCATED( w_m_s ) ) THEN |
---|
484 | WRITE ( 14 ) 'w_m_s '; WRITE ( 14 ) w_m_s |
---|
485 | ENDIF |
---|
486 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
487 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
488 | WRITE ( 14 ) 'z0_av '; WRITE ( 14 ) z0_av |
---|
489 | ENDIF |
---|
490 | WRITE ( 14 ) 'z0h '; WRITE ( 14 ) z0h |
---|
491 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
492 | WRITE ( 14 ) 'z0h_av '; WRITE ( 14 ) z0h_av |
---|
493 | ENDIF |
---|
494 | WRITE ( 14 ) 'z0q '; WRITE ( 14 ) z0q |
---|
495 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
496 | WRITE ( 14 ) 'z0q_av '; WRITE ( 14 ) z0q_av |
---|
497 | ENDIF |
---|
498 | |
---|
499 | ! |
---|
500 | !-- Write end label. Unit 14 is closed in the main program. |
---|
501 | WRITE ( 14 ) '*** end *** ' |
---|
502 | |
---|
503 | END SUBROUTINE write_3d_binary |
---|
504 | |
---|