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