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