[1682] | 1 | !> @file write_3d_binary.f90 |
---|
[1036] | 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 | ! |
---|
[1691] | 16 | ! Copyright 1997-2015 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1360] | 21 | ! |
---|
[1692] | 22 | ! |
---|
[1] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
[3] | 25 | ! $Id: write_3d_binary.f90 1692 2015-10-26 16:29:17Z maronga $ |
---|
[39] | 26 | ! |
---|
[1692] | 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 | ! |
---|
[1683] | 31 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 32 | ! Code annotations made doxygen readable |
---|
| 33 | ! |
---|
[1586] | 34 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 35 | ! Adapted for RRTMG |
---|
| 36 | ! |
---|
[1552] | 37 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 38 | ! Added support for binary ouput of land surface and radiation model data. |
---|
| 39 | ! |
---|
[1401] | 40 | ! 1400 2014-05-09 14:03:54Z knoop |
---|
| 41 | ! writing of arrays for random_generator_parallel added |
---|
| 42 | ! |
---|
[1360] | 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 | ! |
---|
[1321] | 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 | ! |
---|
[1319] | 53 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 54 | ! module interfaces removed |
---|
| 55 | ! |
---|
[1116] | 56 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 57 | ! qr and nr are restricted to precipitation |
---|
| 58 | ! |
---|
[1054] | 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 | ! |
---|
[1037] | 64 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 65 | ! code put under GPL (PALM 3.9) |
---|
| 66 | ! |
---|
[1002] | 67 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 68 | ! all actions concerning leapfrog- and ups-scheme removed |
---|
| 69 | ! |
---|
[979] | 70 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 71 | ! +z0h, z0h_av |
---|
| 72 | ! |
---|
[1] | 73 | ! Revision 1.1 1998/03/18 20:20:21 raasch |
---|
| 74 | ! Initial revision |
---|
| 75 | ! |
---|
| 76 | ! |
---|
| 77 | ! Description: |
---|
| 78 | ! ------------ |
---|
[1682] | 79 | !> Binary output of variables and arrays for restarts. |
---|
[1] | 80 | !------------------------------------------------------------------------------! |
---|
[1682] | 81 | SUBROUTINE write_3d_binary |
---|
| 82 | |
---|
[1] | 83 | |
---|
[1320] | 84 | USE arrays_3d, & |
---|
[1691] | 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, & |
---|
[1320] | 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 | |
---|
[1] | 91 | USE averaging |
---|
[1320] | 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 |
---|
[1551] | 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 |
---|
[1320] | 108 | |
---|
[1353] | 109 | USE particle_attributes, & |
---|
[1320] | 110 | ONLY: iran_part |
---|
| 111 | |
---|
[1] | 112 | USE pegrid |
---|
[1320] | 113 | |
---|
[1551] | 114 | USE radiation_model_mod, & |
---|
[1585] | 115 | ONLY: radiation, rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, & |
---|
[1691] | 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 |
---|
[1551] | 120 | |
---|
[1353] | 121 | USE random_function_mod, & |
---|
[1320] | 122 | ONLY: random_iv, random_iy |
---|
[1400] | 123 | |
---|
| 124 | USE random_generator_parallel, & |
---|
| 125 | ONLY: id_random_array, seq_random_array |
---|
[1320] | 126 | |
---|
| 127 | USE statistics, & |
---|
| 128 | ONLY: spectrum_x, spectrum_y |
---|
[1] | 129 | |
---|
| 130 | IMPLICIT NONE |
---|
| 131 | |
---|
[1682] | 132 | CHARACTER (LEN=10) :: binary_version !< |
---|
[1] | 133 | |
---|
| 134 | |
---|
| 135 | ! |
---|
| 136 | !-- Write control parameters and other variables for restart. |
---|
[143] | 137 | IF ( myid == 0 ) CALL write_var_list |
---|
[1] | 138 | |
---|
| 139 | ! |
---|
| 140 | !-- Write arrays. |
---|
[1585] | 141 | binary_version = '4.1' |
---|
[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 | |
---|
[1551] | 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 |
---|
[1] | 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 |
---|
[1551] | 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 |
---|
[1] | 175 | WRITE ( 14 ) 'kh '; WRITE ( 14 ) kh |
---|
| 176 | WRITE ( 14 ) 'km '; WRITE ( 14 ) km |
---|
[1551] | 177 | IF ( land_surface ) THEN |
---|
| 178 | IF ( ALLOCATED( lai_av ) ) THEN |
---|
| 179 | WRITE ( 14 ) 'lai_av '; WRITE ( 14 ) lai_av |
---|
| 180 | ENDIF |
---|
| 181 | ENDIF |
---|
[771] | 182 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
| 183 | WRITE ( 14 ) 'lpt_av '; WRITE ( 14 ) lpt_av |
---|
| 184 | ENDIF |
---|
[1] | 185 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
| 186 | WRITE ( 14 ) 'lwp_av '; WRITE ( 14 ) lwp_av |
---|
| 187 | ENDIF |
---|
[1551] | 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 |
---|
[1691] | 198 | WRITE ( 14 ) 'ol '; WRITE ( 14 ) ol |
---|
[1] | 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 |
---|
[1053] | 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 |
---|
[72] | 215 | IF ( ALLOCATED( precipitation_amount ) ) THEN |
---|
| 216 | WRITE ( 14 ) 'precipitation_amount'; WRITE ( 14 ) precipitation_amount |
---|
| 217 | ENDIF |
---|
| 218 | IF ( ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[1320] | 219 | WRITE ( 14 ) 'precipitation_rate_a'; WRITE ( 14 ) & |
---|
[72] | 220 | precipitation_rate_av |
---|
| 221 | ENDIF |
---|
[1] | 222 | WRITE ( 14 ) 'pt '; WRITE ( 14 ) pt |
---|
| 223 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
| 224 | WRITE ( 14 ) 'pt_av '; WRITE ( 14 ) pt_av |
---|
| 225 | ENDIF |
---|
[75] | 226 | IF ( humidity .OR. passive_scalar ) THEN |
---|
[1] | 227 | WRITE ( 14 ) 'q '; WRITE ( 14 ) q |
---|
| 228 | IF ( ALLOCATED( q_av ) ) THEN |
---|
| 229 | WRITE ( 14 ) 'q_av '; WRITE ( 14 ) q_av |
---|
| 230 | ENDIF |
---|
[790] | 231 | IF ( cloud_physics .OR. cloud_droplets ) THEN |
---|
[1359] | 232 | WRITE ( 14 ) 'ql '; WRITE ( 14 ) ql |
---|
[1] | 233 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
| 234 | WRITE ( 14 ) 'ql_av '; WRITE ( 14 ) ql_av |
---|
| 235 | ENDIF |
---|
[1359] | 236 | IF ( icloud_scheme == 0 .AND. .NOT. cloud_droplets ) THEN |
---|
| 237 | WRITE ( 14 ) 'qc '; WRITE ( 14 ) qc |
---|
[1115] | 238 | IF ( ALLOCATED( qc_av ) ) THEN |
---|
| 239 | WRITE ( 14 ) 'qc_av '; WRITE ( 14 ) qc_av |
---|
[1053] | 240 | ENDIF |
---|
[1115] | 241 | IF ( precipitation ) THEN |
---|
[1359] | 242 | WRITE ( 14 ) 'nr '; WRITE ( 14 ) nr |
---|
[1115] | 243 | IF ( ALLOCATED( nr_av ) ) THEN |
---|
| 244 | WRITE ( 14 ) 'nr_av '; WRITE ( 14 ) nr_av |
---|
| 245 | ENDIF |
---|
[1359] | 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 |
---|
[1115] | 250 | IF ( ALLOCATED( qr_av ) ) THEN |
---|
| 251 | WRITE ( 14 ) 'qr_av '; WRITE ( 14 ) qr_av |
---|
| 252 | ENDIF |
---|
[1359] | 253 | WRITE ( 14 ) 'qrs '; WRITE ( 14 ) qrs |
---|
| 254 | WRITE ( 14 ) 'qrsws '; WRITE ( 14 ) qrsws |
---|
| 255 | WRITE ( 14 ) 'qrswst '; WRITE ( 14 ) qrswst |
---|
[1053] | 256 | ENDIF |
---|
| 257 | ENDIF |
---|
[1] | 258 | ENDIF |
---|
[1359] | 259 | WRITE ( 14 ) 'qs '; WRITE ( 14 ) qs |
---|
| 260 | WRITE ( 14 ) 'qsws '; WRITE ( 14 ) qsws |
---|
[354] | 261 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
| 262 | WRITE ( 14 ) 'qsws_av '; WRITE ( 14 ) qsws_av |
---|
| 263 | ENDIF |
---|
[19] | 264 | WRITE ( 14 ) 'qswst '; WRITE ( 14 ) qswst |
---|
[1] | 265 | ENDIF |
---|
[1551] | 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 |
---|
[1585] | 280 | IF ( ALLOCATED( rad_net ) ) THEN |
---|
| 281 | WRITE ( 14 ) 'rad_net '; WRITE ( 14 ) rad_net |
---|
| 282 | ENDIF |
---|
[1551] | 283 | IF ( radiation ) THEN |
---|
| 284 | IF ( ALLOCATED( rad_net_av ) ) THEN |
---|
| 285 | WRITE ( 14 ) 'rad_net_av '; WRITE ( 14 ) rad_net_av |
---|
| 286 | ENDIF |
---|
[1585] | 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 |
---|
[1691] | 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 |
---|
[1585] | 311 | IF ( ALLOCATED( rad_sw_in ) ) THEN |
---|
| 312 | WRITE ( 14 ) 'rad_sw_in '; WRITE ( 14 ) rad_sw_in |
---|
| 313 | ENDIF |
---|
[1551] | 314 | IF ( ALLOCATED( rad_sw_in_av ) ) THEN |
---|
[1585] | 315 | WRITE ( 14 ) 'rad_sw_in_av '; WRITE ( 14 ) rad_sw_in_av |
---|
[1551] | 316 | ENDIF |
---|
[1585] | 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 |
---|
[1691] | 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 |
---|
[1551] | 335 | ENDIF |
---|
[94] | 336 | IF ( ocean ) THEN |
---|
[96] | 337 | IF ( ALLOCATED( rho_av ) ) THEN |
---|
| 338 | WRITE ( 14 ) 'rho_av '; WRITE ( 14 ) rho_av |
---|
| 339 | ENDIF |
---|
[94] | 340 | WRITE ( 14 ) 'sa '; WRITE ( 14 ) sa |
---|
[96] | 341 | IF ( ALLOCATED( sa_av ) ) THEN |
---|
| 342 | WRITE ( 14 ) 'sa_av '; WRITE ( 14 ) sa_av |
---|
| 343 | ENDIF |
---|
[95] | 344 | WRITE ( 14 ) 'saswsb '; WRITE ( 14 ) saswsb |
---|
[94] | 345 | WRITE ( 14 ) 'saswst '; WRITE ( 14 ) saswst |
---|
| 346 | ENDIF |
---|
[1551] | 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 |
---|
[1] | 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 |
---|
[1400] | 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 |
---|
[51] | 371 | IF ( topography /= 'flat' ) THEN |
---|
| 372 | WRITE ( 14 ) 'rif_wall '; WRITE ( 14 ) rif_wall |
---|
| 373 | ENDIF |
---|
[1] | 374 | IF ( ALLOCATED( s_av ) ) THEN |
---|
| 375 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
| 376 | ENDIF |
---|
| 377 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
[354] | 378 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
| 379 | WRITE ( 14 ) 'shf_av '; WRITE ( 14 ) shf_av |
---|
| 380 | ENDIF |
---|
[1551] | 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 |
---|
[143] | 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 |
---|
[1] | 390 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
| 391 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
| 392 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
| 393 | ENDIF |
---|
[19] | 394 | WRITE ( 14 ) 'tswst '; WRITE ( 14 ) tswst |
---|
[1] | 395 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
| 396 | IF ( ALLOCATED( u_av ) ) THEN |
---|
| 397 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
| 398 | ENDIF |
---|
[73] | 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 |
---|
[1] | 411 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
| 412 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
[102] | 413 | WRITE ( 14 ) 'uswst '; WRITE ( 14 ) uswst |
---|
[1] | 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 |
---|
[73] | 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 |
---|
[75] | 433 | IF ( humidity ) THEN |
---|
[1] | 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 |
---|
[102] | 440 | WRITE ( 14 ) 'vswst '; WRITE ( 14 ) vswst |
---|
[1] | 441 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
| 442 | IF ( ALLOCATED( w_av ) ) THEN |
---|
| 443 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
| 444 | ENDIF |
---|
[73] | 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 |
---|
[1] | 457 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
[72] | 458 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
| 459 | WRITE ( 14 ) 'z0_av '; WRITE ( 14 ) z0_av |
---|
| 460 | ENDIF |
---|
[978] | 461 | WRITE ( 14 ) 'z0h '; WRITE ( 14 ) z0h |
---|
| 462 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
| 463 | WRITE ( 14 ) 'z0h_av '; WRITE ( 14 ) z0h_av |
---|
| 464 | ENDIF |
---|
[1] | 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 |
---|
[1320] | 471 | |
---|