[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 | ! |
---|
[1818] | 16 | ! Copyright 1997-2016 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[484] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1360] | 21 | ! |
---|
[1851] | 22 | ! |
---|
[1] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
[3] | 25 | ! $Id: write_3d_binary.f90 1852 2016-04-08 14:07:36Z suehring $ |
---|
[39] | 26 | ! |
---|
[1851] | 27 | ! 1849 2016-04-08 11:33:18Z hoffmann |
---|
| 28 | ! prr, precipitation_amount moved to arrays_3d |
---|
[1852] | 29 | ! |
---|
[1834] | 30 | ! 1833 2016-04-07 14:23:03Z raasch |
---|
| 31 | ! statistics module replaced by spectra module |
---|
| 32 | ! |
---|
[1823] | 33 | ! 1822 2016-04-07 07:49:42Z hoffmann |
---|
| 34 | ! icloud_scheme replaced by microphysics_* |
---|
| 35 | ! |
---|
[1789] | 36 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
| 37 | ! Added z0q and z0q_av |
---|
| 38 | ! |
---|
[1710] | 39 | ! 1709 2015-11-04 14:47:01Z maronga |
---|
| 40 | ! Added rad_lw_out_change_0, increased binary_version |
---|
| 41 | ! |
---|
[1692] | 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 | ! |
---|
[1683] | 46 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 47 | ! Code annotations made doxygen readable |
---|
| 48 | ! |
---|
[1586] | 49 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 50 | ! Adapted for RRTMG |
---|
| 51 | ! |
---|
[1552] | 52 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 53 | ! Added support for binary ouput of land surface and radiation model data. |
---|
| 54 | ! |
---|
[1401] | 55 | ! 1400 2014-05-09 14:03:54Z knoop |
---|
| 56 | ! writing of arrays for random_generator_parallel added |
---|
| 57 | ! |
---|
[1360] | 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 | ! |
---|
[1321] | 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 | ! |
---|
[1319] | 68 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 69 | ! module interfaces removed |
---|
| 70 | ! |
---|
[1116] | 71 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 72 | ! qr and nr are restricted to precipitation |
---|
| 73 | ! |
---|
[1054] | 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 | ! |
---|
[1037] | 79 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 80 | ! code put under GPL (PALM 3.9) |
---|
| 81 | ! |
---|
[1002] | 82 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 83 | ! all actions concerning leapfrog- and ups-scheme removed |
---|
| 84 | ! |
---|
[979] | 85 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 86 | ! +z0h, z0h_av |
---|
| 87 | ! |
---|
[1] | 88 | ! Revision 1.1 1998/03/18 20:20:21 raasch |
---|
| 89 | ! Initial revision |
---|
| 90 | ! |
---|
| 91 | ! |
---|
| 92 | ! Description: |
---|
| 93 | ! ------------ |
---|
[1682] | 94 | !> Binary output of variables and arrays for restarts. |
---|
[1] | 95 | !------------------------------------------------------------------------------! |
---|
[1682] | 96 | SUBROUTINE write_3d_binary |
---|
| 97 | |
---|
[1] | 98 | |
---|
[1320] | 99 | USE arrays_3d, & |
---|
[1849] | 100 | ONLY: e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, & |
---|
| 101 | prr, precipitation_amount, qr, & |
---|
[1691] | 102 | qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, & |
---|
[1320] | 103 | rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us, & |
---|
| 104 | usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst, & |
---|
[1788] | 105 | w, w_m_l, w_m_n, w_m_r, w_m_s, z0, z0h, z0q |
---|
[1320] | 106 | |
---|
[1] | 107 | USE averaging |
---|
[1849] | 108 | |
---|
[1320] | 109 | USE control_parameters, & |
---|
| 110 | ONLY: iran, humidity, passive_scalar, cloud_physics, cloud_droplets, & |
---|
[1822] | 111 | microphysics_seifert, ocean, topography |
---|
[1320] | 112 | |
---|
| 113 | USE indices, & |
---|
| 114 | ONLY: nxl, nxr, nys, nyn, nzb, nzt |
---|
[1551] | 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 |
---|
[1320] | 121 | |
---|
[1353] | 122 | USE particle_attributes, & |
---|
[1320] | 123 | ONLY: iran_part |
---|
| 124 | |
---|
[1] | 125 | USE pegrid |
---|
[1320] | 126 | |
---|
[1551] | 127 | USE radiation_model_mod, & |
---|
[1585] | 128 | ONLY: radiation, rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, & |
---|
[1709] | 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 |
---|
[1551] | 133 | |
---|
[1353] | 134 | USE random_function_mod, & |
---|
[1320] | 135 | ONLY: random_iv, random_iy |
---|
[1400] | 136 | |
---|
| 137 | USE random_generator_parallel, & |
---|
| 138 | ONLY: id_random_array, seq_random_array |
---|
[1320] | 139 | |
---|
[1833] | 140 | USE spectra_mod, & |
---|
[1320] | 141 | ONLY: spectrum_x, spectrum_y |
---|
[1] | 142 | |
---|
| 143 | IMPLICIT NONE |
---|
| 144 | |
---|
[1682] | 145 | CHARACTER (LEN=10) :: binary_version !< |
---|
[1] | 146 | |
---|
| 147 | |
---|
| 148 | ! |
---|
| 149 | !-- Write control parameters and other variables for restart. |
---|
[143] | 150 | IF ( myid == 0 ) CALL write_var_list |
---|
[1] | 151 | |
---|
| 152 | ! |
---|
| 153 | !-- Write arrays. |
---|
[1788] | 154 | binary_version = '4.3' |
---|
[1] | 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 | |
---|
[1551] | 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 |
---|
[1] | 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 |
---|
[1551] | 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 |
---|
[1] | 188 | WRITE ( 14 ) 'kh '; WRITE ( 14 ) kh |
---|
| 189 | WRITE ( 14 ) 'km '; WRITE ( 14 ) km |
---|
[1551] | 190 | IF ( land_surface ) THEN |
---|
| 191 | IF ( ALLOCATED( lai_av ) ) THEN |
---|
| 192 | WRITE ( 14 ) 'lai_av '; WRITE ( 14 ) lai_av |
---|
| 193 | ENDIF |
---|
| 194 | ENDIF |
---|
[771] | 195 | IF ( ALLOCATED( lpt_av ) ) THEN |
---|
| 196 | WRITE ( 14 ) 'lpt_av '; WRITE ( 14 ) lpt_av |
---|
| 197 | ENDIF |
---|
[1] | 198 | IF ( ALLOCATED( lwp_av ) ) THEN |
---|
| 199 | WRITE ( 14 ) 'lwp_av '; WRITE ( 14 ) lwp_av |
---|
| 200 | ENDIF |
---|
[1551] | 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 |
---|
[1691] | 211 | WRITE ( 14 ) 'ol '; WRITE ( 14 ) ol |
---|
[1] | 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 |
---|
[1053] | 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 |
---|
[72] | 228 | IF ( ALLOCATED( precipitation_amount ) ) THEN |
---|
| 229 | WRITE ( 14 ) 'precipitation_amount'; WRITE ( 14 ) precipitation_amount |
---|
| 230 | ENDIF |
---|
| 231 | IF ( ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[1320] | 232 | WRITE ( 14 ) 'precipitation_rate_a'; WRITE ( 14 ) & |
---|
[72] | 233 | precipitation_rate_av |
---|
| 234 | ENDIF |
---|
[1] | 235 | WRITE ( 14 ) 'pt '; WRITE ( 14 ) pt |
---|
| 236 | IF ( ALLOCATED( pt_av ) ) THEN |
---|
| 237 | WRITE ( 14 ) 'pt_av '; WRITE ( 14 ) pt_av |
---|
| 238 | ENDIF |
---|
[75] | 239 | IF ( humidity .OR. passive_scalar ) THEN |
---|
[1] | 240 | WRITE ( 14 ) 'q '; WRITE ( 14 ) q |
---|
| 241 | IF ( ALLOCATED( q_av ) ) THEN |
---|
| 242 | WRITE ( 14 ) 'q_av '; WRITE ( 14 ) q_av |
---|
| 243 | ENDIF |
---|
[790] | 244 | IF ( cloud_physics .OR. cloud_droplets ) THEN |
---|
[1359] | 245 | WRITE ( 14 ) 'ql '; WRITE ( 14 ) ql |
---|
[1] | 246 | IF ( ALLOCATED( ql_av ) ) THEN |
---|
| 247 | WRITE ( 14 ) 'ql_av '; WRITE ( 14 ) ql_av |
---|
| 248 | ENDIF |
---|
[1822] | 249 | IF ( .NOT. cloud_droplets ) THEN |
---|
[1359] | 250 | WRITE ( 14 ) 'qc '; WRITE ( 14 ) qc |
---|
[1115] | 251 | IF ( ALLOCATED( qc_av ) ) THEN |
---|
| 252 | WRITE ( 14 ) 'qc_av '; WRITE ( 14 ) qc_av |
---|
[1053] | 253 | ENDIF |
---|
[1822] | 254 | IF ( microphysics_seifert ) THEN |
---|
[1359] | 255 | WRITE ( 14 ) 'nr '; WRITE ( 14 ) nr |
---|
[1115] | 256 | IF ( ALLOCATED( nr_av ) ) THEN |
---|
| 257 | WRITE ( 14 ) 'nr_av '; WRITE ( 14 ) nr_av |
---|
| 258 | ENDIF |
---|
[1359] | 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 |
---|
[1115] | 263 | IF ( ALLOCATED( qr_av ) ) THEN |
---|
| 264 | WRITE ( 14 ) 'qr_av '; WRITE ( 14 ) qr_av |
---|
| 265 | ENDIF |
---|
[1359] | 266 | WRITE ( 14 ) 'qrs '; WRITE ( 14 ) qrs |
---|
| 267 | WRITE ( 14 ) 'qrsws '; WRITE ( 14 ) qrsws |
---|
| 268 | WRITE ( 14 ) 'qrswst '; WRITE ( 14 ) qrswst |
---|
[1053] | 269 | ENDIF |
---|
| 270 | ENDIF |
---|
[1] | 271 | ENDIF |
---|
[1359] | 272 | WRITE ( 14 ) 'qs '; WRITE ( 14 ) qs |
---|
| 273 | WRITE ( 14 ) 'qsws '; WRITE ( 14 ) qsws |
---|
[354] | 274 | IF ( ALLOCATED( qsws_av ) ) THEN |
---|
| 275 | WRITE ( 14 ) 'qsws_av '; WRITE ( 14 ) qsws_av |
---|
| 276 | ENDIF |
---|
[19] | 277 | WRITE ( 14 ) 'qswst '; WRITE ( 14 ) qswst |
---|
[1] | 278 | ENDIF |
---|
[1551] | 279 | IF ( land_surface ) THEN |
---|
| 280 | IF ( ALLOCATED( qsws_eb_av ) ) THEN |
---|
| 281 | WRITE ( 14 ) 'qsws_eb_av '; WRITE ( 14 ) qsws_eb_av |
---|
| 282 | ENDIF |
---|
| 283 | IF ( ALLOCATED( qsws_liq_eb_av ) ) THEN |
---|
| 284 | WRITE ( 14 ) 'qsws_liq_eb_av '; WRITE ( 14 ) qsws_liq_eb_av |
---|
| 285 | ENDIF |
---|
| 286 | IF ( ALLOCATED( qsws_soil_eb_av ) ) THEN |
---|
| 287 | WRITE ( 14 ) 'qsws_soil_eb_av '; WRITE ( 14 ) qsws_soil_eb_av |
---|
| 288 | ENDIF |
---|
| 289 | IF ( ALLOCATED( qsws_veg_eb_av ) ) THEN |
---|
| 290 | WRITE ( 14 ) 'qsws_veg_eb_av '; WRITE ( 14 ) qsws_veg_eb_av |
---|
| 291 | ENDIF |
---|
| 292 | ENDIF |
---|
[1585] | 293 | IF ( ALLOCATED( rad_net ) ) THEN |
---|
| 294 | WRITE ( 14 ) 'rad_net '; WRITE ( 14 ) rad_net |
---|
| 295 | ENDIF |
---|
[1551] | 296 | IF ( radiation ) THEN |
---|
| 297 | IF ( ALLOCATED( rad_net_av ) ) THEN |
---|
| 298 | WRITE ( 14 ) 'rad_net_av '; WRITE ( 14 ) rad_net_av |
---|
| 299 | ENDIF |
---|
[1585] | 300 | IF ( ALLOCATED( rad_lw_in ) ) THEN |
---|
| 301 | WRITE ( 14 ) 'rad_lw_in '; WRITE ( 14 ) rad_lw_in |
---|
| 302 | ENDIF |
---|
| 303 | IF ( ALLOCATED( rad_lw_in_av ) ) THEN |
---|
| 304 | WRITE ( 14 ) 'rad_lw_in_av '; WRITE ( 14 ) rad_lw_in_av |
---|
| 305 | ENDIF |
---|
| 306 | IF ( ALLOCATED( rad_lw_out ) ) THEN |
---|
| 307 | WRITE ( 14 ) 'rad_lw_out '; WRITE ( 14 ) rad_lw_out |
---|
| 308 | ENDIF |
---|
| 309 | IF ( ALLOCATED( rad_lw_out_av ) ) THEN |
---|
| 310 | WRITE ( 14 ) 'rad_lw_out_av '; WRITE ( 14 ) rad_lw_out_av |
---|
| 311 | ENDIF |
---|
[1709] | 312 | IF ( ALLOCATED( rad_lw_out_change_0 ) ) THEN |
---|
| 313 | WRITE ( 14 ) 'rad_lw_out_change_0 ' |
---|
| 314 | WRITE ( 14 ) rad_lw_out_change_0 |
---|
| 315 | ENDIF |
---|
[1691] | 316 | IF ( ALLOCATED( rad_lw_cs_hr ) ) THEN |
---|
| 317 | WRITE ( 14 ) 'rad_lw_cs_hr '; WRITE ( 14 ) rad_lw_cs_hr |
---|
| 318 | ENDIF |
---|
| 319 | IF ( ALLOCATED( rad_lw_cs_hr_av ) ) THEN |
---|
| 320 | WRITE ( 14 ) 'rad_lw_cs_hr_av '; WRITE ( 14 ) rad_lw_cs_hr_av |
---|
| 321 | ENDIF |
---|
| 322 | IF ( ALLOCATED( rad_lw_hr ) ) THEN |
---|
| 323 | WRITE ( 14 ) 'rad_lw_hr '; WRITE ( 14 ) rad_lw_hr |
---|
| 324 | ENDIF |
---|
| 325 | IF ( ALLOCATED( rad_lw_hr_av ) ) THEN |
---|
| 326 | WRITE ( 14 ) 'rad_lw_hr_av '; WRITE ( 14 ) rad_lw_hr_av |
---|
| 327 | ENDIF |
---|
[1585] | 328 | IF ( ALLOCATED( rad_sw_in ) ) THEN |
---|
| 329 | WRITE ( 14 ) 'rad_sw_in '; WRITE ( 14 ) rad_sw_in |
---|
| 330 | ENDIF |
---|
[1551] | 331 | IF ( ALLOCATED( rad_sw_in_av ) ) THEN |
---|
[1585] | 332 | WRITE ( 14 ) 'rad_sw_in_av '; WRITE ( 14 ) rad_sw_in_av |
---|
[1551] | 333 | ENDIF |
---|
[1585] | 334 | IF ( ALLOCATED( rad_sw_out ) ) THEN |
---|
| 335 | WRITE ( 14 ) 'rad_sw_out '; WRITE ( 14 ) rad_sw_out |
---|
| 336 | ENDIF |
---|
| 337 | IF ( ALLOCATED( rad_sw_out_av ) ) THEN |
---|
| 338 | WRITE ( 14 ) 'rad_sw_out_av '; WRITE ( 14 ) rad_sw_out_av |
---|
| 339 | ENDIF |
---|
[1691] | 340 | IF ( ALLOCATED( rad_sw_cs_hr ) ) THEN |
---|
| 341 | WRITE ( 14 ) 'rad_sw_cs_hr '; WRITE ( 14 ) rad_sw_cs_hr |
---|
| 342 | ENDIF |
---|
| 343 | IF ( ALLOCATED( rad_sw_cs_hr_av ) ) THEN |
---|
| 344 | WRITE ( 14 ) 'rad_sw_cs_hr_av '; WRITE ( 14 ) rad_sw_cs_hr_av |
---|
| 345 | ENDIF |
---|
| 346 | IF ( ALLOCATED( rad_sw_hr ) ) THEN |
---|
| 347 | WRITE ( 14 ) 'rad_sw_hr '; WRITE ( 14 ) rad_sw_hr |
---|
| 348 | ENDIF |
---|
| 349 | IF ( ALLOCATED( rad_sw_hr_av ) ) THEN |
---|
| 350 | WRITE ( 14 ) 'rad_sw_hr_av '; WRITE ( 14 ) rad_sw_hr_av |
---|
| 351 | ENDIF |
---|
[1551] | 352 | ENDIF |
---|
[94] | 353 | IF ( ocean ) THEN |
---|
[96] | 354 | IF ( ALLOCATED( rho_av ) ) THEN |
---|
| 355 | WRITE ( 14 ) 'rho_av '; WRITE ( 14 ) rho_av |
---|
| 356 | ENDIF |
---|
[94] | 357 | WRITE ( 14 ) 'sa '; WRITE ( 14 ) sa |
---|
[96] | 358 | IF ( ALLOCATED( sa_av ) ) THEN |
---|
| 359 | WRITE ( 14 ) 'sa_av '; WRITE ( 14 ) sa_av |
---|
| 360 | ENDIF |
---|
[95] | 361 | WRITE ( 14 ) 'saswsb '; WRITE ( 14 ) saswsb |
---|
[94] | 362 | WRITE ( 14 ) 'saswst '; WRITE ( 14 ) saswst |
---|
| 363 | ENDIF |
---|
[1551] | 364 | IF ( land_surface ) THEN |
---|
| 365 | WRITE ( 14 ) 't_soil '; WRITE ( 14 ) t_soil |
---|
| 366 | IF ( ALLOCATED( t_soil_av ) ) THEN |
---|
| 367 | WRITE ( 14 ) 't_soil_av '; WRITE ( 14 ) t_soil_av |
---|
| 368 | ENDIF |
---|
| 369 | ENDIF |
---|
[1] | 370 | IF ( ALLOCATED( ql_c_av ) ) THEN |
---|
| 371 | WRITE ( 14 ) 'ql_c_av '; WRITE ( 14 ) ql_c_av |
---|
| 372 | ENDIF |
---|
| 373 | IF ( ALLOCATED( ql_v_av ) ) THEN |
---|
| 374 | WRITE ( 14 ) 'ql_v_av '; WRITE ( 14 ) ql_v_av |
---|
| 375 | ENDIF |
---|
| 376 | IF ( ALLOCATED( ql_vp_av ) ) THEN |
---|
| 377 | WRITE ( 14 ) 'ql_vp_av '; WRITE ( 14 ) ql_vp_av |
---|
| 378 | ENDIF |
---|
| 379 | IF ( ALLOCATED( qv_av ) ) THEN |
---|
| 380 | WRITE ( 14 ) 'qv_av '; WRITE ( 14 ) qv_av |
---|
| 381 | ENDIF |
---|
| 382 | WRITE ( 14 ) 'random_iv '; WRITE ( 14 ) random_iv |
---|
| 383 | WRITE ( 14 ) random_iy |
---|
[1400] | 384 | IF ( ALLOCATED( seq_random_array ) ) THEN |
---|
| 385 | WRITE ( 14 ) 'seq_random_array '; WRITE ( 14 ) id_random_array |
---|
| 386 | WRITE ( 14 ) seq_random_array |
---|
| 387 | ENDIF |
---|
[51] | 388 | IF ( topography /= 'flat' ) THEN |
---|
| 389 | WRITE ( 14 ) 'rif_wall '; WRITE ( 14 ) rif_wall |
---|
| 390 | ENDIF |
---|
[1] | 391 | IF ( ALLOCATED( s_av ) ) THEN |
---|
| 392 | WRITE ( 14 ) 's_av '; WRITE ( 14 ) s_av |
---|
| 393 | ENDIF |
---|
| 394 | WRITE ( 14 ) 'shf '; WRITE ( 14 ) shf |
---|
[354] | 395 | IF ( ALLOCATED( shf_av ) ) THEN |
---|
| 396 | WRITE ( 14 ) 'shf_av '; WRITE ( 14 ) shf_av |
---|
| 397 | ENDIF |
---|
[1551] | 398 | IF ( land_surface ) THEN |
---|
| 399 | IF ( ALLOCATED( shf_eb_av ) ) THEN |
---|
| 400 | WRITE ( 14 ) 'shf_eb_av '; WRITE ( 14 ) shf_eb_av |
---|
| 401 | ENDIF |
---|
| 402 | ENDIF |
---|
[143] | 403 | IF ( ALLOCATED( spectrum_x ) ) THEN |
---|
| 404 | WRITE ( 14 ) 'spectrum_x '; WRITE ( 14 ) spectrum_x |
---|
| 405 | WRITE ( 14 ) 'spectrum_y '; WRITE ( 14 ) spectrum_y |
---|
| 406 | ENDIF |
---|
[1] | 407 | WRITE ( 14 ) 'ts '; WRITE ( 14 ) ts |
---|
| 408 | IF ( ALLOCATED( ts_av ) ) THEN |
---|
| 409 | WRITE ( 14 ) 'ts_av '; WRITE ( 14 ) ts_av |
---|
| 410 | ENDIF |
---|
[19] | 411 | WRITE ( 14 ) 'tswst '; WRITE ( 14 ) tswst |
---|
[1] | 412 | WRITE ( 14 ) 'u '; WRITE ( 14 ) u |
---|
| 413 | IF ( ALLOCATED( u_av ) ) THEN |
---|
| 414 | WRITE ( 14 ) 'u_av '; WRITE ( 14 ) u_av |
---|
| 415 | ENDIF |
---|
[73] | 416 | IF ( ALLOCATED( u_m_l ) ) THEN |
---|
| 417 | WRITE ( 14 ) 'u_m_l '; WRITE ( 14 ) u_m_l |
---|
| 418 | ENDIF |
---|
| 419 | IF ( ALLOCATED( u_m_n ) ) THEN |
---|
| 420 | WRITE ( 14 ) 'u_m_n '; WRITE ( 14 ) u_m_n |
---|
| 421 | ENDIF |
---|
| 422 | IF ( ALLOCATED( u_m_r ) ) THEN |
---|
| 423 | WRITE ( 14 ) 'u_m_r '; WRITE ( 14 ) u_m_r |
---|
| 424 | ENDIF |
---|
| 425 | IF ( ALLOCATED( u_m_s ) ) THEN |
---|
| 426 | WRITE ( 14 ) 'u_m_s '; WRITE ( 14 ) u_m_s |
---|
| 427 | ENDIF |
---|
[1] | 428 | WRITE ( 14 ) 'us '; WRITE ( 14 ) us |
---|
| 429 | WRITE ( 14 ) 'usws '; WRITE ( 14 ) usws |
---|
[102] | 430 | WRITE ( 14 ) 'uswst '; WRITE ( 14 ) uswst |
---|
[1] | 431 | IF ( ALLOCATED( us_av ) ) THEN |
---|
| 432 | WRITE ( 14 ) 'us_av '; WRITE ( 14 ) us_av |
---|
| 433 | ENDIF |
---|
| 434 | WRITE ( 14 ) 'v '; WRITE ( 14 ) v |
---|
| 435 | IF ( ALLOCATED( v_av ) ) THEN |
---|
| 436 | WRITE ( 14 ) 'v_av '; WRITE ( 14 ) v_av |
---|
| 437 | ENDIF |
---|
[73] | 438 | IF ( ALLOCATED( v_m_l ) ) THEN |
---|
| 439 | WRITE ( 14 ) 'v_m_l '; WRITE ( 14 ) v_m_l |
---|
| 440 | ENDIF |
---|
| 441 | IF ( ALLOCATED( v_m_n ) ) THEN |
---|
| 442 | WRITE ( 14 ) 'v_m_n '; WRITE ( 14 ) v_m_n |
---|
| 443 | ENDIF |
---|
| 444 | IF ( ALLOCATED( v_m_r ) ) THEN |
---|
| 445 | WRITE ( 14 ) 'v_m_r '; WRITE ( 14 ) v_m_r |
---|
| 446 | ENDIF |
---|
| 447 | IF ( ALLOCATED( v_m_s ) ) THEN |
---|
| 448 | WRITE ( 14 ) 'v_m_s '; WRITE ( 14 ) v_m_s |
---|
| 449 | ENDIF |
---|
[75] | 450 | IF ( humidity ) THEN |
---|
[1] | 451 | WRITE ( 14 ) 'vpt '; WRITE ( 14 ) vpt |
---|
| 452 | IF ( ALLOCATED( vpt_av ) ) THEN |
---|
| 453 | WRITE ( 14 ) 'vpt_av '; WRITE ( 14 ) vpt_av |
---|
| 454 | ENDIF |
---|
| 455 | ENDIF |
---|
| 456 | WRITE ( 14 ) 'vsws '; WRITE ( 14 ) vsws |
---|
[102] | 457 | WRITE ( 14 ) 'vswst '; WRITE ( 14 ) vswst |
---|
[1] | 458 | WRITE ( 14 ) 'w '; WRITE ( 14 ) w |
---|
| 459 | IF ( ALLOCATED( w_av ) ) THEN |
---|
| 460 | WRITE ( 14 ) 'w_av '; WRITE ( 14 ) w_av |
---|
| 461 | ENDIF |
---|
[73] | 462 | IF ( ALLOCATED( w_m_l ) ) THEN |
---|
| 463 | WRITE ( 14 ) 'w_m_l '; WRITE ( 14 ) w_m_l |
---|
| 464 | ENDIF |
---|
| 465 | IF ( ALLOCATED( w_m_n ) ) THEN |
---|
| 466 | WRITE ( 14 ) 'w_m_n '; WRITE ( 14 ) w_m_n |
---|
| 467 | ENDIF |
---|
| 468 | IF ( ALLOCATED( w_m_r ) ) THEN |
---|
| 469 | WRITE ( 14 ) 'w_m_r '; WRITE ( 14 ) w_m_r |
---|
| 470 | ENDIF |
---|
| 471 | IF ( ALLOCATED( w_m_s ) ) THEN |
---|
| 472 | WRITE ( 14 ) 'w_m_s '; WRITE ( 14 ) w_m_s |
---|
| 473 | ENDIF |
---|
[1] | 474 | WRITE ( 14 ) 'z0 '; WRITE ( 14 ) z0 |
---|
[72] | 475 | IF ( ALLOCATED( z0_av ) ) THEN |
---|
| 476 | WRITE ( 14 ) 'z0_av '; WRITE ( 14 ) z0_av |
---|
| 477 | ENDIF |
---|
[978] | 478 | WRITE ( 14 ) 'z0h '; WRITE ( 14 ) z0h |
---|
| 479 | IF ( ALLOCATED( z0h_av ) ) THEN |
---|
| 480 | WRITE ( 14 ) 'z0h_av '; WRITE ( 14 ) z0h_av |
---|
| 481 | ENDIF |
---|
[1788] | 482 | WRITE ( 14 ) 'z0q '; WRITE ( 14 ) z0q |
---|
| 483 | IF ( ALLOCATED( z0q_av ) ) THEN |
---|
| 484 | WRITE ( 14 ) 'z0q_av '; WRITE ( 14 ) z0q_av |
---|
| 485 | ENDIF |
---|
[1] | 486 | |
---|
| 487 | ! |
---|
| 488 | !-- Write end label. Unit 14 is closed in the main program. |
---|
| 489 | WRITE ( 14 ) '*** end *** ' |
---|
| 490 | |
---|
| 491 | END SUBROUTINE write_3d_binary |
---|
[1320] | 492 | |
---|