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