1 | SUBROUTINE write_3d_binary |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------! |
---|
4 | ! Actual revisions: |
---|
5 | ! ----------------- |
---|
6 | ! |
---|
7 | ! |
---|
8 | ! Former revisions: |
---|
9 | ! ----------------- |
---|
10 | ! $Id: write_3d_binary.f90 4 2007-02-13 11:33:16Z 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 | ENDIF |
---|
114 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
115 | WRITE ( 14 ) 'ql_c_av '; WRITE ( 14 ) ql_c_av |
---|
116 | ENDIF |
---|
117 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
118 | WRITE ( 14 ) 'ql_v_av '; WRITE ( 14 ) ql_v_av |
---|
119 | ENDIF |
---|
120 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
121 | WRITE ( 14 ) 'ql_vp_av '; WRITE ( 14 ) ql_vp_av |
---|
122 | ENDIF |
---|
123 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
124 | WRITE ( 14 ) 'qv_av '; WRITE ( 14 ) qv_av |
---|
125 | ENDIF |
---|
126 | WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv |
---|
127 | WRITE ( 14 ) random_iy |
---|
128 | WRITE ( 14 ) 'rif '; WRITE ( 14 ) rif |
---|
129 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
130 | WRITE ( 14 ) 'rif_m '; WRITE ( 14 ) rif_m |
---|
131 | ENDIF |
---|
132 | IF ( ALLOCATED( s_av ) ) THEN |
---|
133 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
134 | ENDIF |
---|
135 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
136 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
137 | WRITE ( 14 ) 'shf_m '; WRITE ( 14 ) shf_m |
---|
138 | ENDIF |
---|
139 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
140 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
141 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
142 | ENDIF |
---|
143 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
144 | IF ( ALLOCATED( u_av ) ) THEN |
---|
145 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
146 | ENDIF |
---|
147 | WRITE ( 14 ) 'u_m '; WRITE ( 14 ) u_m |
---|
148 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
149 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
150 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
151 | WRITE ( 14 ) 'usws_m '; WRITE ( 14 ) usws_m |
---|
152 | ENDIF |
---|
153 | IF ( ALLOCATED( us_av ) ) THEN |
---|
154 | WRITE ( 14 ) 'us_av '; WRITE ( 14 ) us_av |
---|
155 | ENDIF |
---|
156 | WRITE ( 14 ) 'v '; WRITE ( 14 ) v |
---|
157 | WRITE ( 14 ) 'volume_flow_area '; WRITE ( 14 ) volume_flow_area |
---|
158 | WRITE ( 14 ) 'volume_flow_initial '; WRITE ( 14 ) volume_flow_initial |
---|
159 | IF ( ALLOCATED( v_av ) ) THEN |
---|
160 | WRITE ( 14 ) 'v_av '; WRITE ( 14 ) v_av |
---|
161 | ENDIF |
---|
162 | WRITE ( 14 ) 'v_m '; WRITE ( 14 ) v_m |
---|
163 | IF ( moisture ) THEN |
---|
164 | WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt |
---|
165 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
166 | WRITE ( 14 ) 'vpt_av '; WRITE ( 14 ) vpt_av |
---|
167 | ENDIF |
---|
168 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
169 | WRITE ( 14 ) 'vpt_m '; WRITE ( 14 ) vpt_m |
---|
170 | ENDIF |
---|
171 | ENDIF |
---|
172 | WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws |
---|
173 | IF ( timestep_scheme(1:5) /= 'runge' ) THEN |
---|
174 | WRITE ( 14 ) 'vsws_m '; WRITE ( 14 ) vsws_m |
---|
175 | ENDIF |
---|
176 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
177 | IF ( ALLOCATED( w_av ) ) THEN |
---|
178 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
179 | ENDIF |
---|
180 | WRITE ( 14 ) 'w_m '; WRITE ( 14 ) w_m |
---|
181 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
182 | |
---|
183 | WRITE ( 14 ) 'cross_linecolors '; WRITE ( 14 ) cross_linecolors |
---|
184 | WRITE ( 14 ) 'cross_linestyles '; WRITE ( 14 ) cross_linestyles |
---|
185 | WRITE ( 14 ) 'cross_normalized_x '; WRITE ( 14 ) cross_normalized_x |
---|
186 | WRITE ( 14 ) 'cross_normalized_y '; WRITE ( 14 ) cross_normalized_y |
---|
187 | WRITE ( 14 ) 'cross_normx_factor '; WRITE ( 14 ) cross_normx_factor |
---|
188 | WRITE ( 14 ) 'cross_normy_factor '; WRITE ( 14 ) cross_normy_factor |
---|
189 | WRITE ( 14 ) 'cross_profiles '; WRITE ( 14 ) cross_profiles |
---|
190 | WRITE ( 14 ) 'cross_profile_n_coun' |
---|
191 | WRITE ( 14 ) cross_profile_number_count |
---|
192 | WRITE ( 14 ) 'cross_profile_number'; WRITE ( 14 ) cross_profile_numbers |
---|
193 | WRITE ( 14 ) 'cross_uxmax '; WRITE ( 14 ) cross_uxmax |
---|
194 | WRITE ( 14 ) 'cross_uxmax_computed'; WRITE ( 14 ) cross_uxmax_computed |
---|
195 | WRITE ( 14 ) 'cross_uxmax_normaliz'; WRITE ( 14 ) cross_uxmax_normalized |
---|
196 | WRITE ( 14 ) 'cross_uxmax_norm_com' |
---|
197 | WRITE ( 14 ) cross_uxmax_normalized_computed |
---|
198 | WRITE ( 14 ) 'cross_uxmin '; WRITE ( 14 ) cross_uxmin |
---|
199 | WRITE ( 14 ) 'cross_uxmin_computed'; WRITE ( 14 ) cross_uxmin_computed |
---|
200 | WRITE ( 14 ) 'cross_uxmin_normaliz'; WRITE ( 14 ) cross_uxmin_normalized |
---|
201 | WRITE ( 14 ) 'cross_uxmin_norm_com' |
---|
202 | WRITE ( 14 ) cross_uxmin_normalized_computed |
---|
203 | WRITE ( 14 ) 'cross_uymax '; WRITE ( 14 ) cross_uymax |
---|
204 | WRITE ( 14 ) 'cross_uymin '; WRITE ( 14 ) cross_uymin |
---|
205 | WRITE ( 14 ) 'cross_xtext '; WRITE ( 14 ) cross_xtext |
---|
206 | WRITE ( 14 ) 'dopr_crossindex '; WRITE ( 14 ) dopr_crossindex |
---|
207 | WRITE ( 14 ) 'dopr_time_count '; WRITE ( 14 ) dopr_time_count |
---|
208 | WRITE ( 14 ) 'hom_sum '; WRITE ( 14 ) hom_sum |
---|
209 | WRITE ( 14 ) 'profile_columns '; WRITE ( 14 ) profile_columns |
---|
210 | WRITE ( 14 ) 'profile_number '; WRITE ( 14 ) profile_number |
---|
211 | WRITE ( 14 ) 'profile_rows '; WRITE ( 14 ) profile_rows |
---|
212 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
213 | WRITE ( 14 ) 'spectrum_x '; WRITE ( 14 ) spectrum_x |
---|
214 | WRITE ( 14 ) 'spectrum_y '; WRITE ( 14 ) spectrum_y |
---|
215 | ENDIF |
---|
216 | |
---|
217 | ! |
---|
218 | !-- Write end label. Unit 14 is closed in the main program. |
---|
219 | WRITE ( 14 ) '*** end *** ' |
---|
220 | |
---|
221 | |
---|
222 | CALL cpu_log( log_point(22), 'write_3d_binary', 'stop' ) |
---|
223 | |
---|
224 | |
---|
225 | END SUBROUTINE write_3d_binary |
---|