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