[1] | 1 | SUBROUTINE read_3d_binary |
---|
| 2 | |
---|
| 3 | !------------------------------------------------------------------------------! |
---|
[257] | 4 | ! Current revisions: |
---|
[1] | 5 | ! ----------------- |
---|
[226] | 6 | ! |
---|
| 7 | ! Former revisions: |
---|
| 8 | ! ----------------- |
---|
| 9 | ! $Id: read_3d_binary.f90 772 2011-10-27 11:08:46Z letzel $ |
---|
| 10 | ! |
---|
[772] | 11 | ! 771 2011-10-27 10:56:21Z heinze |
---|
| 12 | ! +lpt_av |
---|
| 13 | ! |
---|
[668] | 14 | ! 667 2010-12-23 12:06:00Z suehring/gryschka |
---|
| 15 | ! +/- 1 replaced with +/- nbgp when swapping and allocating variables. |
---|
| 16 | ! Bugfix: When using initializing_actions = 'cyclic_fill' in some cases |
---|
| 17 | ! not the whole model domain was filled with data of the prerun. |
---|
| 18 | ! |
---|
[449] | 19 | ! 410 2009-12-04 17:05:40Z letzel |
---|
| 20 | ! format changed in test output from I2 to I4 |
---|
| 21 | ! |
---|
[392] | 22 | ! 367 2009-08-25 08:35:52Z maronga |
---|
| 23 | ! Output of messages replaced by message handling routine. |
---|
| 24 | ! +shf_av, qsws_av |
---|
| 25 | ! |
---|
[226] | 26 | ! 220 2008-12-18 07:00:36Z raasch |
---|
[216] | 27 | ! reading mechanism completely revised (subdomain/total domain size can vary |
---|
| 28 | ! arbitrarily between current and previous run) |
---|
| 29 | ! Bugfix: reading of spectrum_x|y from restart files ignored if total numbers |
---|
| 30 | ! of grid points do not match |
---|
[198] | 31 | ! |
---|
| 32 | ! 150 2008-02-29 08:19:58Z raasch |
---|
[146] | 33 | ! Files from which restart data are to be read are determined and subsequently |
---|
[147] | 34 | ! opened. The total domain on the restart file is allowed to be smaller than |
---|
| 35 | ! the current total domain. In this case it will be periodically mapped on the |
---|
| 36 | ! current domain (needed for recycling method). |
---|
[146] | 37 | ! +call of user_read_restart_data, -dopr_time_count, |
---|
[145] | 38 | ! hom_sum, volume_flow_area, volume_flow_initial moved to read_var_list, |
---|
[143] | 39 | ! reading of old profil parameters (cross_..., dopr_crossindex, profile_***) |
---|
[146] | 40 | ! removed, initialization of spectrum_x|y removed |
---|
[1] | 41 | ! |
---|
[110] | 42 | ! 102 2007-07-27 09:09:17Z raasch |
---|
| 43 | ! +uswst, uswst_m, vswst, vswst_m |
---|
| 44 | ! |
---|
[98] | 45 | ! 96 2007-06-04 08:07:41Z raasch |
---|
| 46 | ! +rho_av, sa, sa_av, saswsb, saswst |
---|
| 47 | ! |
---|
[77] | 48 | ! 73 2007-03-20 08:33:14Z raasch |
---|
| 49 | ! +precipitation_amount, precipitation_rate_av, rif_wall, u_m_l, u_m_r, etc., |
---|
| 50 | ! z0_av |
---|
| 51 | ! |
---|
[39] | 52 | ! 19 2007-02-23 04:53:48Z raasch |
---|
[77] | 53 | ! +qswst, qswst_m, tswst, tswst_m |
---|
[39] | 54 | ! |
---|
[3] | 55 | ! RCS Log replace by Id keyword, revision history cleaned up |
---|
| 56 | ! |
---|
[1] | 57 | ! Revision 1.4 2006/08/04 15:02:32 raasch |
---|
| 58 | ! +iran, iran_part |
---|
| 59 | ! |
---|
| 60 | ! Revision 1.1 2004/04/30 12:47:27 raasch |
---|
| 61 | ! Initial revision |
---|
| 62 | ! |
---|
| 63 | ! |
---|
| 64 | ! Description: |
---|
| 65 | ! ------------ |
---|
| 66 | ! Binary input of variables and arrays from restart file |
---|
| 67 | !------------------------------------------------------------------------------! |
---|
| 68 | |
---|
| 69 | USE arrays_3d |
---|
| 70 | USE averaging |
---|
[72] | 71 | USE cloud_parameters |
---|
[1] | 72 | USE control_parameters |
---|
| 73 | USE cpulog |
---|
| 74 | USE indices |
---|
| 75 | USE interfaces |
---|
| 76 | USE particle_attributes |
---|
| 77 | USE pegrid |
---|
| 78 | USE profil_parameter |
---|
| 79 | USE random_function_mod |
---|
| 80 | USE statistics |
---|
| 81 | |
---|
| 82 | IMPLICIT NONE |
---|
| 83 | |
---|
[146] | 84 | CHARACTER (LEN=5) :: myid_char_save |
---|
[1] | 85 | CHARACTER (LEN=10) :: binary_version, version_on_file |
---|
| 86 | CHARACTER (LEN=20) :: field_chr |
---|
| 87 | |
---|
[216] | 88 | INTEGER :: files_to_be_opened, i, j, k, myid_on_file, & |
---|
[147] | 89 | numprocs_on_file, nxlc, nxlf, nxlpr, nxl_on_file, nxrc, nxrf, & |
---|
| 90 | nxrpr, nxr_on_file, nync, nynf, nynpr, nyn_on_file, nysc, & |
---|
| 91 | nysf, nyspr, nys_on_file, nzb_on_file, nzt_on_file, offset_x, & |
---|
[216] | 92 | offset_y, shift_x, shift_y |
---|
[1] | 93 | |
---|
[216] | 94 | INTEGER, DIMENSION(numprocs_previous_run) :: file_list, overlap_count |
---|
[146] | 95 | |
---|
[216] | 96 | INTEGER, DIMENSION(numprocs_previous_run,1000) :: nxlfa, nxrfa, nynfa, & |
---|
| 97 | nysfa, offset_xa, & |
---|
| 98 | offset_ya |
---|
| 99 | REAL :: rdummy |
---|
| 100 | |
---|
[146] | 101 | REAL, DIMENSION(:,:), ALLOCATABLE :: tmp_2d |
---|
[216] | 102 | REAL, DIMENSION(:,:,:), ALLOCATABLE :: tmp_3d, tmp_3dwul, tmp_3dwun, & |
---|
| 103 | tmp_3dwur, tmp_3dwus, tmp_3dwvl, & |
---|
| 104 | tmp_3dwvn, tmp_3dwvr, tmp_3dwvs, & |
---|
| 105 | tmp_3dwwl, tmp_3dwwn, tmp_3dwwr, & |
---|
| 106 | tmp_3dwws |
---|
[146] | 107 | REAL, DIMENSION(:,:,:,:), ALLOCATABLE :: tmp_4d |
---|
| 108 | |
---|
| 109 | |
---|
[1] | 110 | ! |
---|
[146] | 111 | !-- Read data from previous model run. |
---|
[1] | 112 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'start' ) |
---|
| 113 | |
---|
| 114 | ! |
---|
[146] | 115 | !-- Check which of the restart files contain data needed for the subdomain |
---|
| 116 | !-- of this PE |
---|
| 117 | files_to_be_opened = 0 |
---|
[143] | 118 | |
---|
[146] | 119 | DO i = 1, numprocs_previous_run |
---|
[216] | 120 | ! |
---|
| 121 | !-- Store array bounds of the previous run ("pr") in temporary scalars |
---|
[147] | 122 | nxlpr = hor_index_bounds_previous_run(1,i-1) |
---|
| 123 | nxrpr = hor_index_bounds_previous_run(2,i-1) |
---|
| 124 | nyspr = hor_index_bounds_previous_run(3,i-1) |
---|
| 125 | nynpr = hor_index_bounds_previous_run(4,i-1) |
---|
| 126 | |
---|
[143] | 127 | ! |
---|
[147] | 128 | !-- Determine the offsets. They may be non-zero in case that the total domain |
---|
| 129 | !-- on file is smaller than the current total domain. |
---|
| 130 | offset_x = ( nxl / ( nx_on_file + 1 ) ) * ( nx_on_file + 1 ) |
---|
| 131 | offset_y = ( nys / ( ny_on_file + 1 ) ) * ( ny_on_file + 1 ) |
---|
| 132 | |
---|
| 133 | ! |
---|
[216] | 134 | !-- Start with this offset and then check, if the subdomain on file |
---|
| 135 | !-- matches another time(s) in the current subdomain by shifting it |
---|
| 136 | !-- for nx_on_file+1, ny_on_file+1 respectively |
---|
[667] | 137 | |
---|
[216] | 138 | shift_y = 0 |
---|
[667] | 139 | j = 0 |
---|
| 140 | DO WHILE ( nyspr+shift_y <= nyn-offset_y ) |
---|
| 141 | |
---|
| 142 | IF ( nynpr+shift_y >= nys-offset_y ) THEN |
---|
[146] | 143 | |
---|
[667] | 144 | shift_x = 0 |
---|
| 145 | DO WHILE ( nxlpr+shift_x <= nxr-offset_x ) |
---|
| 146 | |
---|
| 147 | IF ( nxrpr+shift_x >= nxl-offset_x ) THEN |
---|
| 148 | j = j +1 |
---|
| 149 | IF ( j > 1000 ) THEN |
---|
[147] | 150 | ! |
---|
[667] | 151 | !-- Array bound exceeded |
---|
| 152 | message_string = 'data from subdomain of previous' // & |
---|
| 153 | ' run mapped more than 1000 times' |
---|
| 154 | CALL message( 'read_3d_binary', 'PA0284', 2, 2, -1, & |
---|
| 155 | 6, 1 ) |
---|
| 156 | ENDIF |
---|
[147] | 157 | |
---|
[667] | 158 | IF ( j == 1 ) THEN |
---|
| 159 | files_to_be_opened = files_to_be_opened + 1 |
---|
| 160 | file_list(files_to_be_opened) = i-1 |
---|
| 161 | ENDIF |
---|
| 162 | |
---|
| 163 | offset_xa(files_to_be_opened,j) = offset_x + shift_x |
---|
| 164 | offset_ya(files_to_be_opened,j) = offset_y + shift_y |
---|
[147] | 165 | ! |
---|
[667] | 166 | !-- Index bounds of overlapping data |
---|
| 167 | nxlfa(files_to_be_opened,j) = MAX( nxl-offset_x-shift_x, nxlpr ) |
---|
| 168 | nxrfa(files_to_be_opened,j) = MIN( nxr-offset_x-shift_x, nxrpr ) |
---|
| 169 | nysfa(files_to_be_opened,j) = MAX( nys-offset_y-shift_y, nyspr ) |
---|
| 170 | nynfa(files_to_be_opened,j) = MIN( nyn-offset_y-shift_y, nynpr ) |
---|
[147] | 171 | |
---|
[667] | 172 | ENDIF |
---|
[147] | 173 | |
---|
[667] | 174 | shift_x = shift_x + ( nx_on_file + 1 ) |
---|
| 175 | ENDDO |
---|
| 176 | |
---|
| 177 | ENDIF |
---|
| 178 | |
---|
| 179 | shift_y = shift_y + ( ny_on_file + 1 ) |
---|
[216] | 180 | ENDDO |
---|
[667] | 181 | |
---|
[216] | 182 | IF ( j > 0 ) overlap_count(files_to_be_opened) = j |
---|
[147] | 183 | |
---|
| 184 | ! |
---|
[216] | 185 | !-- Test output, to be removed later |
---|
| 186 | IF ( j > 0 ) THEN |
---|
| 187 | WRITE (9,*) '*** reading from file: ', i, j, ' times' |
---|
[667] | 188 | WRITE (9,*) ' nxl = ', nxl, ' nxr = ', nxr, ' nys = ', & |
---|
| 189 | nys, ' nyn = ', nyn |
---|
[216] | 190 | WRITE (9,*) ' ' |
---|
| 191 | DO k = 1, j |
---|
| 192 | WRITE (9,*) 'k = ', k |
---|
[667] | 193 | WRITE (9,'(6(A,I4))') 'nxlfa = ', nxlfa(files_to_be_opened,k),& |
---|
| 194 | ' nxrfa = ', nxrfa(files_to_be_opened,k), & |
---|
| 195 | ' offset_xa = ', offset_xa(files_to_be_opened,k), & |
---|
| 196 | ' nysfa = ', nysfa(files_to_be_opened,k), & |
---|
| 197 | ' nynfa = ', nynfa(files_to_be_opened,k), & |
---|
| 198 | ' offset_ya = ', offset_ya(files_to_be_opened,k) |
---|
[216] | 199 | ENDDO |
---|
[147] | 200 | CALL local_flush( 9 ) |
---|
| 201 | ENDIF |
---|
| 202 | |
---|
[667] | 203 | |
---|
[146] | 204 | ENDDO |
---|
[667] | 205 | |
---|
[147] | 206 | ! |
---|
| 207 | !-- Save the id-string of the current process, since myid_char may now be used |
---|
| 208 | !-- to open files created by PEs with other id. |
---|
[667] | 209 | myid_char_save = myid_char |
---|
[146] | 210 | |
---|
[147] | 211 | ! |
---|
| 212 | !-- Test output (remove later) |
---|
[667] | 213 | |
---|
[146] | 214 | DO i = 1, numprocs_previous_run |
---|
| 215 | WRITE (9,*) 'i=',i-1, ' ibs= ',hor_index_bounds_previous_run(1:4,i-1) |
---|
| 216 | ENDDO |
---|
| 217 | CALL local_flush( 9 ) |
---|
| 218 | |
---|
| 219 | IF ( files_to_be_opened /= 1 .OR. numprocs /= numprocs_previous_run ) & |
---|
| 220 | THEN |
---|
[274] | 221 | WRITE( message_string, * ) 'number of PEs or virtual PE-grid changed ', & |
---|
| 222 | 'in restart run& PE', myid, ' will read from files ', & |
---|
| 223 | file_list(1:files_to_be_opened) |
---|
[257] | 224 | CALL message( 'read_3d_binary', 'PA0285', 0, 0, 0, 6, 0 ) |
---|
[1] | 225 | ENDIF |
---|
| 226 | |
---|
| 227 | ! |
---|
[146] | 228 | !-- Read data from all restart files determined above |
---|
| 229 | DO i = 1, files_to_be_opened |
---|
[1] | 230 | |
---|
[146] | 231 | j = file_list(i) |
---|
| 232 | ! |
---|
| 233 | !-- Set the filename (underscore followed by four digit processor id) |
---|
| 234 | WRITE (myid_char,'(''_'',I4.4)') j |
---|
| 235 | WRITE (9,*) 'myid=',myid,' opening file "',myid_char,'"' |
---|
| 236 | CALL local_flush( 9 ) |
---|
[1] | 237 | |
---|
[146] | 238 | ! |
---|
| 239 | !-- Open the restart file. If this file has been created by PE0 (_0000), |
---|
| 240 | !-- the global variables at the beginning of the file have to be skipped |
---|
| 241 | !-- first. |
---|
| 242 | CALL check_open( 13 ) |
---|
[147] | 243 | WRITE (9,*) 'before skipping' |
---|
| 244 | CALL local_flush( 9 ) |
---|
[146] | 245 | IF ( j == 0 ) CALL skip_var_list |
---|
[147] | 246 | WRITE (9,*) 'skipping done' |
---|
| 247 | CALL local_flush( 9 ) |
---|
[1] | 248 | |
---|
[146] | 249 | ! |
---|
| 250 | !-- First compare the version numbers |
---|
| 251 | READ ( 13 ) version_on_file |
---|
| 252 | binary_version = '3.1' |
---|
| 253 | IF ( TRIM( version_on_file ) /= TRIM( binary_version ) ) THEN |
---|
[274] | 254 | WRITE( message_string, * ) 'version mismatch concerning data ', & |
---|
| 255 | 'from prior run', & |
---|
| 256 | '&version on file = "', TRIM( version_on_file ), '"', & |
---|
| 257 | '&version in program = "', TRIM( binary_version ), '"' |
---|
[257] | 258 | CALL message( 'read_3d_binary', 'PA0286', 1, 2, 0, 6, 0 ) |
---|
[146] | 259 | ENDIF |
---|
| 260 | |
---|
| 261 | ! |
---|
| 262 | !-- Read number of processors, processor-id, and array ranges. |
---|
| 263 | !-- Compare the array ranges with those stored in the index bound array. |
---|
| 264 | READ ( 13 ) numprocs_on_file, myid_on_file, nxl_on_file, nxr_on_file, & |
---|
| 265 | nys_on_file, nyn_on_file, nzb_on_file, nzt_on_file |
---|
| 266 | |
---|
| 267 | IF ( nxl_on_file /= hor_index_bounds_previous_run(1,j) ) THEN |
---|
[274] | 268 | WRITE( message_string, * ) 'problem with index bound nxl on ', & |
---|
| 269 | 'restart file "', myid_char, '"', & |
---|
| 270 | '&nxl = ', nxl_on_file, ' but it should be', & |
---|
| 271 | '&= ', hor_index_bounds_previous_run(1,j), & |
---|
| 272 | '&from the index bound information array' |
---|
[277] | 273 | CALL message( 'read_3d_binary', 'PA0287', 2, 2, -1, 6, 1 ) |
---|
[146] | 274 | ENDIF |
---|
[1] | 275 | |
---|
[146] | 276 | IF ( nxr_on_file /= hor_index_bounds_previous_run(2,j) ) THEN |
---|
[274] | 277 | WRITE( message_string, * ) 'problem with index bound nxr on ', & |
---|
| 278 | 'restart file "', myid_char, '"' , & |
---|
| 279 | '&nxr = ', nxr_on_file, ' but it should be', & |
---|
| 280 | '&= ', hor_index_bounds_previous_run(2,j), & |
---|
| 281 | '&from the index bound information array' |
---|
[277] | 282 | CALL message( 'read_3d_binary', 'PA0288', 2, 2, -1, 6, 1 ) |
---|
[257] | 283 | |
---|
[146] | 284 | ENDIF |
---|
[1] | 285 | |
---|
[146] | 286 | IF ( nys_on_file /= hor_index_bounds_previous_run(3,j) ) THEN |
---|
[274] | 287 | WRITE( message_string, * ) 'problem with index bound nys on ', & |
---|
| 288 | 'restart file "', myid_char, '"', & |
---|
| 289 | '&nys = ', nys_on_file, ' but it should be', & |
---|
| 290 | '&= ', hor_index_bounds_previous_run(3,j), & |
---|
[257] | 291 | '&from the index bound information array' |
---|
[277] | 292 | CALL message( 'read_3d_binary', 'PA0289', 2, 2, -1, 6, 1 ) |
---|
[146] | 293 | ENDIF |
---|
[1] | 294 | |
---|
[146] | 295 | IF ( nyn_on_file /= hor_index_bounds_previous_run(4,j) ) THEN |
---|
[274] | 296 | WRITE( message_string, * ) 'problem with index bound nyn on ', & |
---|
| 297 | 'restart file "', myid_char, '"', & |
---|
| 298 | '&nyn = ', nyn_on_file, ' but it should be', & |
---|
| 299 | '&= ', hor_index_bounds_previous_run(4,j), & |
---|
| 300 | '&from the index bound information array' |
---|
[277] | 301 | CALL message( 'read_3d_binary', 'PA0290', 2, 2, -1, 6, 1 ) |
---|
[146] | 302 | ENDIF |
---|
[1] | 303 | |
---|
[146] | 304 | IF ( nzb_on_file /= nzb ) THEN |
---|
[257] | 305 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
| 306 | '&from prior run on PE ', myid, & |
---|
| 307 | '&nzb on file = ', nzb_on_file, & |
---|
| 308 | '&nzb = ', nzb |
---|
| 309 | CALL message( 'read_3d_binary', 'PA0291', 1, 2, 0, 6, 0 ) |
---|
[146] | 310 | ENDIF |
---|
[1] | 311 | |
---|
[146] | 312 | IF ( nzt_on_file /= nzt ) THEN |
---|
[257] | 313 | WRITE( message_string, * ) 'mismatch between actual data and data ', & |
---|
| 314 | '&from prior run on PE ', myid, & |
---|
| 315 | '&nzt on file = ', nzt_on_file, & |
---|
| 316 | '&nzt = ', nzt |
---|
| 317 | CALL message( 'read_3d_binary', 'PA0292', 1, 2, 0, 6, 0 ) |
---|
[146] | 318 | ENDIF |
---|
[1] | 319 | |
---|
| 320 | ! |
---|
[146] | 321 | !-- Allocate temporary arrays sized as the arrays on the restart file |
---|
[667] | 322 | ALLOCATE( tmp_2d(nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 323 | nxl_on_file-nbgp:nxr_on_file+nbgp), & |
---|
| 324 | tmp_3d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 325 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[1] | 326 | |
---|
| 327 | ! |
---|
[146] | 328 | !-- Read arrays |
---|
| 329 | !-- ATTENTION: If the following read commands have been altered, the |
---|
| 330 | !-- ---------- version number of the variable binary_version must be altered, |
---|
| 331 | !-- too. Furthermore, the output list of arrays in write_3d_binary |
---|
| 332 | !-- must also be altered accordingly. |
---|
| 333 | READ ( 13 ) field_chr |
---|
| 334 | DO WHILE ( TRIM( field_chr ) /= '*** end ***' ) |
---|
[1] | 335 | |
---|
[216] | 336 | ! |
---|
| 337 | !-- Map data on file as often as needed (data are read only for k=1) |
---|
| 338 | DO k = 1, overlap_count(i) |
---|
[1] | 339 | |
---|
[216] | 340 | ! |
---|
| 341 | !-- Get the index range of the subdomain on file which overlap with the |
---|
| 342 | !-- current subdomain |
---|
| 343 | nxlf = nxlfa(i,k) |
---|
| 344 | nxlc = nxlfa(i,k) + offset_xa(i,k) |
---|
| 345 | nxrf = nxrfa(i,k) |
---|
| 346 | nxrc = nxrfa(i,k) + offset_xa(i,k) |
---|
| 347 | nysf = nysfa(i,k) |
---|
| 348 | nysc = nysfa(i,k) + offset_ya(i,k) |
---|
| 349 | nynf = nynfa(i,k) |
---|
| 350 | nync = nynfa(i,k) + offset_ya(i,k) |
---|
| 351 | |
---|
| 352 | |
---|
| 353 | WRITE (9,*) 'var = ', field_chr |
---|
| 354 | CALL local_flush( 9 ) |
---|
| 355 | |
---|
| 356 | SELECT CASE ( TRIM( field_chr ) ) |
---|
| 357 | |
---|
| 358 | CASE ( 'e' ) |
---|
| 359 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 360 | e(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 361 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[1] | 362 | |
---|
[216] | 363 | CASE ( 'e_av' ) |
---|
| 364 | IF ( .NOT. ALLOCATED( e_av ) ) THEN |
---|
[667] | 365 | ALLOCATE( e_av(nzb:nzt+1,nys-nbgp:nyn+nbgp,nxl-nbgp:nxr+nbgp) ) |
---|
[216] | 366 | ENDIF |
---|
| 367 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 368 | e_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 369 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 370 | |
---|
[216] | 371 | CASE ( 'e_m' ) |
---|
| 372 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 373 | e_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 374 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 375 | |
---|
[216] | 376 | CASE ( 'iran' ) ! matching random numbers is still unresolved |
---|
| 377 | ! issue |
---|
| 378 | IF ( k == 1 ) READ ( 13 ) iran, iran_part |
---|
[146] | 379 | |
---|
[216] | 380 | CASE ( 'kh' ) |
---|
| 381 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 382 | kh(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 383 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 384 | |
---|
[216] | 385 | CASE ( 'kh_m' ) |
---|
| 386 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 387 | kh_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 388 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 389 | |
---|
[216] | 390 | CASE ( 'km' ) |
---|
| 391 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 392 | km(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 393 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 394 | |
---|
[216] | 395 | CASE ( 'km_m' ) |
---|
| 396 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 397 | km_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 398 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 399 | |
---|
[771] | 400 | CASE ( 'lpt_av' ) |
---|
| 401 | IF ( .NOT. ALLOCATED( lpt_av ) ) THEN |
---|
| 402 | ALLOCATE( lpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
| 403 | ENDIF |
---|
| 404 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
| 405 | lpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 406 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
| 407 | |
---|
[216] | 408 | CASE ( 'lwp_av' ) |
---|
| 409 | IF ( .NOT. ALLOCATED( lwp_av ) ) THEN |
---|
[667] | 410 | ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 411 | ENDIF |
---|
| 412 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 413 | lwp_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 414 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 415 | |
---|
[216] | 416 | CASE ( 'p' ) |
---|
| 417 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 418 | p(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 419 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 420 | |
---|
[216] | 421 | CASE ( 'p_av' ) |
---|
| 422 | IF ( .NOT. ALLOCATED( p_av ) ) THEN |
---|
[667] | 423 | ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 424 | ENDIF |
---|
| 425 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 426 | p_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 427 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 428 | |
---|
[216] | 429 | CASE ( 'pc_av' ) |
---|
| 430 | IF ( .NOT. ALLOCATED( pc_av ) ) THEN |
---|
[667] | 431 | ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 432 | ENDIF |
---|
| 433 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 434 | pc_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 435 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 436 | |
---|
[216] | 437 | CASE ( 'pr_av' ) |
---|
| 438 | IF ( .NOT. ALLOCATED( pr_av ) ) THEN |
---|
[667] | 439 | ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 440 | ENDIF |
---|
| 441 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 442 | pr_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 443 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 444 | |
---|
[216] | 445 | CASE ( 'precipitation_amount' ) |
---|
| 446 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 447 | precipitation_amount(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 448 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 449 | |
---|
[216] | 450 | CASE ( 'precipitation_rate_a' ) |
---|
| 451 | IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN |
---|
[667] | 452 | ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 453 | ENDIF |
---|
| 454 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 455 | precipitation_rate_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 456 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 457 | |
---|
[216] | 458 | CASE ( 'pt' ) |
---|
| 459 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 460 | pt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 461 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 462 | |
---|
[216] | 463 | CASE ( 'pt_av' ) |
---|
| 464 | IF ( .NOT. ALLOCATED( pt_av ) ) THEN |
---|
[667] | 465 | ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 466 | ENDIF |
---|
| 467 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 468 | pt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 469 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 470 | |
---|
[216] | 471 | CASE ( 'pt_m' ) |
---|
| 472 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 473 | pt_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 474 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 475 | |
---|
[216] | 476 | CASE ( 'q' ) |
---|
| 477 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 478 | q(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 479 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 480 | |
---|
[216] | 481 | CASE ( 'q_av' ) |
---|
| 482 | IF ( .NOT. ALLOCATED( q_av ) ) THEN |
---|
[667] | 483 | ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) |
---|
[216] | 484 | ENDIF |
---|
| 485 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 486 | q_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 487 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 488 | |
---|
[216] | 489 | CASE ( 'q_m' ) |
---|
| 490 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 491 | q_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 492 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 493 | |
---|
[216] | 494 | CASE ( 'ql' ) |
---|
| 495 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 496 | ql(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 497 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 498 | |
---|
[216] | 499 | CASE ( 'ql_av' ) |
---|
| 500 | IF ( .NOT. ALLOCATED( ql_av ) ) THEN |
---|
[667] | 501 | ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 502 | ENDIF |
---|
| 503 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 504 | ql_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 505 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 506 | |
---|
[216] | 507 | CASE ( 'ql_c_av' ) |
---|
| 508 | IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN |
---|
[667] | 509 | ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 510 | ENDIF |
---|
| 511 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 512 | ql_c_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 513 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 514 | |
---|
[216] | 515 | CASE ( 'ql_v_av' ) |
---|
| 516 | IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN |
---|
[667] | 517 | ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 518 | ENDIF |
---|
| 519 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 520 | ql_v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 521 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 522 | |
---|
[216] | 523 | CASE ( 'ql_vp_av' ) |
---|
| 524 | IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN |
---|
[667] | 525 | ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 526 | ENDIF |
---|
| 527 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 528 | ql_vp_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 529 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 530 | |
---|
[216] | 531 | CASE ( 'qs' ) |
---|
| 532 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 533 | qs(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 534 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 535 | |
---|
[216] | 536 | CASE ( 'qsws' ) |
---|
| 537 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 538 | qsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 539 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 540 | |
---|
[216] | 541 | CASE ( 'qsws_m' ) |
---|
| 542 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 543 | qsws_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 544 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 545 | |
---|
[354] | 546 | CASE ( 'qsws_av' ) |
---|
| 547 | IF ( .NOT. ALLOCATED( qsws_av ) ) THEN |
---|
[667] | 548 | ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 549 | ENDIF |
---|
| 550 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 551 | qsws_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 552 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[354] | 553 | |
---|
[216] | 554 | CASE ( 'qswst' ) |
---|
| 555 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 556 | qswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 557 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 558 | |
---|
[216] | 559 | CASE ( 'qswst_m' ) |
---|
| 560 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 561 | qswst_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 562 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 563 | |
---|
[216] | 564 | CASE ( 'qv_av' ) |
---|
| 565 | IF ( .NOT. ALLOCATED( qv_av ) ) THEN |
---|
[667] | 566 | ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 567 | ENDIF |
---|
| 568 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 569 | qv_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 570 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 571 | |
---|
[216] | 572 | CASE ( 'random_iv' ) ! still unresolved issue |
---|
| 573 | IF ( k == 1 ) READ ( 13 ) random_iv |
---|
| 574 | IF ( k == 1 ) READ ( 13 ) random_iy |
---|
[146] | 575 | |
---|
[216] | 576 | CASE ( 'rho_av' ) |
---|
| 577 | IF ( .NOT. ALLOCATED( rho_av ) ) THEN |
---|
[667] | 578 | ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 579 | ENDIF |
---|
| 580 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 581 | rho_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 582 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 583 | |
---|
[216] | 584 | CASE ( 'rif' ) |
---|
| 585 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 586 | rif(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 587 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 588 | |
---|
[216] | 589 | CASE ( 'rif_m' ) |
---|
| 590 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 591 | rif_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 592 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 593 | |
---|
[216] | 594 | CASE ( 'rif_wall' ) |
---|
| 595 | IF ( k == 1 ) THEN |
---|
[667] | 596 | ALLOCATE( tmp_4d(nzb:nzt+1,nys_on_file-nbgp:nyn_on_file+nbgp, & |
---|
| 597 | nxl_on_file-nbgp:nxr_on_file+nbgp,1:4) ) |
---|
[216] | 598 | READ ( 13 ) tmp_4d |
---|
| 599 | ENDIF |
---|
[667] | 600 | rif_wall(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp,:) = & |
---|
| 601 | tmp_4d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp,:) |
---|
[146] | 602 | |
---|
[216] | 603 | CASE ( 's_av' ) |
---|
| 604 | IF ( .NOT. ALLOCATED( s_av ) ) THEN |
---|
[667] | 605 | ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) |
---|
[216] | 606 | ENDIF |
---|
| 607 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 608 | s_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 609 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 610 | |
---|
[216] | 611 | CASE ( 'sa' ) |
---|
| 612 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 613 | sa(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 614 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 615 | |
---|
[216] | 616 | CASE ( 'sa_av' ) |
---|
| 617 | IF ( .NOT. ALLOCATED( sa_av ) ) THEN |
---|
[667] | 618 | ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 619 | ENDIF |
---|
| 620 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 621 | sa_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 622 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 623 | |
---|
[216] | 624 | CASE ( 'saswsb' ) |
---|
| 625 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 626 | saswsb(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 627 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 628 | |
---|
[216] | 629 | CASE ( 'saswst' ) |
---|
| 630 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 631 | saswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 632 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 633 | |
---|
[216] | 634 | CASE ( 'shf' ) |
---|
| 635 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 636 | shf(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 637 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 638 | |
---|
[216] | 639 | CASE ( 'shf_m' ) |
---|
| 640 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 641 | shf_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 642 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[354] | 643 | CASE ( 'shf_av' ) |
---|
| 644 | IF ( .NOT. ALLOCATED( shf_av ) ) THEN |
---|
[667] | 645 | ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) |
---|
[354] | 646 | ENDIF |
---|
| 647 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 648 | shf_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 649 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 650 | CASE ( 'spectrum_x' ) |
---|
| 651 | IF ( k == 1 ) THEN |
---|
| 652 | IF ( nx_on_file /= nx ) THEN |
---|
[274] | 653 | message_string = 'read_3d_binary: spectrum_x ' // & |
---|
| 654 | 'on restart file ignored because' // & |
---|
| 655 | '&total numbers of grid points (nx) ' // & |
---|
| 656 | 'do not match' |
---|
| 657 | CALL message( 'read_3d_binary', 'PA0293',& |
---|
| 658 | 0, 1, 0, 6, 0 ) |
---|
[216] | 659 | READ ( 13 ) rdummy |
---|
| 660 | ELSE |
---|
| 661 | READ ( 13 ) spectrum_x |
---|
| 662 | ENDIF |
---|
| 663 | ENDIF |
---|
[146] | 664 | |
---|
[216] | 665 | CASE ( 'spectrum_y' ) |
---|
| 666 | IF ( k == 1 ) THEN |
---|
| 667 | IF ( ny_on_file /= ny ) THEN |
---|
[274] | 668 | message_string = 'read_3d_binary: spectrum_y ' // & |
---|
| 669 | 'on restart file ignored because' // & |
---|
| 670 | '&total numbers of grid points (ny) '// & |
---|
| 671 | 'do not match' |
---|
| 672 | CALL message( 'read_3d_binary', 'PA0294', & |
---|
| 673 | 0, 1, 0, 6, 0 ) |
---|
| 674 | READ ( 13 ) rdummy |
---|
[216] | 675 | ELSE |
---|
| 676 | READ ( 13 ) spectrum_y |
---|
| 677 | ENDIF |
---|
| 678 | ENDIF |
---|
[146] | 679 | |
---|
[216] | 680 | CASE ( 'ts' ) |
---|
| 681 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 682 | ts(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 683 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 684 | |
---|
[216] | 685 | CASE ( 'ts_av' ) |
---|
| 686 | IF ( .NOT. ALLOCATED( ts_av ) ) THEN |
---|
[667] | 687 | ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 688 | ENDIF |
---|
| 689 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 690 | ts_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 691 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 692 | |
---|
[216] | 693 | CASE ( 'tswst' ) |
---|
| 694 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 695 | tswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 696 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 697 | |
---|
[216] | 698 | CASE ( 'tswst_m' ) |
---|
| 699 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 700 | tswst_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 701 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 702 | |
---|
[216] | 703 | CASE ( 'u' ) |
---|
| 704 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 705 | u(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 706 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 707 | |
---|
[216] | 708 | CASE ( 'u_av' ) |
---|
| 709 | IF ( .NOT. ALLOCATED( u_av ) ) THEN |
---|
[667] | 710 | ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 711 | ENDIF |
---|
| 712 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 713 | u_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 714 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 715 | |
---|
[216] | 716 | CASE ( 'u_m' ) |
---|
| 717 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 718 | u_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 719 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 720 | |
---|
[216] | 721 | CASE ( 'u_m_l' ) |
---|
| 722 | IF ( k == 1 ) THEN |
---|
| 723 | ALLOCATE( tmp_3dwul(nzb:nzt+1, & |
---|
[667] | 724 | nys_on_file-nbgp:nyn_on_file+nbgp,1:2) ) |
---|
[216] | 725 | READ ( 13 ) tmp_3dwul |
---|
| 726 | ENDIF |
---|
| 727 | IF ( outflow_l ) THEN |
---|
[667] | 728 | u_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwul(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 729 | ENDIF |
---|
[146] | 730 | |
---|
[216] | 731 | CASE ( 'u_m_n' ) |
---|
| 732 | IF ( k == 1 ) THEN |
---|
| 733 | ALLOCATE( tmp_3dwun(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 734 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 735 | READ ( 13 ) tmp_3dwun |
---|
| 736 | ENDIF |
---|
| 737 | IF ( outflow_n ) THEN |
---|
[667] | 738 | u_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwun(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 739 | ENDIF |
---|
[146] | 740 | |
---|
[216] | 741 | CASE ( 'u_m_r' ) |
---|
| 742 | IF ( k == 1 ) THEN |
---|
| 743 | ALLOCATE( tmp_3dwur(nzb:nzt+1,& |
---|
[667] | 744 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 745 | READ ( 13 ) tmp_3dwur |
---|
| 746 | ENDIF |
---|
| 747 | IF ( outflow_r ) THEN |
---|
[667] | 748 | u_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwur(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 749 | ENDIF |
---|
[146] | 750 | |
---|
[216] | 751 | CASE ( 'u_m_s' ) |
---|
| 752 | IF ( k == 1 ) THEN |
---|
| 753 | ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1, & |
---|
[667] | 754 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 755 | READ ( 13 ) tmp_3dwus |
---|
| 756 | ENDIF |
---|
| 757 | IF ( outflow_s ) THEN |
---|
[667] | 758 | u_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwus(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 759 | ENDIF |
---|
[146] | 760 | |
---|
[216] | 761 | CASE ( 'us' ) |
---|
| 762 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 763 | us(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 764 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 765 | |
---|
[216] | 766 | CASE ( 'usws' ) |
---|
| 767 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 768 | usws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 769 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 770 | |
---|
[216] | 771 | CASE ( 'uswst' ) |
---|
| 772 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 773 | uswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 774 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 775 | |
---|
[216] | 776 | CASE ( 'usws_m' ) |
---|
| 777 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 778 | usws_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 779 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 780 | |
---|
[216] | 781 | CASE ( 'uswst_m' ) |
---|
| 782 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 783 | uswst_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 784 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 785 | |
---|
[216] | 786 | CASE ( 'us_av' ) |
---|
| 787 | IF ( .NOT. ALLOCATED( us_av ) ) THEN |
---|
[667] | 788 | ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 789 | ENDIF |
---|
| 790 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 791 | us_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 792 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 793 | |
---|
[216] | 794 | CASE ( 'v' ) |
---|
| 795 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 796 | v(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 797 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 798 | |
---|
[216] | 799 | CASE ( 'v_av' ) |
---|
| 800 | IF ( .NOT. ALLOCATED( v_av ) ) THEN |
---|
[667] | 801 | ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 802 | ENDIF |
---|
| 803 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 804 | v_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 805 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 806 | |
---|
[216] | 807 | CASE ( 'v_m' ) |
---|
| 808 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 809 | v_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 810 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 811 | |
---|
[216] | 812 | CASE ( 'v_m_l' ) |
---|
| 813 | IF ( k == 1 ) THEN |
---|
| 814 | ALLOCATE( tmp_3dwvl(nzb:nzt+1,& |
---|
[667] | 815 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
[216] | 816 | READ ( 13 ) tmp_3dwvl |
---|
| 817 | ENDIF |
---|
| 818 | IF ( outflow_l ) THEN |
---|
[667] | 819 | v_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvl(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 820 | ENDIF |
---|
[146] | 821 | |
---|
[216] | 822 | CASE ( 'v_m_n' ) |
---|
| 823 | IF ( k == 1 ) THEN |
---|
| 824 | ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 825 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 826 | READ ( 13 ) tmp_3dwvn |
---|
| 827 | ENDIF |
---|
| 828 | IF ( outflow_n ) THEN |
---|
[667] | 829 | v_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 830 | ENDIF |
---|
[146] | 831 | |
---|
[216] | 832 | CASE ( 'v_m_r' ) |
---|
| 833 | IF ( k == 1 ) THEN |
---|
| 834 | ALLOCATE( tmp_3dwvr(nzb:nzt+1,& |
---|
[667] | 835 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 836 | READ ( 13 ) tmp_3dwvr |
---|
| 837 | ENDIF |
---|
| 838 | IF ( outflow_r ) THEN |
---|
[667] | 839 | v_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwvr(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 840 | ENDIF |
---|
[146] | 841 | |
---|
[216] | 842 | CASE ( 'v_m_s' ) |
---|
| 843 | IF ( k == 1 ) THEN |
---|
| 844 | ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2, & |
---|
[667] | 845 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 846 | READ ( 13 ) tmp_3dwvs |
---|
| 847 | ENDIF |
---|
| 848 | IF ( outflow_s ) THEN |
---|
[667] | 849 | v_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwvs(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 850 | ENDIF |
---|
[146] | 851 | |
---|
[216] | 852 | CASE ( 'vpt' ) |
---|
| 853 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 854 | vpt(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 855 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 856 | |
---|
[216] | 857 | CASE ( 'vpt_av' ) |
---|
| 858 | IF ( .NOT. ALLOCATED( vpt_av ) ) THEN |
---|
[667] | 859 | ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 860 | ENDIF |
---|
| 861 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 862 | vpt_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 863 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 864 | |
---|
[216] | 865 | CASE ( 'vpt_m' ) |
---|
| 866 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 867 | vpt_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 868 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 869 | |
---|
[216] | 870 | CASE ( 'vsws' ) |
---|
| 871 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 872 | vsws(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 873 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 874 | |
---|
[216] | 875 | CASE ( 'vswst' ) |
---|
| 876 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 877 | vswst(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 878 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 879 | |
---|
[216] | 880 | CASE ( 'vsws_m' ) |
---|
| 881 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 882 | vsws_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 883 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 884 | |
---|
[216] | 885 | CASE ( 'vswst_m' ) |
---|
| 886 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 887 | vswst_m(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 888 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 889 | |
---|
[216] | 890 | CASE ( 'w' ) |
---|
| 891 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 892 | w(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 893 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 894 | |
---|
[216] | 895 | CASE ( 'w_av' ) |
---|
| 896 | IF ( .NOT. ALLOCATED( w_av ) ) THEN |
---|
[667] | 897 | ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 898 | ENDIF |
---|
| 899 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 900 | w_av(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 901 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 902 | |
---|
[216] | 903 | CASE ( 'w_m' ) |
---|
| 904 | IF ( k == 1 ) READ ( 13 ) tmp_3d |
---|
[667] | 905 | w_m(:,nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 906 | tmp_3d(:,nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 907 | |
---|
[216] | 908 | CASE ( 'w_m_l' ) |
---|
| 909 | IF ( k == 1 ) THEN |
---|
| 910 | ALLOCATE( tmp_3dwwl(nzb:nzt+1,& |
---|
[667] | 911 | nys_on_file-nbgp:nyn_on_file+nbgp,0:1) ) |
---|
[216] | 912 | READ ( 13 ) tmp_3dwwl |
---|
| 913 | ENDIF |
---|
| 914 | IF ( outflow_l ) THEN |
---|
[667] | 915 | w_m_l(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwl(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 916 | ENDIF |
---|
[146] | 917 | |
---|
[216] | 918 | CASE ( 'w_m_n' ) |
---|
| 919 | IF ( k == 1 ) THEN |
---|
| 920 | ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny-1:ny, & |
---|
[667] | 921 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 922 | READ ( 13 ) tmp_3dwwn |
---|
| 923 | ENDIF |
---|
| 924 | IF ( outflow_n ) THEN |
---|
[667] | 925 | w_m_n(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwwn(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 926 | ENDIF |
---|
[146] | 927 | |
---|
[216] | 928 | CASE ( 'w_m_r' ) |
---|
| 929 | IF ( k == 1 ) THEN |
---|
| 930 | ALLOCATE( tmp_3dwwr(nzb:nzt+1,& |
---|
[667] | 931 | nys_on_file-nbgp:nyn_on_file+nbgp,nx-1:nx) ) |
---|
[216] | 932 | READ ( 13 ) tmp_3dwwr |
---|
| 933 | ENDIF |
---|
| 934 | IF ( outflow_r ) THEN |
---|
[667] | 935 | w_m_r(:,nysc-nbgp:nync+nbgp,:) = tmp_3dwwr(:,nysf-nbgp:nynf+nbgp,:) |
---|
[216] | 936 | ENDIF |
---|
[146] | 937 | |
---|
[216] | 938 | CASE ( 'w_m_s' ) |
---|
| 939 | IF ( k == 1 ) THEN |
---|
| 940 | ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, & |
---|
[667] | 941 | nxl_on_file-nbgp:nxr_on_file+nbgp) ) |
---|
[216] | 942 | READ ( 13 ) tmp_3dwws |
---|
| 943 | ENDIF |
---|
| 944 | IF ( outflow_s ) THEN |
---|
[667] | 945 | w_m_s(:,:,nxlc-nbgp:nxrc+nbgp) = tmp_3dwws(:,:,nxlf-nbgp:nxrf+nbgp) |
---|
[216] | 946 | ENDIF |
---|
| 947 | DEALLOCATE( tmp_3dwws ) |
---|
[146] | 948 | |
---|
[216] | 949 | CASE ( 'z0' ) |
---|
| 950 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 951 | z0(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 952 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 953 | |
---|
[216] | 954 | CASE ( 'z0_av' ) |
---|
| 955 | IF ( .NOT. ALLOCATED( z0_av ) ) THEN |
---|
[667] | 956 | ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) |
---|
[216] | 957 | ENDIF |
---|
| 958 | IF ( k == 1 ) READ ( 13 ) tmp_2d |
---|
[667] | 959 | z0_av(nysc-nbgp:nync+nbgp,nxlc-nbgp:nxrc+nbgp) = & |
---|
| 960 | tmp_2d(nysf-nbgp:nynf+nbgp,nxlf-nbgp:nxrf+nbgp) |
---|
[146] | 961 | |
---|
[216] | 962 | CASE DEFAULT |
---|
[257] | 963 | WRITE( message_string, * ) 'unknown field named "', & |
---|
| 964 | TRIM( field_chr ), '" found in', & |
---|
| 965 | '&data from prior run on PE ',myid |
---|
| 966 | CALL message( 'read_3d_binary', 'PA0295', 1, 2, 0, 6, 0 ) |
---|
| 967 | |
---|
[216] | 968 | END SELECT |
---|
| 969 | |
---|
| 970 | ENDDO ! overlap loop |
---|
| 971 | |
---|
[1] | 972 | ! |
---|
[216] | 973 | !-- Deallocate arrays needed for specific variables only |
---|
| 974 | IF ( ALLOCATED( tmp_3dwul ) ) DEALLOCATE( tmp_3dwul ) |
---|
| 975 | IF ( ALLOCATED( tmp_3dwun ) ) DEALLOCATE( tmp_3dwun ) |
---|
| 976 | IF ( ALLOCATED( tmp_3dwur ) ) DEALLOCATE( tmp_3dwur ) |
---|
| 977 | IF ( ALLOCATED( tmp_3dwus ) ) DEALLOCATE( tmp_3dwus ) |
---|
| 978 | IF ( ALLOCATED( tmp_3dwvl ) ) DEALLOCATE( tmp_3dwvl ) |
---|
| 979 | IF ( ALLOCATED( tmp_3dwvn ) ) DEALLOCATE( tmp_3dwvn ) |
---|
| 980 | IF ( ALLOCATED( tmp_3dwvr ) ) DEALLOCATE( tmp_3dwvr ) |
---|
| 981 | IF ( ALLOCATED( tmp_3dwvs ) ) DEALLOCATE( tmp_3dwvs ) |
---|
| 982 | IF ( ALLOCATED( tmp_3dwwl ) ) DEALLOCATE( tmp_3dwwl ) |
---|
| 983 | IF ( ALLOCATED( tmp_3dwwn ) ) DEALLOCATE( tmp_3dwwn ) |
---|
| 984 | IF ( ALLOCATED( tmp_3dwwr ) ) DEALLOCATE( tmp_3dwwr ) |
---|
| 985 | IF ( ALLOCATED( tmp_3dwws ) ) DEALLOCATE( tmp_3dwws ) |
---|
| 986 | IF ( ALLOCATED( tmp_4d ) ) DEALLOCATE( tmp_4d ) |
---|
| 987 | |
---|
| 988 | ! |
---|
[146] | 989 | !-- Read next character string |
---|
| 990 | READ ( 13 ) field_chr |
---|
[1] | 991 | |
---|
[146] | 992 | ENDDO ! loop over variables |
---|
[1] | 993 | |
---|
| 994 | ! |
---|
[146] | 995 | !-- Read user-defined restart data |
---|
[220] | 996 | CALL user_read_restart_data( i, nxlfa, nxl_on_file, nxrfa, nxr_on_file, & |
---|
| 997 | nynfa, nyn_on_file, nysfa, nys_on_file, & |
---|
| 998 | offset_xa, offset_ya, overlap_count(i), & |
---|
[216] | 999 | tmp_2d, tmp_3d ) |
---|
[145] | 1000 | |
---|
| 1001 | ! |
---|
[146] | 1002 | !-- Close the restart file |
---|
| 1003 | CALL close_file( 13 ) |
---|
| 1004 | |
---|
| 1005 | DEALLOCATE( tmp_2d, tmp_3d ) |
---|
| 1006 | |
---|
| 1007 | ENDDO ! loop over restart files |
---|
| 1008 | |
---|
| 1009 | |
---|
| 1010 | ! |
---|
| 1011 | !-- Restore the original filename for the restart file to be written |
---|
| 1012 | myid_char = myid_char_save |
---|
| 1013 | |
---|
| 1014 | |
---|
| 1015 | ! |
---|
[1] | 1016 | !-- End of time measuring for reading binary data |
---|
| 1017 | CALL cpu_log( log_point_s(14), 'read_3d_binary', 'stop' ) |
---|
| 1018 | |
---|
| 1019 | END SUBROUTINE read_3d_binary |
---|