[1682] | 1 | !> @file read_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 | ! |
---|
[257] | 19 | ! Current revisions: |
---|
[1] | 20 | ! ----------------- |
---|
[1834] | 21 | ! |
---|
[1851] | 22 | ! |
---|
[1321] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: read_3d_binary.f90 1852 2016-04-08 14:07:36Z hoffmann $ |
---|
| 26 | ! |
---|
[1852] | 27 | ! 1849 2016-04-08 11:33:18Z hoffmann |
---|
[1851] | 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 | ! |
---|
[1809] | 33 | ! 1808 2016-04-05 19:44:00Z raasch |
---|
| 34 | ! test output removed |
---|
| 35 | ! |
---|
[1789] | 36 | ! 1788 2016-03-10 11:01:04Z maronga |
---|
| 37 | ! Added z0q and z0q_av |
---|
| 38 | ! |
---|
[1758] | 39 | ! 1757 2016-02-22 15:49:32Z maronga |
---|
| 40 | ! Bugfix in allocation of radiative heating rates |
---|
| 41 | ! |
---|
[1710] | 42 | ! 1709 2015-11-04 14:47:01Z maronga |
---|
| 43 | ! Added rad_lw_out_change_0, increased binary_version |
---|
| 44 | ! |
---|
[1692] | 45 | ! 1691 2015-10-26 16:17:44Z maronga |
---|
| 46 | ! Added output of radiative heating rates and Obukhov length. Removed output of |
---|
| 47 | ! rif. |
---|
| 48 | ! |
---|
[1683] | 49 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 50 | ! Code annotations made doxygen readable |
---|
| 51 | ! |
---|
[1586] | 52 | ! 1585 2015-04-30 07:05:52Z maronga |
---|
| 53 | ! Adapted for RRTMG |
---|
| 54 | ! |
---|
[1552] | 55 | ! 1551 2015-03-03 14:18:16Z maronga |
---|
| 56 | ! Added support for binary input of land surface and radiation model data. In the |
---|
| 57 | ! course of this work, new temporary arrays tmp_3d_soil1, tmp_3d_soil2 were |
---|
| 58 | ! required. |
---|
| 59 | ! |
---|
[1469] | 60 | ! 1468 2014-09-24 14:06:57Z maronga |
---|
| 61 | ! Adapted for use on up to 6-digit processor cores |
---|
| 62 | ! |
---|
[1401] | 63 | ! 1400 2014-05-09 14:03:54Z knoop |
---|
| 64 | ! reading of arrays for random_generator_parallel added |
---|
| 65 | ! |
---|
[1321] | 66 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 67 | ! ONLY-attribute added to USE-statements, |
---|
| 68 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 69 | ! kinds are defined in new module kinds, |
---|
| 70 | ! old module precision_kind is removed, |
---|
| 71 | ! revision history before 2012 removed, |
---|
| 72 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 73 | ! all variable declaration statements |
---|
[226] | 74 | ! |
---|
[1319] | 75 | ! 1318 2014-03-17 13:35:16Z raasch |
---|
| 76 | ! module interfaces removed |
---|
| 77 | ! |
---|
[1116] | 78 | ! 1115 2013-03-26 18:16:16Z hoffmann |
---|
| 79 | ! unused variables removed |
---|
| 80 | ! |
---|
[1054] | 81 | ! 1053 2012-11-13 17:11:03Z hoffmann |
---|
| 82 | ! necessary expansions according to the two new prognostic equations (nr, qr) |
---|
| 83 | ! of the two-moment cloud physics scheme: |
---|
| 84 | ! +prr, prr_av, *, *_av, *s, *sws, *swst |
---|
| 85 | ! |
---|
[1037] | 86 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 87 | ! code put under GPL (PALM 3.9) |
---|
| 88 | ! |
---|
[1002] | 89 | ! 1001 2012-09-13 14:08:46Z raasch |
---|
| 90 | ! all actions concerning leapfrog scheme removed |
---|
| 91 | ! |
---|
[979] | 92 | ! 978 2012-08-09 08:28:32Z fricke |
---|
| 93 | ! +z0h, z0h_av |
---|
| 94 | ! |
---|
[1] | 95 | ! Revision 1.1 2004/04/30 12:47:27 raasch |
---|
| 96 | ! Initial revision |
---|
| 97 | ! |
---|
| 98 | ! |
---|
| 99 | ! Description: |
---|
| 100 | ! ------------ |
---|
[1682] | 101 | !> Binary input of variables and arrays from restart file |
---|
[1] | 102 | !------------------------------------------------------------------------------! |
---|
[1682] | 103 | SUBROUTINE read_3d_binary |
---|
| 104 | |
---|
[1] | 105 | |
---|
[1320] | 106 | USE arrays_3d, & |
---|
[1849] | 107 | ONLY: e, kh, km, ol, p, pt, q, ql, qc, nr, nrs, nrsws, nrswst, & |
---|
| 108 | prr, precipitation_amount, qr, & |
---|
[1691] | 109 | qrs, qrsws, qrswst, qs, qsws, qswst, sa, saswsb, saswst, & |
---|
[1320] | 110 | rif_wall, shf, ts, tswst, u, u_m_l, u_m_n, u_m_r, u_m_s, us, & |
---|
| 111 | usws, uswst, v, v_m_l, v_m_n, v_m_r, v_m_s, vpt, vsws, vswst, & |
---|
[1788] | 112 | w, w_m_l, w_m_n, w_m_r, w_m_s, z0, z0h, z0q |
---|
[1320] | 113 | |
---|
[1] | 114 | USE averaging |
---|
[1320] | 115 | |
---|
| 116 | USE control_parameters, & |
---|
[1359] | 117 | ONLY: iran, message_string, outflow_l, outflow_n, outflow_r, outflow_s |
---|
[1320] | 118 | |
---|
| 119 | USE cpulog, & |
---|
| 120 | ONLY: cpu_log, log_point_s |
---|
| 121 | |
---|
| 122 | USE indices, & |
---|
| 123 | ONLY: nbgp, nx, nxl, nxlg, nxr, nxrg, nx_on_file, ny, nys, nysg, nyn, & |
---|
| 124 | nyng, ny_on_file, nzb, nzt |
---|
| 125 | |
---|
| 126 | USE kinds |
---|
| 127 | |
---|
[1551] | 128 | USE land_surface_model_mod, & |
---|
| 129 | ONLY: c_liq_av, c_soil_av, c_veg, c_veg_av, ghf_eb_av, lai_av, & |
---|
| 130 | qsws_eb_av, qsws_liq_eb_av, qsws_soil_eb_av, qsws_veg_eb_av, & |
---|
| 131 | land_surface, m_liq_eb, m_liq_eb_av, m_soil, m_soil_av, & |
---|
| 132 | nzb_soil, nzt_soil, shf_eb_av, t_soil, t_soil_av |
---|
| 133 | |
---|
[1320] | 134 | USE particle_attributes, & |
---|
| 135 | ONLY: iran_part |
---|
| 136 | |
---|
[1] | 137 | USE pegrid |
---|
| 138 | |
---|
[1551] | 139 | USE radiation_model_mod, & |
---|
[1585] | 140 | ONLY: rad_net, rad_net_av, rad_lw_in, rad_lw_in_av, rad_lw_out, & |
---|
[1691] | 141 | rad_lw_cs_hr, rad_lw_cs_hr_av, rad_lw_hr, rad_lw_hr_av, & |
---|
[1709] | 142 | rad_lw_out_av, rad_lw_out_change_0, rad_sw_in, rad_sw_in_av, & |
---|
| 143 | rad_sw_out, rad_sw_out_av, rad_sw_cs_hr, rad_sw_cs_hr_av, & |
---|
| 144 | rad_sw_hr, rad_sw_hr_av |
---|
[1551] | 145 | |
---|
[1320] | 146 | USE random_function_mod, & |
---|
| 147 | ONLY: random_iv, random_iy |
---|
| 148 | |
---|
[1400] | 149 | USE random_generator_parallel, & |
---|
| 150 | ONLY: id_random_array, seq_random_array |
---|
| 151 | |
---|
[1833] | 152 | USE spectra_mod, & |
---|
[1320] | 153 | ONLY: spectrum_x, spectrum_y |
---|
| 154 | |
---|
| 155 | |
---|
[1] | 156 | IMPLICIT NONE |
---|
| 157 | |
---|
[1468] | 158 | CHARACTER (LEN=7) :: myid_char_save |
---|
[1320] | 159 | CHARACTER (LEN=10) :: binary_version |
---|
| 160 | CHARACTER (LEN=10) :: version_on_file |
---|
[1] | 161 | CHARACTER (LEN=20) :: field_chr |
---|
| 162 | |
---|
[1682] | 163 | INTEGER(iwp) :: files_to_be_opened !< |
---|
| 164 | INTEGER(iwp) :: i !< |
---|
| 165 | INTEGER(iwp) :: j !< |
---|
| 166 | INTEGER(iwp) :: k !< |
---|
| 167 | INTEGER(iwp) :: myid_on_file !< |
---|
| 168 | INTEGER(iwp) :: numprocs_on_file !< |
---|
| 169 | INTEGER(iwp) :: nxlc !< |
---|
| 170 | INTEGER(iwp) :: nxlf !< |
---|
| 171 | INTEGER(iwp) :: nxlpr !< |
---|
| 172 | INTEGER(iwp) :: nxl_on_file !< |
---|
| 173 | INTEGER(iwp) :: nxrc !< |
---|
| 174 | INTEGER(iwp) :: nxrf !< |
---|
| 175 | INTEGER(iwp) :: nxrpr !< |
---|
| 176 | INTEGER(iwp) :: nxr_on_file !< |
---|
| 177 | INTEGER(iwp) :: nync !< |
---|
| 178 | INTEGER(iwp) :: nynf !< |
---|
| 179 | INTEGER(iwp) :: nynpr !< |
---|
| 180 | INTEGER(iwp) :: nyn_on_file !< |
---|
| 181 | INTEGER(iwp) :: nysc !< |
---|
| 182 | INTEGER(iwp) :: nysf !< |
---|
| 183 | INTEGER(iwp) :: nyspr !< |
---|
| 184 | INTEGER(iwp) :: nys_on_file !< |
---|
| 185 | INTEGER(iwp) :: nzb_on_file !< |
---|
| 186 | INTEGER(iwp) :: nzt_on_file !< |
---|
| 187 | INTEGER(iwp) :: offset_x !< |
---|
| 188 | INTEGER(iwp) :: offset_y !< |
---|
| 189 | INTEGER(iwp) :: shift_x !< |
---|
| 190 | INTEGER(iwp) :: shift_y !< |
---|
[1] | 191 | |
---|
[1682] | 192 | INTEGER(iwp), DIMENSION(numprocs_previous_run) :: file_list !< |
---|
| 193 | INTEGER(iwp), DIMENSION(numprocs_previous_run) :: overlap_count !< |
---|
[146] | 194 | |
---|
[1682] | 195 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxlfa !< |
---|
| 196 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nxrfa !< |
---|
| 197 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nynfa !< |
---|
| 198 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: nysfa !< |
---|
| 199 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_xa !< |
---|
| 200 | INTEGER(iwp), DIMENSION(numprocs_previous_run,1000) :: offset_ya !< |
---|
[216] | 201 | |
---|
[1320] | 202 | REAL(wp) :: rdummy |
---|
[146] | 203 | |
---|
[1682] | 204 | REAL(wp), DIMENSION(:,:), ALLOCATABLE :: tmp_2d !< temporary array for storing 2D data |
---|
| 205 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d !< temporary array for storing 3D data |
---|
| 206 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d_soil1!< temporary array for storing 3D soil model data |
---|
| 207 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d_soil2!< temporary array for storing 3D soil model data |
---|
| 208 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwul !< |
---|
| 209 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwun !< |
---|
| 210 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwur !< |
---|
| 211 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwus !< |
---|
| 212 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvl !< |
---|
| 213 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvn !< |
---|
| 214 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvr !< |
---|
| 215 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwvs !< |
---|
| 216 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwl !< |
---|
| 217 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwn !< |
---|
| 218 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwwr !< |
---|
| 219 | REAL(wp), DIMENSION(:,:,:), ALLOCATABLE :: tmp_3dwws !< |
---|
[146] | 220 | |
---|
[1682] | 221 | REAL(wp), DIMENSION(:,:,:,:), ALLOCATABLE :: tmp_4d !< |
---|
[1320] | 222 | |
---|
| 223 | |
---|
[1] | 224 | ! |
---|
[146] | 225 | !-- Read data from previous model run. |
---|
[1] | 226 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'start' ) |
---|
| 227 | |
---|
| 228 | ! |
---|
[146] | 229 | !-- Check which of the restart files contain data needed for the subdomain |
---|
| 230 | !-- of this PE |
---|
| 231 | files_to_be_opened = 0 |
---|
[143] | 232 | |
---|
[146] | 233 | DO i = 1, numprocs_previous_run |
---|
[216] | 234 | ! |
---|
| 235 | !-- Store array bounds of the previous run ("pr") in temporary scalars |
---|
[147] | 236 | nxlpr = hor_index_bounds_previous_run(1,i-1) |
---|
| 237 | nxrpr = hor_index_bounds_previous_run(2,i-1) |
---|
| 238 | nyspr = hor_index_bounds_previous_run(3,i-1) |
---|
| 239 | nynpr = hor_index_bounds_previous_run(4,i-1) |
---|
| 240 | |
---|
[143] | 241 | ! |
---|
[147] | 242 | !-- Determine the offsets. They may be non-zero in case that the total domain |
---|
| 243 | !-- on file is smaller than the current total domain. |
---|
| 244 | offset_x = ( nxl / ( nx_on_file + 1 ) ) * ( nx_on_file + 1 ) |
---|
| 245 | offset_y = ( nys / ( ny_on_file + 1 ) ) * ( ny_on_file + 1 ) |
---|
| 246 | |
---|
| 247 | ! |
---|
[216] | 248 | !-- Start with this offset and then check, if the subdomain on file |
---|
| 249 | !-- matches another time(s) in the current subdomain by shifting it |
---|
| 250 | !-- for nx_on_file+1, ny_on_file+1 respectively |
---|
[667] | 251 | |
---|
[216] | 252 | shift_y = 0 |
---|
[667] | 253 | j = 0 |
---|
| 254 | DO WHILE ( nyspr+shift_y <= nyn-offset_y ) |
---|
| 255 | |
---|
| 256 | IF ( nynpr+shift_y >= nys-offset_y ) THEN |
---|
[146] | 257 | |
---|
[667] | 258 | shift_x = 0 |
---|
| 259 | DO WHILE ( nxlpr+shift_x <= nxr-offset_x ) |
---|
| 260 | |
---|
| 261 | IF ( nxrpr+shift_x >= nxl-offset_x ) THEN |
---|
| 262 | j = j +1 |
---|
| 263 | IF ( j > 1000 ) THEN |
---|
[147] | 264 | ! |
---|
[667] | 265 | !-- Array bound exceeded |
---|
| 266 | message_string = 'data from subdomain of previous' // & |
---|
| 267 | ' run mapped more than 1000 times' |
---|
| 268 | CALL message( 'read_3d_binary', 'PA0284', 2, 2, -1, & |
---|
| 269 | 6, 1 ) |
---|
| 270 | ENDIF |
---|
[147] | 271 | |
---|
[667] | 272 | IF ( j == 1 ) THEN |
---|
| 273 | files_to_be_opened = files_to_be_opened + 1 |
---|
| 274 | file_list(files_to_be_opened) = i-1 |
---|
| 275 | ENDIF |
---|
| 276 | |
---|
| 277 | offset_xa(files_to_be_opened,j) = offset_x + shift_x |
---|
| 278 | offset_ya(files_to_be_opened,j) = offset_y + shift_y |
---|
[147] | 279 | ! |
---|
[667] | 280 | !-- Index bounds of overlapping data |
---|
| 281 | nxlfa(files_to_be_opened,j) = MAX( nxl-offset_x-shift_x, nxlpr ) |
---|
| 282 | nxrfa(files_to_be_opened,j) = MIN( nxr-offset_x-shift_x, nxrpr ) |
---|
| 283 | nysfa(files_to_be_opened,j) = MAX( nys-offset_y-shift_y, nyspr ) |
---|
| 284 | nynfa(files_to_be_opened,j) = MIN( nyn-offset_y-shift_y, nynpr ) |
---|
[147] | 285 | |
---|
[667] | 286 | ENDIF |
---|
[147] | 287 | |
---|
[667] | 288 | shift_x = shift_x + ( nx_on_file + 1 ) |
---|
| 289 | ENDDO |
---|
| 290 | |
---|
| 291 | ENDIF |
---|
| 292 | |
---|
| 293 | shift_y = shift_y + ( ny_on_file + 1 ) |
---|
[216] | 294 | ENDDO |
---|
[667] | 295 | |
---|
[216] | 296 | IF ( j > 0 ) overlap_count(files_to_be_opened) = j |
---|
[667] | 297 | |
---|
[146] | 298 | ENDDO |
---|
[667] | 299 | |
---|
[147] | 300 | ! |
---|
| 301 | !-- Save the id-string of the current process, since myid_char may now be used |
---|
| 302 | !-- to open files created by PEs with other id. |
---|
[1808] | 303 | myid_char_save = myid_char |
---|
[146] | 304 | |
---|
| 305 | IF ( files_to_be_opened /= 1 .OR. numprocs /= numprocs_previous_run ) & |
---|
| 306 | THEN |
---|
[274] | 307 | WRITE( message_string, * ) 'number of PEs or virtual PE-grid changed ', & |
---|
| 308 | 'in restart run& PE', myid, ' will read from files ', & |
---|
| 309 | file_list(1:files_to_be_opened) |
---|
[257] | 310 | CALL message( 'read_3d_binary', 'PA0285', 0, 0, 0, 6, 0 ) |
---|
[1] | 311 | ENDIF |
---|
| 312 | |
---|
| 313 | ! |
---|
[146] | 314 | !-- Read data from all restart files determined above |
---|
| 315 | DO i = 1, files_to_be_opened |
---|
[1] | 316 | |
---|
[146] | 317 | j = file_list(i) |
---|
| 318 | ! |
---|
| 319 | !-- Set the filename (underscore followed by four digit processor id) |
---|
[1468] | 320 | WRITE (myid_char,'(''_'',I6.6)') j |
---|
[1] | 321 | |
---|
[146] | 322 | ! |
---|
[1468] | 323 | !-- Open the restart file. If this file has been created by PE0 (_000000), |
---|
[146] | 324 | !-- the global variables at the beginning of the file have to be skipped |
---|
| 325 | !-- first. |
---|
| 326 | CALL check_open( 13 ) |
---|
| 327 | IF ( j == 0 ) CALL skip_var_list |
---|
[1] | 328 | |
---|
[146] | 329 | ! |
---|
| 330 | !-- First compare the version numbers |
---|
| 331 | READ ( 13 ) version_on_file |
---|
[1788] | 332 | binary_version = '4.3' |
---|
[146] | 333 | IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN |
---|
[274] | 334 | WRITE( message_string, * ) 'version mismatch concerning data ', & |
---|
| 335 | 'from prior run', & |
---|
| 336 | '&version on file = "', TRIM( version_on_file ), '"', & |
---|
| 337 | '&version in program = "', TRIM( binary_version ), '"' |
---|
[257] | 338 | CALL message( 'read_3d_binary', 'PA0286', 1, 2, 0, 6, 0 ) |
---|
[146] | 339 | ENDIF |
---|
| 340 | |
---|
| 341 | ! |
---|
| 342 | !-- Read number of processors, processor-id, and array ranges. |
---|
| 343 | !-- Compare the array ranges with those stored in the index bound array. |
---|
| 344 | READ ( 13 ) numprocs_on_file, myid_on_file, nxl_on_file, nxr_on_file, & |
---|
| 345 | nys_on_file, nyn_on_file, nzb_on_file, nzt_on_file |
---|
| 346 | |
---|
| 347 | IF ( nxl_on_file /= hor_index_bounds_previous_run(1,j) ) THEN |
---|
[274] | 348 | WRITE( message_string, * ) 'problem with index bound nxl on ', & |
---|
| 349 | 'restart file "', myid_char, '"', & |
---|
| 350 | '&nxl = ', nxl_on_file, ' but it should be', & |
---|
| 351 | '&= ', hor_index_bounds_previous_run(1,j), & |
---|
| 352 | '&from the index bound information array' |
---|
[277] | 353 | CALL message( 'read_3d_binary', 'PA0287', 2, 2, -1, 6, 1 ) |
---|
[146] | 354 | ENDIF |
---|
[1] | 355 | |
---|
[146] | 356 | IF ( nxr_on_file /= hor_index_bounds_previous_run(2,j) ) THEN |
---|
[274] | 357 | WRITE( message_string, * ) 'problem with index bound nxr on ', & |
---|
| 358 | 'restart file "', myid_char, '"' , & |
---|
| 359 | '&nxr = ', nxr_on_file, ' but it should be', & |
---|
| 360 | '&= ', hor_index_bounds_previous_run(2,j), & |
---|
| 361 | '&from the index bound information array' |
---|
[277] | 362 | CALL message( 'read_3d_binary', 'PA0288', 2, 2, -1, 6, 1 ) |
---|
[257] | 363 | |
---|
[146] | 364 | ENDIF |
---|
[1] | 365 | |
---|
[146] | 366 | IF ( nys_on_file /= hor_index_bounds_previous_run(3,j) ) THEN |
---|
[274] | 367 | WRITE( message_string, * ) 'problem with index bound nys on ', & |
---|
| 368 | 'restart file "', myid_char, '"', & |
---|
| 369 | '&nys = ', nys_on_file, ' but it should be', & |
---|
| 370 | '&= ', hor_index_bounds_previous_run(3,j), & |
---|
[257] | 371 | '&from the index bound information array' |
---|
[277] | 372 | CALL message( 'read_3d_binary', 'PA0289', 2, 2, -1, 6, 1 ) |
---|
[146] | 373 | ENDIF |
---|
[1] | 374 | |
---|
[146] | 375 | IF ( nyn_on_file /= hor_index_bounds_previous_run(4,j) ) THEN |
---|
[274] | 376 | WRITE( message_string, * ) 'problem with index bound nyn on ', & |
---|
| 377 | 'restart file "', myid_char, '"', & |
---|
| 378 | '&nyn = ', nyn_on_file, ' but it should be', & |
---|
| 379 | '&= ', hor_index_bounds_previous_run(4,j), & |
---|
| 380 | '&from the index bound information array' |
---|
[277] | 381 | CALL message( 'read_3d_binary', 'PA0290', 2, 2, -1, 6, 1 ) |
---|
[146] | 382 | ENDIF |
---|
[1] | 383 | |
---|
[146] | 384 | IF ( nzb_on_file /= nzb ) THEN |
---|
[257] | 385 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
| 386 | '&from prior run on PE ', myid, & |
---|
| 387 | '&nzb on file = ', nzb_on_file, & |
---|
| 388 | '&nzb = ', nzb |
---|
| 389 | CALL message( 'read_3d_binary', 'PA0291', 1, 2, 0, 6, 0 ) |
---|
[146] | 390 | ENDIF |
---|
[1] | 391 | |
---|
[146] | 392 | IF ( nzt_on_file /= nzt ) THEN |
---|
[257] | 393 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
| 394 | '&from prior run on PE ', myid, & |
---|
| 395 | '&nzt on file = ', nzt_on_file, & |
---|
| 396 | '&nzt = ', nzt |
---|
| 397 | CALL message( 'read_3d_binary', 'PA0292', 1, 2, 0, 6, 0 ) |
---|
[146] | 398 | ENDIF |
---|
[1] | 399 | |
---|
| 400 | ! |
---|
[146] | 401 | !-- Allocate temporary arrays sized as the arrays on the restart file |
---|
[1551] | 402 | ALLOCATE( tmp_2d(nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 403 | nxl_on_file-nbgp:nxr_on_file+nbgp), & |
---|
| 404 | tmp_3d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
[667] | 405 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[1] | 406 | |
---|
| 407 | ! |
---|
[1551] | 408 | !-- If the land surface model is used, allocate array for storing soil model |
---|
| 409 | !-- data |
---|
| 410 | IF ( land_surface ) THEN |
---|
| 411 | ALLOCATE( tmp_3d_soil1(nzb_soil:nzt_soil+1, & |
---|
| 412 | nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 413 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
| 414 | ALLOCATE( tmp_3d_soil2(nzb_soil:nzt_soil, & |
---|
| 415 | nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 416 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
| 417 | ENDIF |
---|
| 418 | ! |
---|
[146] | 419 | !-- Read arrays |
---|
| 420 | !-- ATTENTION: If the following read commands have been altered, the |
---|
| 421 | !-- ---------- version number of the variable binary_version must be altered, |
---|
| 422 | !-- too. Furthermore, the output list of arrays in write_3d_binary |
---|
| 423 | !-- must also be altered accordingly. |
---|
| 424 | READ ( 13 ) field_chr |
---|
| 425 | DO WHILE ( TRIM( field_chr ) /= '*** end ***' ) |
---|
[1] | 426 | |
---|
[216] | 427 | ! |
---|
| 428 | !-- Map data on file as often as needed (data are read only for k=1) |
---|
| 429 | DO k = 1, overlap_count(i) |
---|
[1] | 430 | |
---|
[216] | 431 | ! |
---|
| 432 | !-- Get the index range of the subdomain on file which overlap with the |
---|
| 433 | !-- current subdomain |
---|
| 434 | nxlf = nxlfa(i,k) |
---|
| 435 | nxlc = nxlfa(i,k) + offset_xa(i,k) |
---|
| 436 | nxrf = nxrfa(i,k) |
---|
| 437 | nxrc = nxrfa(i,k) + offset_xa(i,k) |
---|
| 438 | nysf = nysfa(i,k) |
---|
| 439 | nysc = nysfa(i,k) + offset_ya(i,k) |
---|
| 440 | nynf = nynfa(i,k) |
---|
| 441 | nync = nynfa(i,k) + offset_ya(i,k) |
---|
| 442 | |
---|
| 443 | |
---|
| 444 | SELECT CASE ( TRIM( field_chr ) ) |
---|
| 445 | |
---|
[1551] | 446 | CASE ( 'c_liq_av' ) |
---|
| 447 | IF ( .NOT. ALLOCATED( c_liq_av ) ) THEN |
---|
| 448 | ALLOCATE( c_liq_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 449 | ENDIF |
---|
| 450 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 451 | c_liq_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 452 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 453 | |
---|
| 454 | CASE ( 'c_soil_av' ) |
---|
| 455 | IF ( .NOT. ALLOCATED( c_soil_av ) ) THEN |
---|
| 456 | ALLOCATE( c_soil_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 457 | ENDIF |
---|
| 458 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 459 | c_soil_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 460 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 461 | |
---|
| 462 | CASE ( 'c_veg_av' ) |
---|
| 463 | IF ( .NOT. ALLOCATED( c_veg_av ) ) THEN |
---|
| 464 | ALLOCATE( c_veg_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 465 | ENDIF |
---|
| 466 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 467 | c_veg_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 468 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 469 | |
---|
[216] | 470 | CASE ( 'e' ) |
---|
| 471 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 472 | e(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 473 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1] | 474 | |
---|
[216] | 475 | CASE ( 'e_av' ) |
---|
| 476 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
[667] | 477 | ALLOCATE( e_av(nzb:nzt+1,nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) ) |
---|
[216] | 478 | ENDIF |
---|
| 479 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 480 | e_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 481 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 482 | |
---|
[1551] | 483 | CASE ( 'ghf_eb_av' ) |
---|
| 484 | IF ( .NOT. ALLOCATED( ghf_eb_av ) ) THEN |
---|
| 485 | ALLOCATE( ghf_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 486 | ENDIF |
---|
| 487 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 488 | ghf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 489 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 490 | |
---|
[216] | 491 | CASE ( 'iran' ) ! matching random numbers is still unresolved |
---|
| 492 | ! issue |
---|
| 493 | IF ( k == 1 ) READ ( 13 ) iran, iran_part |
---|
[146] | 494 | |
---|
[1551] | 495 | CASE ( 'lai_av' ) |
---|
| 496 | IF ( .NOT. ALLOCATED( lai_av ) ) THEN |
---|
| 497 | ALLOCATE( lai_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 498 | ENDIF |
---|
| 499 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 500 | lai_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 501 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 502 | |
---|
[216] | 503 | CASE ( 'kh' ) |
---|
| 504 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 505 | kh(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 506 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 507 | |
---|
[216] | 508 | CASE ( 'km' ) |
---|
| 509 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 510 | km(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 511 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 512 | |
---|
[771] | 513 | CASE ( 'lpt_av' ) |
---|
| 514 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
| 515 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
| 516 | ENDIF |
---|
| 517 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 518 | lpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 519 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 520 | |
---|
[216] | 521 | CASE ( 'lwp_av' ) |
---|
| 522 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
[667] | 523 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 524 | ENDIF |
---|
| 525 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 526 | lwp_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 527 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 528 | |
---|
[1551] | 529 | CASE ( 'm_liq_eb' ) |
---|
| 530 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 531 | m_liq_eb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 532 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 533 | CASE ( 'm_liq_eb_av' ) |
---|
| 534 | IF ( .NOT. ALLOCATED( m_liq_eb_av ) ) THEN |
---|
| 535 | ALLOCATE( m_liq_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 536 | ENDIF |
---|
| 537 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 538 | m_liq_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 539 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 540 | |
---|
| 541 | CASE ( 'm_soil' ) |
---|
| 542 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil2(:,:,:) |
---|
| 543 | m_soil(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 544 | tmp_3d_soil2(nzb_soil:nzt_soil,nysf-nbgp:nynf & |
---|
| 545 | +nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 546 | |
---|
| 547 | CASE ( 'm_soil_av' ) |
---|
| 548 | IF ( .NOT. ALLOCATED( m_soil_av ) ) THEN |
---|
| 549 | ALLOCATE( m_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) |
---|
| 550 | ENDIF |
---|
| 551 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil2(:,:,:) |
---|
| 552 | m_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 553 | tmp_3d_soil2(nzb_soil:nzt_soil,nysf & |
---|
| 554 | -nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 555 | |
---|
[1115] | 556 | CASE ( 'nr' ) |
---|
| 557 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 558 | nr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 559 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 560 | |
---|
| 561 | CASE ( 'nr_av' ) |
---|
| 562 | IF ( .NOT. ALLOCATED( nr_av ) ) THEN |
---|
| 563 | ALLOCATE( nr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 564 | ENDIF |
---|
| 565 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 566 | nr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 567 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 568 | |
---|
| 569 | CASE ( 'nrs' ) |
---|
| 570 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 571 | nrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 572 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 573 | |
---|
| 574 | CASE ( 'nrsws' ) |
---|
| 575 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 576 | nrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 577 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 578 | |
---|
| 579 | CASE ( 'nrswst' ) |
---|
| 580 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 581 | nrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 582 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1691] | 583 | CASE ( 'ol' ) |
---|
| 584 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 585 | ol(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 586 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1115] | 587 | |
---|
[216] | 588 | CASE ( 'p' ) |
---|
| 589 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 590 | p(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 591 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 592 | |
---|
[216] | 593 | CASE ( 'p_av' ) |
---|
| 594 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
[667] | 595 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 596 | ENDIF |
---|
| 597 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 598 | p_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 599 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 600 | |
---|
[216] | 601 | CASE ( 'pc_av' ) |
---|
| 602 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
[667] | 603 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 604 | ENDIF |
---|
| 605 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 606 | pc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 607 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 608 | |
---|
[216] | 609 | CASE ( 'pr_av' ) |
---|
| 610 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
[667] | 611 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 612 | ENDIF |
---|
| 613 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 614 | pr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 615 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 616 | |
---|
[1053] | 617 | CASE ( 'prr' ) |
---|
| 618 | IF ( .NOT. ALLOCATED( prr ) ) THEN |
---|
| 619 | ALLOCATE( prr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 620 | ENDIF |
---|
| 621 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 622 | prr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 623 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 624 | |
---|
| 625 | CASE ( 'prr_av' ) |
---|
| 626 | IF ( .NOT. ALLOCATED( prr_av ) ) THEN |
---|
| 627 | ALLOCATE( prr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 628 | ENDIF |
---|
| 629 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 630 | prr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 631 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 632 | |
---|
[216] | 633 | CASE ( 'precipitation_amount' ) |
---|
| 634 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 635 | precipitation_amount(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 636 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 637 | |
---|
[216] | 638 | CASE ( 'precipitation_rate_a' ) |
---|
| 639 | IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[667] | 640 | ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 641 | ENDIF |
---|
| 642 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 643 | precipitation_rate_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 644 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 645 | |
---|
[216] | 646 | CASE ( 'pt' ) |
---|
| 647 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 648 | pt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 649 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 650 | |
---|
[216] | 651 | CASE ( 'pt_av' ) |
---|
| 652 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
[667] | 653 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 654 | ENDIF |
---|
| 655 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 656 | pt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 657 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 658 | |
---|
[216] | 659 | CASE ( 'q' ) |
---|
| 660 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 661 | q(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 662 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 663 | |
---|
[216] | 664 | CASE ( 'q_av' ) |
---|
| 665 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
[667] | 666 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
[216] | 667 | ENDIF |
---|
| 668 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 669 | q_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 670 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 671 | |
---|
[1115] | 672 | CASE ( 'qc' ) |
---|
| 673 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 674 | qc(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 675 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 676 | |
---|
| 677 | CASE ( 'qc_av' ) |
---|
| 678 | IF ( .NOT. ALLOCATED( qc_av ) ) THEN |
---|
| 679 | ALLOCATE( qc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 680 | ENDIF |
---|
| 681 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 682 | qc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 683 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 684 | |
---|
[216] | 685 | CASE ( 'ql' ) |
---|
| 686 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 687 | ql(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 688 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 689 | |
---|
[216] | 690 | CASE ( 'ql_av' ) |
---|
| 691 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
[667] | 692 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 693 | ENDIF |
---|
| 694 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 695 | ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 696 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 697 | |
---|
[1053] | 698 | CASE ( 'qr' ) |
---|
| 699 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 700 | qr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 701 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 702 | |
---|
| 703 | CASE ( 'qr_av' ) |
---|
| 704 | IF ( .NOT. ALLOCATED( qr_av ) ) THEN |
---|
| 705 | ALLOCATE( qr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 706 | ENDIF |
---|
| 707 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 708 | qr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 709 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 710 | |
---|
| 711 | CASE ( 'qrs' ) |
---|
| 712 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 713 | qrs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 714 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 715 | |
---|
| 716 | CASE ( 'qrsws' ) |
---|
| 717 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 718 | qrsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 719 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 720 | |
---|
| 721 | CASE ( 'qrswst' ) |
---|
| 722 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 723 | qrswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 724 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 725 | |
---|
[216] | 726 | CASE ( 'ql_c_av' ) |
---|
| 727 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
[667] | 728 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 729 | ENDIF |
---|
| 730 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 731 | ql_c_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 732 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 733 | |
---|
[216] | 734 | CASE ( 'ql_v_av' ) |
---|
| 735 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
[667] | 736 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 737 | ENDIF |
---|
| 738 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 739 | ql_v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 740 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 741 | |
---|
[216] | 742 | CASE ( 'ql_vp_av' ) |
---|
| 743 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
[667] | 744 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 745 | ENDIF |
---|
| 746 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 747 | ql_vp_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 748 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 749 | |
---|
[216] | 750 | CASE ( 'qs' ) |
---|
| 751 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 752 | qs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 753 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 754 | |
---|
[216] | 755 | CASE ( 'qsws' ) |
---|
| 756 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 757 | qsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 758 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 759 | |
---|
[354] | 760 | CASE ( 'qsws_av' ) |
---|
| 761 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
[667] | 762 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 763 | ENDIF |
---|
| 764 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 765 | qsws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 766 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[354] | 767 | |
---|
[216] | 768 | CASE ( 'qswst' ) |
---|
| 769 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 770 | qswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 771 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 772 | |
---|
[1551] | 773 | CASE ( 'qsws_eb_av' ) |
---|
| 774 | IF ( .NOT. ALLOCATED( qsws_eb_av ) ) THEN |
---|
| 775 | ALLOCATE( qsws_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 776 | ENDIF |
---|
| 777 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 778 | qsws_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 779 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 780 | |
---|
| 781 | CASE ( 'qsws_liq_eb_av' ) |
---|
| 782 | IF ( .NOT. ALLOCATED( qsws_liq_eb_av ) ) THEN |
---|
| 783 | ALLOCATE( qsws_liq_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 784 | ENDIF |
---|
| 785 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 786 | qsws_liq_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 787 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 788 | CASE ( 'qsws_soil_eb_av' ) |
---|
| 789 | IF ( .NOT. ALLOCATED( qsws_soil_eb_av ) ) THEN |
---|
| 790 | ALLOCATE( qsws_soil_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 791 | ENDIF |
---|
| 792 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 793 | qsws_soil_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 794 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 795 | |
---|
| 796 | CASE ( 'qsws_veg_eb_av' ) |
---|
| 797 | IF ( .NOT. ALLOCATED( qsws_veg_eb_av ) ) THEN |
---|
| 798 | ALLOCATE( qsws_veg_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 799 | ENDIF |
---|
| 800 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 801 | qsws_veg_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 802 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 803 | |
---|
[216] | 804 | CASE ( 'qv_av' ) |
---|
| 805 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
[667] | 806 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 807 | ENDIF |
---|
| 808 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 809 | qv_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 810 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 811 | |
---|
[1585] | 812 | CASE ( 'rad_net' ) |
---|
| 813 | IF ( .NOT. ALLOCATED( rad_net ) ) THEN |
---|
| 814 | ALLOCATE( rad_net(nysg:nyng,nxlg:nxrg) ) |
---|
| 815 | ENDIF |
---|
| 816 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 817 | rad_net(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 818 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 819 | |
---|
[1551] | 820 | CASE ( 'rad_net_av' ) |
---|
| 821 | IF ( .NOT. ALLOCATED( rad_net_av ) ) THEN |
---|
| 822 | ALLOCATE( rad_net_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 823 | ENDIF |
---|
| 824 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 825 | rad_net_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 826 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1585] | 827 | CASE ( 'rad_lw_in' ) |
---|
| 828 | IF ( .NOT. ALLOCATED( rad_lw_in ) ) THEN |
---|
| 829 | ALLOCATE( rad_lw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 830 | ENDIF |
---|
| 831 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 832 | rad_lw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 833 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1551] | 834 | |
---|
[1585] | 835 | CASE ( 'rad_lw_in_av' ) |
---|
| 836 | IF ( .NOT. ALLOCATED( rad_lw_in_av ) ) THEN |
---|
| 837 | ALLOCATE( rad_lw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 838 | ENDIF |
---|
| 839 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 840 | rad_lw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 841 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 842 | |
---|
| 843 | CASE ( 'rad_lw_out' ) |
---|
| 844 | IF ( .NOT. ALLOCATED( rad_lw_out ) ) THEN |
---|
| 845 | ALLOCATE( rad_lw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 846 | ENDIF |
---|
| 847 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 848 | rad_lw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 849 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 850 | |
---|
| 851 | CASE ( 'rad_lw_out_av' ) |
---|
| 852 | IF ( .NOT. ALLOCATED( rad_lw_out_av ) ) THEN |
---|
| 853 | ALLOCATE( rad_lw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 854 | ENDIF |
---|
| 855 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 856 | rad_lw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 857 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 858 | |
---|
[1709] | 859 | CASE ( 'rad_lw_out_change_0' ) |
---|
| 860 | IF ( .NOT. ALLOCATED( rad_lw_out_change_0 ) ) THEN |
---|
| 861 | ALLOCATE( rad_lw_out_change_0(nysg:nyng,nxlg:nxrg) ) |
---|
| 862 | ENDIF |
---|
| 863 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 864 | rad_lw_out_change_0(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp)& |
---|
| 865 | = tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 866 | |
---|
[1691] | 867 | CASE ( 'rad_lw_cs_hr' ) |
---|
| 868 | IF ( .NOT. ALLOCATED( rad_lw_cs_hr ) ) THEN |
---|
| 869 | ALLOCATE( rad_lw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 870 | ENDIF |
---|
| 871 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 872 | rad_lw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 873 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 874 | |
---|
| 875 | CASE ( 'rad_lw_cs_hr_av' ) |
---|
[1757] | 876 | IF ( .NOT. ALLOCATED( rad_lw_cs_hr_av ) ) THEN |
---|
[1691] | 877 | ALLOCATE( rad_lw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 878 | ENDIF |
---|
| 879 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 880 | rad_lw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 881 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 882 | |
---|
| 883 | CASE ( 'rad_lw_hr' ) |
---|
| 884 | IF ( .NOT. ALLOCATED( rad_lw_hr ) ) THEN |
---|
| 885 | ALLOCATE( rad_lw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 886 | ENDIF |
---|
| 887 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 888 | rad_lw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 889 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 890 | |
---|
| 891 | CASE ( 'rad_lw_hr_av' ) |
---|
| 892 | IF ( .NOT. ALLOCATED( rad_lw_hr_av ) ) THEN |
---|
| 893 | ALLOCATE( rad_lw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 894 | ENDIF |
---|
| 895 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 896 | rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 897 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 898 | |
---|
[1585] | 899 | CASE ( 'rad_sw_in' ) |
---|
| 900 | IF ( .NOT. ALLOCATED( rad_sw_in ) ) THEN |
---|
| 901 | ALLOCATE( rad_sw_in(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 902 | ENDIF |
---|
| 903 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 904 | rad_sw_in(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 905 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 906 | |
---|
[1551] | 907 | CASE ( 'rad_sw_in_av' ) |
---|
| 908 | IF ( .NOT. ALLOCATED( rad_sw_in_av ) ) THEN |
---|
[1585] | 909 | ALLOCATE( rad_sw_in_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[1551] | 910 | ENDIF |
---|
[1585] | 911 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 912 | rad_sw_in_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 913 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1551] | 914 | |
---|
[1585] | 915 | CASE ( 'rad_sw_out' ) |
---|
| 916 | IF ( .NOT. ALLOCATED( rad_sw_out ) ) THEN |
---|
| 917 | ALLOCATE( rad_sw_out(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 918 | ENDIF |
---|
| 919 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 920 | rad_sw_out(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 921 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 922 | |
---|
| 923 | CASE ( 'rad_sw_out_av' ) |
---|
| 924 | IF ( .NOT. ALLOCATED( rad_sw_out_av ) ) THEN |
---|
| 925 | ALLOCATE( rad_sw_out_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 926 | ENDIF |
---|
| 927 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 928 | rad_sw_out_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 929 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 930 | |
---|
[1691] | 931 | CASE ( 'rad_sw_cs_hr' ) |
---|
| 932 | IF ( .NOT. ALLOCATED( rad_sw_cs_hr ) ) THEN |
---|
| 933 | ALLOCATE( rad_sw_cs_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 934 | ENDIF |
---|
| 935 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 936 | rad_sw_cs_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 937 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 938 | |
---|
| 939 | CASE ( 'rad_sw_cs_hr_av' ) |
---|
[1757] | 940 | IF ( .NOT. ALLOCATED( rad_sw_cs_hr_av ) ) THEN |
---|
[1691] | 941 | ALLOCATE( rad_sw_cs_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 942 | ENDIF |
---|
| 943 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 944 | rad_sw_cs_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 945 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 946 | |
---|
| 947 | CASE ( 'rad_sw_hr' ) |
---|
| 948 | IF ( .NOT. ALLOCATED( rad_sw_hr ) ) THEN |
---|
| 949 | ALLOCATE( rad_sw_hr(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 950 | ENDIF |
---|
| 951 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 952 | rad_sw_hr(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 953 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 954 | |
---|
| 955 | CASE ( 'rad_sw_hr_av' ) |
---|
| 956 | IF ( .NOT. ALLOCATED( rad_sw_hr_av ) ) THEN |
---|
| 957 | ALLOCATE( rad_sw_hr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
| 958 | ENDIF |
---|
| 959 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 960 | rad_lw_hr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 961 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 962 | |
---|
[216] | 963 | CASE ( 'random_iv' ) ! still unresolved issue |
---|
| 964 | IF ( k == 1 ) READ ( 13 ) random_iv |
---|
| 965 | IF ( k == 1 ) READ ( 13 ) random_iy |
---|
[1400] | 966 | |
---|
| 967 | CASE ( 'seq_random_array' ) ! still unresolved issue |
---|
| 968 | IF ( k == 1 ) READ ( 13 ) id_random_array |
---|
| 969 | IF ( k == 1 ) READ ( 13 ) seq_random_array |
---|
[146] | 970 | |
---|
[216] | 971 | CASE ( 'rho_av' ) |
---|
| 972 | IF ( .NOT. ALLOCATED( rho_av ) ) THEN |
---|
[667] | 973 | ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 974 | ENDIF |
---|
| 975 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 976 | rho_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 977 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 978 | |
---|
[216] | 979 | CASE ( 'rif_wall' ) |
---|
| 980 | IF ( k == 1 ) THEN |
---|
[667] | 981 | ALLOCATE( tmp_4d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 982 | nxl_on_file-nbgp:nxr_on_file+nbgp,1:4) ) |
---|
[216] | 983 | READ ( 13 ) tmp_4d |
---|
| 984 | ENDIF |
---|
[667] | 985 | rif_wall(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp,:) = & |
---|
| 986 | tmp_4d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp,:) |
---|
[146] | 987 | |
---|
[216] | 988 | CASE ( 's_av' ) |
---|
| 989 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
[667] | 990 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) |
---|
[216] | 991 | ENDIF |
---|
| 992 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 993 | s_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 994 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 995 | |
---|
[216] | 996 | CASE ( 'sa' ) |
---|
| 997 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 998 | sa(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 999 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1000 | |
---|
[216] | 1001 | CASE ( 'sa_av' ) |
---|
| 1002 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
[667] | 1003 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1004 | ENDIF |
---|
| 1005 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1006 | sa_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1007 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1008 | |
---|
[216] | 1009 | CASE ( 'saswsb' ) |
---|
| 1010 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1011 | saswsb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1012 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1013 | |
---|
[216] | 1014 | CASE ( 'saswst' ) |
---|
| 1015 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1016 | saswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1017 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1018 | |
---|
[216] | 1019 | CASE ( 'shf' ) |
---|
| 1020 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1021 | shf(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1022 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1023 | |
---|
[354] | 1024 | CASE ( 'shf_av' ) |
---|
| 1025 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
[667] | 1026 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 1027 | ENDIF |
---|
| 1028 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1029 | shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1030 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1001] | 1031 | |
---|
[1551] | 1032 | CASE ( 'shf_eb_av' ) |
---|
| 1033 | IF ( .NOT. ALLOCATED( shf_eb_av ) ) THEN |
---|
| 1034 | ALLOCATE( shf_eb_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 1035 | ENDIF |
---|
| 1036 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 1037 | shf_eb_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1038 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 1039 | |
---|
[216] | 1040 | CASE ( 'spectrum_x' ) |
---|
| 1041 | IF ( k == 1 ) THEN |
---|
| 1042 | IF ( nx_on_file /= nx ) THEN |
---|
[274] | 1043 | message_string = 'read_3d_binary: spectrum_x ' // & |
---|
| 1044 | 'on restart file ignored because' // & |
---|
| 1045 | '&total numbers of grid points (nx) ' // & |
---|
| 1046 | 'do not match' |
---|
| 1047 | CALL message( 'read_3d_binary', 'PA0293',& |
---|
| 1048 | 0, 1, 0, 6, 0 ) |
---|
[216] | 1049 | READ ( 13 ) rdummy |
---|
| 1050 | ELSE |
---|
| 1051 | READ ( 13 ) spectrum_x |
---|
| 1052 | ENDIF |
---|
| 1053 | ENDIF |
---|
[146] | 1054 | |
---|
[216] | 1055 | CASE ( 'spectrum_y' ) |
---|
| 1056 | IF ( k == 1 ) THEN |
---|
| 1057 | IF ( ny_on_file /= ny ) THEN |
---|
[274] | 1058 | message_string = 'read_3d_binary: spectrum_y ' // & |
---|
| 1059 | 'on restart file ignored because' // & |
---|
| 1060 | '&total numbers of grid points (ny) '// & |
---|
| 1061 | 'do not match' |
---|
| 1062 | CALL message( 'read_3d_binary', 'PA0294', & |
---|
| 1063 | 0, 1, 0, 6, 0 ) |
---|
| 1064 | READ ( 13 ) rdummy |
---|
[216] | 1065 | ELSE |
---|
| 1066 | READ ( 13 ) spectrum_y |
---|
| 1067 | ENDIF |
---|
| 1068 | ENDIF |
---|
[146] | 1069 | |
---|
[216] | 1070 | CASE ( 'ts' ) |
---|
| 1071 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1072 | ts(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1073 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1074 | |
---|
[216] | 1075 | CASE ( 'ts_av' ) |
---|
| 1076 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
[667] | 1077 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1078 | ENDIF |
---|
| 1079 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1080 | ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1081 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1082 | |
---|
[216] | 1083 | CASE ( 'tswst' ) |
---|
| 1084 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1085 | tswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1086 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1087 | |
---|
[1551] | 1088 | CASE ( 't_soil' ) |
---|
| 1089 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil1 |
---|
| 1090 | t_soil(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1091 | tmp_3d_soil1(:,nysf-nbgp:nynf+nbgp, & |
---|
| 1092 | nxlf-nbgp:nxrf+nbgp) |
---|
| 1093 | |
---|
| 1094 | CASE ( 't_soil_av' ) |
---|
| 1095 | IF ( .NOT. ALLOCATED( t_soil_av ) ) THEN |
---|
| 1096 | ALLOCATE( t_soil_av(nzb_soil:nzt_soil,nysg:nyng,nxlg:nxrg) ) |
---|
| 1097 | ENDIF |
---|
| 1098 | IF ( k == 1 ) READ ( 13 ) tmp_3d_soil2(:,:,:) |
---|
| 1099 | t_soil_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1100 | tmp_3d_soil2(:,nysf-nbgp:nynf+nbgp, & |
---|
| 1101 | nxlf-nbgp:nxrf+nbgp) |
---|
| 1102 | |
---|
[216] | 1103 | CASE ( 'u' ) |
---|
| 1104 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1105 | u(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1106 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1107 | |
---|
[216] | 1108 | CASE ( 'u_av' ) |
---|
| 1109 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
[667] | 1110 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1111 | ENDIF |
---|
| 1112 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1113 | u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1114 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1115 | |
---|
[216] | 1116 | CASE ( 'u_m_l' ) |
---|
| 1117 | IF ( k == 1 ) THEN |
---|
| 1118 | ALLOCATE( tmp_3dwul(nzb:nzt+1, & |
---|
[667] | 1119 | nys_on_file-nbgp:nyn_on_file+nbgp,1:2) ) |
---|
[216] | 1120 | READ ( 13 ) tmp_3dwul |
---|
| 1121 | ENDIF |
---|
| 1122 | IF ( outflow_l ) THEN |
---|
[667] | 1123 | u_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwul(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1124 | ENDIF |
---|
[146] | 1125 | |
---|
[216] | 1126 | CASE ( 'u_m_n' ) |
---|
| 1127 | IF ( k == 1 ) THEN |
---|
| 1128 | ALLOCATE( tmp_3dwun(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 1129 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1130 | READ ( 13 ) tmp_3dwun |
---|
| 1131 | ENDIF |
---|
| 1132 | IF ( outflow_n ) THEN |
---|
[667] | 1133 | u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwun(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1134 | ENDIF |
---|
[146] | 1135 | |
---|
[216] | 1136 | CASE ( 'u_m_r' ) |
---|
| 1137 | IF ( k == 1 ) THEN |
---|
| 1138 | ALLOCATE( tmp_3dwur(nzb:nzt+1,& |
---|
[667] | 1139 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 1140 | READ ( 13 ) tmp_3dwur |
---|
| 1141 | ENDIF |
---|
| 1142 | IF ( outflow_r ) THEN |
---|
[667] | 1143 | u_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwur(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1144 | ENDIF |
---|
[146] | 1145 | |
---|
[216] | 1146 | CASE ( 'u_m_s' ) |
---|
| 1147 | IF ( k == 1 ) THEN |
---|
| 1148 | ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1, & |
---|
[667] | 1149 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1150 | READ ( 13 ) tmp_3dwus |
---|
| 1151 | ENDIF |
---|
| 1152 | IF ( outflow_s ) THEN |
---|
[667] | 1153 | u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwus(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1154 | ENDIF |
---|
[146] | 1155 | |
---|
[216] | 1156 | CASE ( 'us' ) |
---|
| 1157 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1158 | us(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1159 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1160 | |
---|
[216] | 1161 | CASE ( 'usws' ) |
---|
| 1162 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1163 | usws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1164 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1165 | |
---|
[216] | 1166 | CASE ( 'uswst' ) |
---|
| 1167 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1168 | uswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1169 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1170 | |
---|
[216] | 1171 | CASE ( 'us_av' ) |
---|
| 1172 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
[667] | 1173 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1174 | ENDIF |
---|
| 1175 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1176 | us_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1177 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1178 | |
---|
[216] | 1179 | CASE ( 'v' ) |
---|
| 1180 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1181 | v(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1182 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1183 | |
---|
[216] | 1184 | CASE ( 'v_av' ) |
---|
| 1185 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
[667] | 1186 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1187 | ENDIF |
---|
| 1188 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1189 | v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1190 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1191 | |
---|
[216] | 1192 | CASE ( 'v_m_l' ) |
---|
| 1193 | IF ( k == 1 ) THEN |
---|
| 1194 | ALLOCATE( tmp_3dwvl(nzb:nzt+1,& |
---|
[667] | 1195 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
[216] | 1196 | READ ( 13 ) tmp_3dwvl |
---|
| 1197 | ENDIF |
---|
| 1198 | IF ( outflow_l ) THEN |
---|
[667] | 1199 | v_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvl(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1200 | ENDIF |
---|
[146] | 1201 | |
---|
[216] | 1202 | CASE ( 'v_m_n' ) |
---|
| 1203 | IF ( k == 1 ) THEN |
---|
| 1204 | ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 1205 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1206 | READ ( 13 ) tmp_3dwvn |
---|
| 1207 | ENDIF |
---|
| 1208 | IF ( outflow_n ) THEN |
---|
[667] | 1209 | v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1210 | ENDIF |
---|
[146] | 1211 | |
---|
[216] | 1212 | CASE ( 'v_m_r' ) |
---|
| 1213 | IF ( k == 1 ) THEN |
---|
| 1214 | ALLOCATE( tmp_3dwvr(nzb:nzt+1,& |
---|
[667] | 1215 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 1216 | READ ( 13 ) tmp_3dwvr |
---|
| 1217 | ENDIF |
---|
| 1218 | IF ( outflow_r ) THEN |
---|
[667] | 1219 | v_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvr(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1220 | ENDIF |
---|
[146] | 1221 | |
---|
[216] | 1222 | CASE ( 'v_m_s' ) |
---|
| 1223 | IF ( k == 1 ) THEN |
---|
| 1224 | ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2, & |
---|
[667] | 1225 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1226 | READ ( 13 ) tmp_3dwvs |
---|
| 1227 | ENDIF |
---|
| 1228 | IF ( outflow_s ) THEN |
---|
[667] | 1229 | v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvs(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1230 | ENDIF |
---|
[146] | 1231 | |
---|
[216] | 1232 | CASE ( 'vpt' ) |
---|
| 1233 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1234 | vpt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1235 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1236 | |
---|
[216] | 1237 | CASE ( 'vpt_av' ) |
---|
| 1238 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
[667] | 1239 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1240 | ENDIF |
---|
| 1241 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1242 | vpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1243 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1244 | |
---|
[216] | 1245 | CASE ( 'vsws' ) |
---|
| 1246 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1247 | vsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1248 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1249 | |
---|
[216] | 1250 | CASE ( 'vswst' ) |
---|
| 1251 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1252 | vswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1253 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1254 | |
---|
[216] | 1255 | CASE ( 'w' ) |
---|
| 1256 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1257 | w(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1258 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1259 | |
---|
[216] | 1260 | CASE ( 'w_av' ) |
---|
| 1261 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
[667] | 1262 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1263 | ENDIF |
---|
| 1264 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 1265 | w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1266 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1267 | |
---|
[216] | 1268 | CASE ( 'w_m_l' ) |
---|
| 1269 | IF ( k == 1 ) THEN |
---|
| 1270 | ALLOCATE( tmp_3dwwl(nzb:nzt+1,& |
---|
[667] | 1271 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
[216] | 1272 | READ ( 13 ) tmp_3dwwl |
---|
| 1273 | ENDIF |
---|
| 1274 | IF ( outflow_l ) THEN |
---|
[667] | 1275 | w_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwl(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1276 | ENDIF |
---|
[146] | 1277 | |
---|
[216] | 1278 | CASE ( 'w_m_n' ) |
---|
| 1279 | IF ( k == 1 ) THEN |
---|
| 1280 | ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 1281 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1282 | READ ( 13 ) tmp_3dwwn |
---|
| 1283 | ENDIF |
---|
| 1284 | IF ( outflow_n ) THEN |
---|
[667] | 1285 | w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwwn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1286 | ENDIF |
---|
[146] | 1287 | |
---|
[216] | 1288 | CASE ( 'w_m_r' ) |
---|
| 1289 | IF ( k == 1 ) THEN |
---|
| 1290 | ALLOCATE( tmp_3dwwr(nzb:nzt+1,& |
---|
[667] | 1291 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 1292 | READ ( 13 ) tmp_3dwwr |
---|
| 1293 | ENDIF |
---|
| 1294 | IF ( outflow_r ) THEN |
---|
[667] | 1295 | w_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwr(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 1296 | ENDIF |
---|
[146] | 1297 | |
---|
[216] | 1298 | CASE ( 'w_m_s' ) |
---|
| 1299 | IF ( k == 1 ) THEN |
---|
| 1300 | ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, & |
---|
[667] | 1301 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 1302 | READ ( 13 ) tmp_3dwws |
---|
| 1303 | ENDIF |
---|
| 1304 | IF ( outflow_s ) THEN |
---|
[667] | 1305 | w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwws(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 1306 | ENDIF |
---|
| 1307 | DEALLOCATE( tmp_3dwws ) |
---|
[146] | 1308 | |
---|
[216] | 1309 | CASE ( 'z0' ) |
---|
| 1310 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1311 | z0(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1312 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1313 | |
---|
[216] | 1314 | CASE ( 'z0_av' ) |
---|
| 1315 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
[667] | 1316 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 1317 | ENDIF |
---|
| 1318 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 1319 | z0_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1320 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 1321 | |
---|
[978] | 1322 | CASE ( 'z0h' ) |
---|
| 1323 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 1324 | z0h(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1325 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 1326 | |
---|
| 1327 | CASE ( 'z0h_av' ) |
---|
| 1328 | IF ( .NOT. ALLOCATED( z0h_av ) ) THEN |
---|
| 1329 | ALLOCATE( z0h_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 1330 | ENDIF |
---|
| 1331 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 1332 | z0h_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1333 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 1334 | |
---|
[1788] | 1335 | CASE ( 'z0q' ) |
---|
| 1336 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 1337 | z0q(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1338 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 1339 | |
---|
| 1340 | CASE ( 'z0q_av' ) |
---|
| 1341 | IF ( .NOT. ALLOCATED( z0q_av ) ) THEN |
---|
| 1342 | ALLOCATE( z0q_av(nysg:nyng,nxlg:nxrg) ) |
---|
| 1343 | ENDIF |
---|
| 1344 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
| 1345 | z0q_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 1346 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 1347 | |
---|
[216] | 1348 | CASE DEFAULT |
---|
[257] | 1349 | WRITE( message_string, * ) 'unknown field named "', & |
---|
| 1350 | TRIM( field_chr ), '" found in', & |
---|
| 1351 | '&data from prior run on PE ',myid |
---|
| 1352 | CALL message( 'read_3d_binary', 'PA0295', 1, 2, 0, 6, 0 ) |
---|
| 1353 | |
---|
[216] | 1354 | END SELECT |
---|
| 1355 | |
---|
| 1356 | ENDDO ! overlap loop |
---|
| 1357 | |
---|
[1] | 1358 | ! |
---|
[216] | 1359 | !-- Deallocate arrays needed for specific variables only |
---|
| 1360 | IF ( ALLOCATED( tmp_3dwul ) ) DEALLOCATE( tmp_3dwul ) |
---|
| 1361 | IF ( ALLOCATED( tmp_3dwun ) ) DEALLOCATE( tmp_3dwun ) |
---|
| 1362 | IF ( ALLOCATED( tmp_3dwur ) ) DEALLOCATE( tmp_3dwur ) |
---|
| 1363 | IF ( ALLOCATED( tmp_3dwus ) ) DEALLOCATE( tmp_3dwus ) |
---|
| 1364 | IF ( ALLOCATED( tmp_3dwvl ) ) DEALLOCATE( tmp_3dwvl ) |
---|
| 1365 | IF ( ALLOCATED( tmp_3dwvn ) ) DEALLOCATE( tmp_3dwvn ) |
---|
| 1366 | IF ( ALLOCATED( tmp_3dwvr ) ) DEALLOCATE( tmp_3dwvr ) |
---|
| 1367 | IF ( ALLOCATED( tmp_3dwvs ) ) DEALLOCATE( tmp_3dwvs ) |
---|
| 1368 | IF ( ALLOCATED( tmp_3dwwl ) ) DEALLOCATE( tmp_3dwwl ) |
---|
| 1369 | IF ( ALLOCATED( tmp_3dwwn ) ) DEALLOCATE( tmp_3dwwn ) |
---|
| 1370 | IF ( ALLOCATED( tmp_3dwwr ) ) DEALLOCATE( tmp_3dwwr ) |
---|
| 1371 | IF ( ALLOCATED( tmp_3dwws ) ) DEALLOCATE( tmp_3dwws ) |
---|
| 1372 | IF ( ALLOCATED( tmp_4d ) ) DEALLOCATE( tmp_4d ) |
---|
| 1373 | |
---|
| 1374 | ! |
---|
[146] | 1375 | !-- Read next character string |
---|
| 1376 | READ ( 13 ) field_chr |
---|
[1] | 1377 | |
---|
[146] | 1378 | ENDDO ! loop over variables |
---|
[1] | 1379 | |
---|
| 1380 | ! |
---|
[146] | 1381 | !-- Read user-defined restart data |
---|
[220] | 1382 | CALL user_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, & |
---|
| 1383 | nynfa, nyn_on_file, nysfa, nys_on_file, & |
---|
| 1384 | offset_xa, offset_ya, overlap_count(i), & |
---|
[216] | 1385 | tmp_2d, tmp_3d ) |
---|
[145] | 1386 | |
---|
| 1387 | ! |
---|
[146] | 1388 | !-- Close the restart file |
---|
| 1389 | CALL close_file( 13 ) |
---|
| 1390 | |
---|
| 1391 | DEALLOCATE( tmp_2d, tmp_3d ) |
---|
[1551] | 1392 | IF ( ALLOCATED( tmp_3d_soil1 ) ) DEALLOCATE( tmp_3d_soil1 ) |
---|
| 1393 | IF ( ALLOCATED( tmp_3d_soil2 ) ) DEALLOCATE( tmp_3d_soil2 ) |
---|
[146] | 1394 | |
---|
| 1395 | ENDDO ! loop over restart files |
---|
| 1396 | |
---|
| 1397 | |
---|
| 1398 | ! |
---|
| 1399 | !-- Restore the original filename for the restart file to be written |
---|
| 1400 | myid_char = myid_char_save |
---|
| 1401 | |
---|
| 1402 | |
---|
| 1403 | ! |
---|
[1] | 1404 | !-- End of time measuring for reading binary data |
---|
| 1405 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'stop' ) |
---|
| 1406 | |
---|
| 1407 | END SUBROUTINE read_3d_binary |
---|