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