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