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