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