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