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