Changeset 667 for palm/trunk/SOURCE/read_3d_binary.f90
 Timestamp:
 Dec 23, 2010 12:06:00 PM (12 years ago)
 Location:
 palm/trunk/SOURCE
 Files:

 2 edited
Legend:
 Unmodified
 Added
 Removed

palm/trunk/SOURCE

Property
svn:mergeinfo
set to
(toggle deleted branches)
/palm/branches/suehring 423666 /palm/branches/letzel/masked_output/SOURCE 296409

Property
svn:mergeinfo
set to
(toggle deleted branches)

palm/trunk/SOURCE/read_3d_binary.f90
r449 r667 4 4 ! Current revisions: 5 5 !  6 ! 6 ! +/ 1 replaced with +/ nbgp when swapping and allocating variables. 7 ! Bugfix: When using initializing_actions = 'cyclic_fill' in some cases 8 ! not the whole model domain was filled with data of the prerun. 7 9 ! 8 10 ! Former revisions: … … 128 130 ! matches another time(s) in the current subdomain by shifting it 129 131 ! for nx_on_file+1, ny_on_file+1 respectively 130 132 131 133 shift_y = 0 132 j = 0 ! counter for the number of files to be opened 133 134 DO WHILE ( nyspr+shift_y <= nynoffset_y .AND. & 135 nynpr+shift_y >= nysoffset_y ) 136 137 shift_x = 0 138 139 DO WHILE ( nxlpr+shift_x <= nxroffset_x .AND. & 140 nxrpr+shift_x >= nxloffset_x ) 141 142 j = j +1 143 144 IF ( j > 1000 ) THEN 145 ! 146 ! Array bound exceeded 147 message_string = 'data from subdomain of previous' // & 148 ' run mapped more than 1000 times' 149 CALL message( 'read_3d_binary', 'PA0284', 2, 2, 1, 6, 1 ) 150 151 ENDIF 152 153 IF ( j == 1 ) THEN 154 files_to_be_opened = files_to_be_opened + 1 155 file_list(files_to_be_opened) = i1 156 ENDIF 157 158 offset_xa(files_to_be_opened,j) = offset_x + shift_x 159 offset_ya(files_to_be_opened,j) = offset_y + shift_y 160 161 ! 162 ! Index bounds of overlapping data 163 nxlfa(files_to_be_opened,j) = MAX( nxloffset_xshift_x, nxlpr ) 164 nxrfa(files_to_be_opened,j) = MIN( nxroffset_xshift_x, nxrpr ) 165 nysfa(files_to_be_opened,j) = MAX( nysoffset_y, nyspr ) 166 nynfa(files_to_be_opened,j) = MIN( nynoffset_y, nynpr ) 167 168 shift_x = shift_x + ( nx_on_file + 1 ) 169 170 ENDDO 171 172 shift_y = shift_y + ( ny_on_file + 1 ) 173 134 j = 0 135 DO WHILE ( nyspr+shift_y <= nynoffset_y ) 136 137 IF ( nynpr+shift_y >= nysoffset_y ) THEN 138 139 shift_x = 0 140 DO WHILE ( nxlpr+shift_x <= nxroffset_x ) 141 142 IF ( nxrpr+shift_x >= nxloffset_x ) THEN 143 j = j +1 144 IF ( j > 1000 ) THEN 145 ! 146 ! Array bound exceeded 147 message_string = 'data from subdomain of previous' // & 148 ' run mapped more than 1000 times' 149 CALL message( 'read_3d_binary', 'PA0284', 2, 2, 1, & 150 6, 1 ) 151 ENDIF 152 153 IF ( j == 1 ) THEN 154 files_to_be_opened = files_to_be_opened + 1 155 file_list(files_to_be_opened) = i1 156 ENDIF 157 158 offset_xa(files_to_be_opened,j) = offset_x + shift_x 159 offset_ya(files_to_be_opened,j) = offset_y + shift_y 160 ! 161 ! Index bounds of overlapping data 162 nxlfa(files_to_be_opened,j) = MAX( nxloffset_xshift_x, nxlpr ) 163 nxrfa(files_to_be_opened,j) = MIN( nxroffset_xshift_x, nxrpr ) 164 nysfa(files_to_be_opened,j) = MAX( nysoffset_yshift_y, nyspr ) 165 nynfa(files_to_be_opened,j) = MIN( nynoffset_yshift_y, nynpr ) 166 167 ENDIF 168 169 shift_x = shift_x + ( nx_on_file + 1 ) 170 ENDDO 171 172 ENDIF 173 174 shift_y = shift_y + ( ny_on_file + 1 ) 174 175 ENDDO 175 176 176 177 IF ( j > 0 ) overlap_count(files_to_be_opened) = j 177 178 … … 180 181 IF ( j > 0 ) THEN 181 182 WRITE (9,*) '*** reading from file: ', i, j, ' times' 182 WRITE (9,*) ' nxl = ', nxl, ' nxr = ', nxr, ' nys = ', nys, ' nyn = ', nyn 183 WRITE (9,*) ' nxl = ', nxl, ' nxr = ', nxr, ' nys = ', & 184 nys, ' nyn = ', nyn 183 185 WRITE (9,*) ' ' 184 186 DO k = 1, j 185 187 WRITE (9,*) 'k = ', k 186 WRITE (9,'(6(A,I4))') 'nxlfa = ', nxlfa(files_to_be_opened,k),&187 188 189 190 191 188 WRITE (9,'(6(A,I4))') 'nxlfa = ', nxlfa(files_to_be_opened,k),& 189 ' nxrfa = ', nxrfa(files_to_be_opened,k), & 190 ' offset_xa = ', offset_xa(files_to_be_opened,k), & 191 ' nysfa = ', nysfa(files_to_be_opened,k), & 192 ' nynfa = ', nynfa(files_to_be_opened,k), & 193 ' offset_ya = ', offset_ya(files_to_be_opened,k) 192 194 ENDDO 193 195 CALL local_flush( 9 ) 194 196 ENDIF 195 197 198 196 199 ENDDO 197 200 198 201 ! 199 202 ! Save the idstring of the current process, since myid_char may now be used 200 203 ! to open files created by PEs with other id. 201 myid_char_save = myid_char204 myid_char_save = myid_char 202 205 203 206 ! 204 207 ! Test output (remove later) 208 205 209 DO i = 1, numprocs_previous_run 206 210 WRITE (9,*) 'i=',i1, ' ibs= ',hor_index_bounds_previous_run(1:4,i1) … … 311 315 ! 312 316 ! Allocate temporary arrays sized as the arrays on the restart file 313 ALLOCATE( tmp_2d(nys_on_file 1:nyn_on_file+1, &314 nxl_on_file 1:nxr_on_file+1), &315 tmp_3d(nzb:nzt+1,nys_on_file 1:nyn_on_file+1, &316 nxl_on_file 1:nxr_on_file+1) )317 ALLOCATE( tmp_2d(nys_on_filenbgp:nyn_on_file+nbgp, & 318 nxl_on_filenbgp:nxr_on_file+nbgp), & 319 tmp_3d(nzb:nzt+1,nys_on_filenbgp:nyn_on_file+nbgp, & 320 nxl_on_filenbgp:nxr_on_file+nbgp) ) 317 321 318 322 ! … … 349 353 CASE ( 'e' ) 350 354 IF ( k == 1 ) READ ( 13 ) tmp_3d 351 e(:,nysc 1:nync+1,nxlc1:nxrc+1) = &352 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)355 e(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 356 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 353 357 354 358 CASE ( 'e_av' ) 355 359 IF ( .NOT. ALLOCATED( e_av ) ) THEN 356 ALLOCATE( e_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )357 ENDIF 358 IF ( k == 1 ) READ ( 13 ) tmp_3d 359 e_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &360 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)360 ALLOCATE( e_av(nzb:nzt+1,nysnbgp:nyn+nbgp,nxlnbgp:nxr+nbgp) ) 361 ENDIF 362 IF ( k == 1 ) READ ( 13 ) tmp_3d 363 e_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 364 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 361 365 362 366 CASE ( 'e_m' ) 363 367 IF ( k == 1 ) READ ( 13 ) tmp_3d 364 e_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &365 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)368 e_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 369 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 366 370 367 371 CASE ( 'iran' ) ! matching random numbers is still unresolved … … 371 375 CASE ( 'kh' ) 372 376 IF ( k == 1 ) READ ( 13 ) tmp_3d 373 kh(:,nysc 1:nync+1,nxlc1:nxrc+1) = &374 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)377 kh(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 378 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 375 379 376 380 CASE ( 'kh_m' ) 377 381 IF ( k == 1 ) READ ( 13 ) tmp_3d 378 kh_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &379 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)382 kh_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 383 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 380 384 381 385 CASE ( 'km' ) 382 386 IF ( k == 1 ) READ ( 13 ) tmp_3d 383 km(:,nysc 1:nync+1,nxlc1:nxrc+1) = &384 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)387 km(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 388 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 385 389 386 390 CASE ( 'km_m' ) 387 391 IF ( k == 1 ) READ ( 13 ) tmp_3d 388 km_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &389 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)392 km_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 393 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 390 394 391 395 CASE ( 'lwp_av' ) 392 396 IF ( .NOT. ALLOCATED( lwp_av ) ) THEN 393 ALLOCATE( lwp_av(nys 1:nyn+1,nxl1:nxr+1) )394 ENDIF 395 IF ( k == 1 ) READ ( 13 ) tmp_2d 396 lwp_av(nysc 1:nync+1,nxlc1:nxrc+1) = &397 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)397 ALLOCATE( lwp_av(nysg:nyng,nxlg:nxrg) ) 398 ENDIF 399 IF ( k == 1 ) READ ( 13 ) tmp_2d 400 lwp_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 401 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 398 402 399 403 CASE ( 'p' ) 400 404 IF ( k == 1 ) READ ( 13 ) tmp_3d 401 p(:,nysc 1:nync+1,nxlc1:nxrc+1) = &402 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)405 p(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 406 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 403 407 404 408 CASE ( 'p_av' ) 405 409 IF ( .NOT. ALLOCATED( p_av ) ) THEN 406 ALLOCATE( p_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )407 ENDIF 408 IF ( k == 1 ) READ ( 13 ) tmp_3d 409 p_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &410 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)410 ALLOCATE( p_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 411 ENDIF 412 IF ( k == 1 ) READ ( 13 ) tmp_3d 413 p_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 414 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 411 415 412 416 CASE ( 'pc_av' ) 413 417 IF ( .NOT. ALLOCATED( pc_av ) ) THEN 414 ALLOCATE( pc_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )415 ENDIF 416 IF ( k == 1 ) READ ( 13 ) tmp_3d 417 pc_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &418 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)418 ALLOCATE( pc_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 419 ENDIF 420 IF ( k == 1 ) READ ( 13 ) tmp_3d 421 pc_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 422 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 419 423 420 424 CASE ( 'pr_av' ) 421 425 IF ( .NOT. ALLOCATED( pr_av ) ) THEN 422 ALLOCATE( pr_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )423 ENDIF 424 IF ( k == 1 ) READ ( 13 ) tmp_3d 425 pr_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &426 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)426 ALLOCATE( pr_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 427 ENDIF 428 IF ( k == 1 ) READ ( 13 ) tmp_3d 429 pr_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 430 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 427 431 428 432 CASE ( 'precipitation_amount' ) 429 433 IF ( k == 1 ) READ ( 13 ) tmp_2d 430 precipitation_amount(nysc 1:nync+1,nxlc1:nxrc+1)= &431 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)434 precipitation_amount(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 435 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 432 436 433 437 CASE ( 'precipitation_rate_a' ) 434 438 IF ( .NOT. ALLOCATED( precipitation_rate_av ) ) THEN 435 ALLOCATE( precipitation_rate_av(nys 1:nyn+1,nxl1:nxr+1) )436 ENDIF 437 IF ( k == 1 ) READ ( 13 ) tmp_2d 438 precipitation_rate_av(nysc 1:nync+1,nxlc1:nxrc+1)= &439 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)439 ALLOCATE( precipitation_rate_av(nysg:nyng,nxlg:nxrg) ) 440 ENDIF 441 IF ( k == 1 ) READ ( 13 ) tmp_2d 442 precipitation_rate_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 443 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 440 444 441 445 CASE ( 'pt' ) 442 446 IF ( k == 1 ) READ ( 13 ) tmp_3d 443 pt(:,nysc 1:nync+1,nxlc1:nxrc+1) = &444 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)447 pt(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 448 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 445 449 446 450 CASE ( 'pt_av' ) 447 451 IF ( .NOT. ALLOCATED( pt_av ) ) THEN 448 ALLOCATE( pt_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )449 ENDIF 450 IF ( k == 1 ) READ ( 13 ) tmp_3d 451 pt_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &452 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)452 ALLOCATE( pt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 453 ENDIF 454 IF ( k == 1 ) READ ( 13 ) tmp_3d 455 pt_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 456 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 453 457 454 458 CASE ( 'pt_m' ) 455 459 IF ( k == 1 ) READ ( 13 ) tmp_3d 456 pt_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &457 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)460 pt_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 461 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 458 462 459 463 CASE ( 'q' ) 460 464 IF ( k == 1 ) READ ( 13 ) tmp_3d 461 q(:,nysc 1:nync+1,nxlc1:nxrc+1) = &462 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)465 q(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 466 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 463 467 464 468 CASE ( 'q_av' ) 465 469 IF ( .NOT. ALLOCATED( q_av ) ) THEN 466 ALLOCATE( q_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1))467 ENDIF 468 IF ( k == 1 ) READ ( 13 ) tmp_3d 469 q_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &470 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)470 ALLOCATE( q_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg )) 471 ENDIF 472 IF ( k == 1 ) READ ( 13 ) tmp_3d 473 q_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 474 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 471 475 472 476 CASE ( 'q_m' ) 473 477 IF ( k == 1 ) READ ( 13 ) tmp_3d 474 q_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &475 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)478 q_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 479 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 476 480 477 481 CASE ( 'ql' ) 478 482 IF ( k == 1 ) READ ( 13 ) tmp_3d 479 ql(:,nysc 1:nync+1,nxlc1:nxrc+1) = &480 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)483 ql(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 484 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 481 485 482 486 CASE ( 'ql_av' ) 483 487 IF ( .NOT. ALLOCATED( ql_av ) ) THEN 484 ALLOCATE( ql_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )485 ENDIF 486 IF ( k == 1 ) READ ( 13 ) tmp_3d 487 ql_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &488 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)488 ALLOCATE( ql_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 489 ENDIF 490 IF ( k == 1 ) READ ( 13 ) tmp_3d 491 ql_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 492 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 489 493 490 494 CASE ( 'ql_c_av' ) 491 495 IF ( .NOT. ALLOCATED( ql_c_av ) ) THEN 492 ALLOCATE( ql_c_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )493 ENDIF 494 IF ( k == 1 ) READ ( 13 ) tmp_3d 495 ql_c_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &496 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)496 ALLOCATE( ql_c_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 497 ENDIF 498 IF ( k == 1 ) READ ( 13 ) tmp_3d 499 ql_c_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 500 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 497 501 498 502 CASE ( 'ql_v_av' ) 499 503 IF ( .NOT. ALLOCATED( ql_v_av ) ) THEN 500 ALLOCATE( ql_v_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )501 ENDIF 502 IF ( k == 1 ) READ ( 13 ) tmp_3d 503 ql_v_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &504 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)504 ALLOCATE( ql_v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 505 ENDIF 506 IF ( k == 1 ) READ ( 13 ) tmp_3d 507 ql_v_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 508 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 505 509 506 510 CASE ( 'ql_vp_av' ) 507 511 IF ( .NOT. ALLOCATED( ql_vp_av ) ) THEN 508 ALLOCATE( ql_vp_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )509 ENDIF 510 IF ( k == 1 ) READ ( 13 ) tmp_3d 511 ql_vp_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &512 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)512 ALLOCATE( ql_vp_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 513 ENDIF 514 IF ( k == 1 ) READ ( 13 ) tmp_3d 515 ql_vp_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 516 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 513 517 514 518 CASE ( 'qs' ) 515 519 IF ( k == 1 ) READ ( 13 ) tmp_2d 516 qs(nysc 1:nync+1,nxlc1:nxrc+1)= &517 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)520 qs(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 521 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 518 522 519 523 CASE ( 'qsws' ) 520 524 IF ( k == 1 ) READ ( 13 ) tmp_2d 521 qsws(nysc 1:nync+1,nxlc1:nxrc+1)= &522 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)525 qsws(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 526 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 523 527 524 528 CASE ( 'qsws_m' ) 525 529 IF ( k == 1 ) READ ( 13 ) tmp_2d 526 qsws_m(nysc 1:nync+1,nxlc1:nxrc+1)= &527 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)530 qsws_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 531 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 528 532 529 533 CASE ( 'qsws_av' ) 530 534 IF ( .NOT. ALLOCATED( qsws_av ) ) THEN 531 ALLOCATE( qsws_av(nys 1:nyn+1,nxl1:nxr+1) )535 ALLOCATE( qsws_av(nysg:nyng,nxlg:nxrg) ) 532 536 ENDIF 533 537 IF ( k == 1 ) READ ( 13 ) tmp_2d 534 qsws_av(nysc 1:nync+1,nxlc1:nxrc+1)= &535 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)538 qsws_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 539 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 536 540 537 541 CASE ( 'qswst' ) 538 542 IF ( k == 1 ) READ ( 13 ) tmp_2d 539 qswst(nysc 1:nync+1,nxlc1:nxrc+1)= &540 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)543 qswst(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 544 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 541 545 542 546 CASE ( 'qswst_m' ) 543 547 IF ( k == 1 ) READ ( 13 ) tmp_2d 544 qswst_m(nysc 1:nync+1,nxlc1:nxrc+1)= &545 tmp_2d(nysf 1:nynf+1,nxlf1:nxrf+1)548 qswst_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 549 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 546 550 547 551 CASE ( 'qv_av' ) 548 552 IF ( .NOT. ALLOCATED( qv_av ) ) THEN 549 ALLOCATE( qv_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )550 ENDIF 551 IF ( k == 1 ) READ ( 13 ) tmp_3d 552 qv_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &553 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)553 ALLOCATE( qv_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 554 ENDIF 555 IF ( k == 1 ) READ ( 13 ) tmp_3d 556 qv_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 557 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 554 558 555 559 CASE ( 'random_iv' ) ! still unresolved issue … … 559 563 CASE ( 'rho_av' ) 560 564 IF ( .NOT. ALLOCATED( rho_av ) ) THEN 561 ALLOCATE( rho_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )562 ENDIF 563 IF ( k == 1 ) READ ( 13 ) tmp_3d 564 rho_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &565 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)565 ALLOCATE( rho_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 566 ENDIF 567 IF ( k == 1 ) READ ( 13 ) tmp_3d 568 rho_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 569 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 566 570 567 571 CASE ( 'rif' ) 568 572 IF ( k == 1 ) READ ( 13 ) tmp_2d 569 rif(nysc 1:nync+1,nxlc1:nxrc+1)= &570 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)573 rif(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 574 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 571 575 572 576 CASE ( 'rif_m' ) 573 577 IF ( k == 1 ) READ ( 13 ) tmp_2d 574 rif_m(nysc 1:nync+1,nxlc1:nxrc+1)= &575 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)578 rif_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 579 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 576 580 577 581 CASE ( 'rif_wall' ) 578 582 IF ( k == 1 ) THEN 579 ALLOCATE( tmp_4d(nzb:nzt+1,nys_on_file 1:nyn_on_file+1, &580 nxl_on_file 1:nxr_on_file+1,1:4) )583 ALLOCATE( tmp_4d(nzb:nzt+1,nys_on_filenbgp:nyn_on_file+nbgp, & 584 nxl_on_filenbgp:nxr_on_file+nbgp,1:4) ) 581 585 READ ( 13 ) tmp_4d 582 586 ENDIF 583 rif_wall(:,nysc 1:nync+1,nxlc1:nxrc+1,:) = &584 tmp_4d(:,nysf1:nynf+1,nxlf1:nxrf+1,:)587 rif_wall(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp,:) = & 588 tmp_4d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp,:) 585 589 586 590 CASE ( 's_av' ) 587 591 IF ( .NOT. ALLOCATED( s_av ) ) THEN 588 ALLOCATE( s_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1))589 ENDIF 590 IF ( k == 1 ) READ ( 13 ) tmp_3d 591 s_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &592 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)592 ALLOCATE( s_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) 593 ENDIF 594 IF ( k == 1 ) READ ( 13 ) tmp_3d 595 s_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 596 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 593 597 594 598 CASE ( 'sa' ) 595 599 IF ( k == 1 ) READ ( 13 ) tmp_3d 596 sa(:,nysc 1:nync+1,nxlc1:nxrc+1) = &597 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)600 sa(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 601 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 598 602 599 603 CASE ( 'sa_av' ) 600 604 IF ( .NOT. ALLOCATED( sa_av ) ) THEN 601 ALLOCATE( sa_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )602 ENDIF 603 IF ( k == 1 ) READ ( 13 ) tmp_3d 604 sa_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &605 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)605 ALLOCATE( sa_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 606 ENDIF 607 IF ( k == 1 ) READ ( 13 ) tmp_3d 608 sa_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 609 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 606 610 607 611 CASE ( 'saswsb' ) 608 612 IF ( k == 1 ) READ ( 13 ) tmp_2d 609 saswsb(nysc 1:nync+1,nxlc1:nxrc+1)= &610 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)613 saswsb(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 614 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 611 615 612 616 CASE ( 'saswst' ) 613 617 IF ( k == 1 ) READ ( 13 ) tmp_2d 614 saswst(nysc 1:nync+1,nxlc1:nxrc+1)= &615 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)618 saswst(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 619 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 616 620 617 621 CASE ( 'shf' ) 618 622 IF ( k == 1 ) READ ( 13 ) tmp_2d 619 shf(nysc 1:nync+1,nxlc1:nxrc+1)= &620 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)623 shf(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 624 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 621 625 622 626 CASE ( 'shf_m' ) 623 627 IF ( k == 1 ) READ ( 13 ) tmp_2d 624 shf_m(nysc 1:nync+1,nxlc1:nxrc+1)= &625 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)628 shf_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 629 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 626 630 CASE ( 'shf_av' ) 627 631 IF ( .NOT. ALLOCATED( shf_av ) ) THEN 628 ALLOCATE( shf_av(nys 1:nyn+1,nxl1:nxr+1) )629 ENDIF 630 IF ( k == 1 ) READ ( 13 ) tmp_2d 631 shf_av(nysc 1:nync+1,nxlc1:nxrc+1)= &632 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)632 ALLOCATE( shf_av(nysg:nyng,nxlg:nxrg) ) 633 ENDIF 634 IF ( k == 1 ) READ ( 13 ) tmp_2d 635 shf_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 636 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 633 637 CASE ( 'spectrum_x' ) 634 638 IF ( k == 1 ) THEN … … 663 667 CASE ( 'ts' ) 664 668 IF ( k == 1 ) READ ( 13 ) tmp_2d 665 ts(nysc 1:nync+1,nxlc1:nxrc+1)= &666 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)669 ts(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 670 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 667 671 668 672 CASE ( 'ts_av' ) 669 673 IF ( .NOT. ALLOCATED( ts_av ) ) THEN 670 ALLOCATE( ts_av(nys 1:nyn+1,nxl1:nxr+1) )671 ENDIF 672 IF ( k == 1 ) READ ( 13 ) tmp_2d 673 ts_av(nysc 1:nync+1,nxlc1:nxrc+1)= &674 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)674 ALLOCATE( ts_av(nysg:nyng,nxlg:nxrg) ) 675 ENDIF 676 IF ( k == 1 ) READ ( 13 ) tmp_2d 677 ts_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 678 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 675 679 676 680 CASE ( 'tswst' ) 677 681 IF ( k == 1 ) READ ( 13 ) tmp_2d 678 tswst(nysc 1:nync+1,nxlc1:nxrc+1)= &679 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)682 tswst(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 683 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 680 684 681 685 CASE ( 'tswst_m' ) 682 686 IF ( k == 1 ) READ ( 13 ) tmp_2d 683 tswst_m(nysc 1:nync+1,nxlc1:nxrc+1)= &684 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)687 tswst_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 688 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 685 689 686 690 CASE ( 'u' ) 687 691 IF ( k == 1 ) READ ( 13 ) tmp_3d 688 u(:,nysc 1:nync+1,nxlc1:nxrc+1) = &689 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)692 u(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 693 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 690 694 691 695 CASE ( 'u_av' ) 692 696 IF ( .NOT. ALLOCATED( u_av ) ) THEN 693 ALLOCATE( u_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )694 ENDIF 695 IF ( k == 1 ) READ ( 13 ) tmp_3d 696 u_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &697 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)697 ALLOCATE( u_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 698 ENDIF 699 IF ( k == 1 ) READ ( 13 ) tmp_3d 700 u_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 701 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 698 702 699 703 CASE ( 'u_m' ) 700 704 IF ( k == 1 ) READ ( 13 ) tmp_3d 701 u_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &702 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)705 u_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 706 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 703 707 704 708 CASE ( 'u_m_l' ) 705 709 IF ( k == 1 ) THEN 706 710 ALLOCATE( tmp_3dwul(nzb:nzt+1, & 707 nys_on_file 1:nyn_on_file+1,1:2) )711 nys_on_filenbgp:nyn_on_file+nbgp,1:2) ) 708 712 READ ( 13 ) tmp_3dwul 709 713 ENDIF 710 714 IF ( outflow_l ) THEN 711 u_m_l(:,nysc 1:nync+1,:) = tmp_3dwul(:,nysf1:nynf+1,:)715 u_m_l(:,nyscnbgp:nync+nbgp,:) = tmp_3dwul(:,nysfnbgp:nynf+nbgp,:) 712 716 ENDIF 713 717 … … 715 719 IF ( k == 1 ) THEN 716 720 ALLOCATE( tmp_3dwun(nzb:nzt+1,ny1:ny, & 717 nxl_on_file 1:nxr_on_file+1) )721 nxl_on_filenbgp:nxr_on_file+nbgp) ) 718 722 READ ( 13 ) tmp_3dwun 719 723 ENDIF 720 724 IF ( outflow_n ) THEN 721 u_m_n(:,:,nxlc 1:nxrc+1) = tmp_3dwun(:,:,nxlf1:nxrf+1)725 u_m_n(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwun(:,:,nxlfnbgp:nxrf+nbgp) 722 726 ENDIF 723 727 … … 725 729 IF ( k == 1 ) THEN 726 730 ALLOCATE( tmp_3dwur(nzb:nzt+1,& 727 nys_on_file 1:nyn_on_file+1,nx1:nx) )731 nys_on_filenbgp:nyn_on_file+nbgp,nx1:nx) ) 728 732 READ ( 13 ) tmp_3dwur 729 733 ENDIF 730 734 IF ( outflow_r ) THEN 731 u_m_r(:,nysc 1:nync+1,:) = tmp_3dwur(:,nysf1:nynf+1,:)735 u_m_r(:,nyscnbgp:nync+nbgp,:) = tmp_3dwur(:,nysfnbgp:nynf+nbgp,:) 732 736 ENDIF 733 737 … … 735 739 IF ( k == 1 ) THEN 736 740 ALLOCATE( tmp_3dwus(nzb:nzt+1,0:1, & 737 nxl_on_file 1:nxr_on_file+1) )741 nxl_on_filenbgp:nxr_on_file+nbgp) ) 738 742 READ ( 13 ) tmp_3dwus 739 743 ENDIF 740 744 IF ( outflow_s ) THEN 741 u_m_s(:,:,nxlc 1:nxrc+1) = tmp_3dwus(:,:,nxlf1:nxrf+1)745 u_m_s(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwus(:,:,nxlfnbgp:nxrf+nbgp) 742 746 ENDIF 743 747 744 748 CASE ( 'us' ) 745 749 IF ( k == 1 ) READ ( 13 ) tmp_2d 746 us(nysc 1:nync+1,nxlc1:nxrc+1)= &747 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)750 us(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 751 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 748 752 749 753 CASE ( 'usws' ) 750 754 IF ( k == 1 ) READ ( 13 ) tmp_2d 751 usws(nysc 1:nync+1,nxlc1:nxrc+1)= &752 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)755 usws(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 756 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 753 757 754 758 CASE ( 'uswst' ) 755 759 IF ( k == 1 ) READ ( 13 ) tmp_2d 756 uswst(nysc 1:nync+1,nxlc1:nxrc+1)= &757 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)760 uswst(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 761 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 758 762 759 763 CASE ( 'usws_m' ) 760 764 IF ( k == 1 ) READ ( 13 ) tmp_2d 761 usws_m(nysc 1:nync+1,nxlc1:nxrc+1)= &762 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)765 usws_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 766 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 763 767 764 768 CASE ( 'uswst_m' ) 765 769 IF ( k == 1 ) READ ( 13 ) tmp_2d 766 uswst_m(nysc 1:nync+1,nxlc1:nxrc+1)= &767 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)770 uswst_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 771 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 768 772 769 773 CASE ( 'us_av' ) 770 774 IF ( .NOT. ALLOCATED( us_av ) ) THEN 771 ALLOCATE( us_av(nys 1:nyn+1,nxl1:nxr+1) )772 ENDIF 773 IF ( k == 1 ) READ ( 13 ) tmp_2d 774 us_av(nysc 1:nync+1,nxlc1:nxrc+1)= &775 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)775 ALLOCATE( us_av(nysg:nyng,nxlg:nxrg) ) 776 ENDIF 777 IF ( k == 1 ) READ ( 13 ) tmp_2d 778 us_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 779 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 776 780 777 781 CASE ( 'v' ) 778 782 IF ( k == 1 ) READ ( 13 ) tmp_3d 779 v(:,nysc 1:nync+1,nxlc1:nxrc+1) = &780 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)783 v(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 784 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 781 785 782 786 CASE ( 'v_av' ) 783 787 IF ( .NOT. ALLOCATED( v_av ) ) THEN 784 ALLOCATE( v_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )785 ENDIF 786 IF ( k == 1 ) READ ( 13 ) tmp_3d 787 v_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &788 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)788 ALLOCATE( v_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 789 ENDIF 790 IF ( k == 1 ) READ ( 13 ) tmp_3d 791 v_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 792 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 789 793 790 794 CASE ( 'v_m' ) 791 795 IF ( k == 1 ) READ ( 13 ) tmp_3d 792 v_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &793 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)796 v_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 797 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 794 798 795 799 CASE ( 'v_m_l' ) 796 800 IF ( k == 1 ) THEN 797 801 ALLOCATE( tmp_3dwvl(nzb:nzt+1,& 798 nys_on_file 1:nyn_on_file+1,0:1) )802 nys_on_filenbgp:nyn_on_file+nbgp,0:1) ) 799 803 READ ( 13 ) tmp_3dwvl 800 804 ENDIF 801 805 IF ( outflow_l ) THEN 802 v_m_l(:,nysc 1:nync+1,:) = tmp_3dwvl(:,nysf1:nynf+1,:)806 v_m_l(:,nyscnbgp:nync+nbgp,:) = tmp_3dwvl(:,nysfnbgp:nynf+nbgp,:) 803 807 ENDIF 804 808 … … 806 810 IF ( k == 1 ) THEN 807 811 ALLOCATE( tmp_3dwvn(nzb:nzt+1,ny1:ny, & 808 nxl_on_file 1:nxr_on_file+1) )812 nxl_on_filenbgp:nxr_on_file+nbgp) ) 809 813 READ ( 13 ) tmp_3dwvn 810 814 ENDIF 811 815 IF ( outflow_n ) THEN 812 v_m_n(:,:,nxlc 1:nxrc+1) = tmp_3dwvn(:,:,nxlf1:nxrf+1)816 v_m_n(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwvn(:,:,nxlfnbgp:nxrf+nbgp) 813 817 ENDIF 814 818 … … 816 820 IF ( k == 1 ) THEN 817 821 ALLOCATE( tmp_3dwvr(nzb:nzt+1,& 818 nys_on_file 1:nyn_on_file+1,nx1:nx) )822 nys_on_filenbgp:nyn_on_file+nbgp,nx1:nx) ) 819 823 READ ( 13 ) tmp_3dwvr 820 824 ENDIF 821 825 IF ( outflow_r ) THEN 822 v_m_r(:,nysc 1:nync+1,:) = tmp_3dwvr(:,nysf1:nynf+1,:)826 v_m_r(:,nyscnbgp:nync+nbgp,:) = tmp_3dwvr(:,nysfnbgp:nynf+nbgp,:) 823 827 ENDIF 824 828 … … 826 830 IF ( k == 1 ) THEN 827 831 ALLOCATE( tmp_3dwvs(nzb:nzt+1,1:2, & 828 nxl_on_file 1:nxr_on_file+1) )832 nxl_on_filenbgp:nxr_on_file+nbgp) ) 829 833 READ ( 13 ) tmp_3dwvs 830 834 ENDIF 831 835 IF ( outflow_s ) THEN 832 v_m_s(:,:,nxlc 1:nxrc+1) = tmp_3dwvs(:,:,nxlf1:nxrf+1)836 v_m_s(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwvs(:,:,nxlfnbgp:nxrf+nbgp) 833 837 ENDIF 834 838 835 839 CASE ( 'vpt' ) 836 840 IF ( k == 1 ) READ ( 13 ) tmp_3d 837 vpt(:,nysc 1:nync+1,nxlc1:nxrc+1) = &838 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)841 vpt(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 842 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 839 843 840 844 CASE ( 'vpt_av' ) 841 845 IF ( .NOT. ALLOCATED( vpt_av ) ) THEN 842 ALLOCATE( vpt_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )843 ENDIF 844 IF ( k == 1 ) READ ( 13 ) tmp_3d 845 vpt_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &846 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)846 ALLOCATE( vpt_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 847 ENDIF 848 IF ( k == 1 ) READ ( 13 ) tmp_3d 849 vpt_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 850 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 847 851 848 852 CASE ( 'vpt_m' ) 849 853 IF ( k == 1 ) READ ( 13 ) tmp_3d 850 vpt_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &851 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)854 vpt_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 855 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 852 856 853 857 CASE ( 'vsws' ) 854 858 IF ( k == 1 ) READ ( 13 ) tmp_2d 855 vsws(nysc 1:nync+1,nxlc1:nxrc+1)= &856 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)859 vsws(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 860 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 857 861 858 862 CASE ( 'vswst' ) 859 863 IF ( k == 1 ) READ ( 13 ) tmp_2d 860 vswst(nysc 1:nync+1,nxlc1:nxrc+1)= &861 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)864 vswst(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 865 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 862 866 863 867 CASE ( 'vsws_m' ) 864 868 IF ( k == 1 ) READ ( 13 ) tmp_2d 865 vsws_m(nysc 1:nync+1,nxlc1:nxrc+1)= &866 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)869 vsws_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 870 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 867 871 868 872 CASE ( 'vswst_m' ) 869 873 IF ( k == 1 ) READ ( 13 ) tmp_2d 870 vswst_m(nysc 1:nync+1,nxlc1:nxrc+1)= &871 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)874 vswst_m(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 875 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 872 876 873 877 CASE ( 'w' ) 874 878 IF ( k == 1 ) READ ( 13 ) tmp_3d 875 w(:,nysc 1:nync+1,nxlc1:nxrc+1) = &876 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)879 w(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 880 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 877 881 878 882 CASE ( 'w_av' ) 879 883 IF ( .NOT. ALLOCATED( w_av ) ) THEN 880 ALLOCATE( w_av(nzb:nzt+1,nys 1:nyn+1,nxl1:nxr+1) )881 ENDIF 882 IF ( k == 1 ) READ ( 13 ) tmp_3d 883 w_av(:,nysc 1:nync+1,nxlc1:nxrc+1) = &884 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)884 ALLOCATE( w_av(nzb:nzt+1,nysg:nyng,nxlg:nxrg) ) 885 ENDIF 886 IF ( k == 1 ) READ ( 13 ) tmp_3d 887 w_av(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 888 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 885 889 886 890 CASE ( 'w_m' ) 887 891 IF ( k == 1 ) READ ( 13 ) tmp_3d 888 w_m(:,nysc 1:nync+1,nxlc1:nxrc+1) = &889 tmp_3d(:,nysf1:nynf+1,nxlf1:nxrf+1)892 w_m(:,nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 893 tmp_3d(:,nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 890 894 891 895 CASE ( 'w_m_l' ) 892 896 IF ( k == 1 ) THEN 893 897 ALLOCATE( tmp_3dwwl(nzb:nzt+1,& 894 nys_on_file 1:nyn_on_file+1,0:1) )898 nys_on_filenbgp:nyn_on_file+nbgp,0:1) ) 895 899 READ ( 13 ) tmp_3dwwl 896 900 ENDIF 897 901 IF ( outflow_l ) THEN 898 w_m_l(:,nysc 1:nync+1,:) = tmp_3dwwl(:,nysf1:nynf+1,:)902 w_m_l(:,nyscnbgp:nync+nbgp,:) = tmp_3dwwl(:,nysfnbgp:nynf+nbgp,:) 899 903 ENDIF 900 904 … … 902 906 IF ( k == 1 ) THEN 903 907 ALLOCATE( tmp_3dwwn(nzb:nzt+1,ny1:ny, & 904 nxl_on_file 1:nxr_on_file+1) )908 nxl_on_filenbgp:nxr_on_file+nbgp) ) 905 909 READ ( 13 ) tmp_3dwwn 906 910 ENDIF 907 911 IF ( outflow_n ) THEN 908 w_m_n(:,:,nxlc 1:nxrc+1) = tmp_3dwwn(:,:,nxlf1:nxrf+1)912 w_m_n(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwwn(:,:,nxlfnbgp:nxrf+nbgp) 909 913 ENDIF 910 914 … … 912 916 IF ( k == 1 ) THEN 913 917 ALLOCATE( tmp_3dwwr(nzb:nzt+1,& 914 nys_on_file 1:nyn_on_file+1,nx1:nx) )918 nys_on_filenbgp:nyn_on_file+nbgp,nx1:nx) ) 915 919 READ ( 13 ) tmp_3dwwr 916 920 ENDIF 917 921 IF ( outflow_r ) THEN 918 w_m_r(:,nysc 1:nync+1,:) = tmp_3dwwr(:,nysf1:nynf+1,:)922 w_m_r(:,nyscnbgp:nync+nbgp,:) = tmp_3dwwr(:,nysfnbgp:nynf+nbgp,:) 919 923 ENDIF 920 924 … … 922 926 IF ( k == 1 ) THEN 923 927 ALLOCATE( tmp_3dwws(nzb:nzt+1,0:1, & 924 nxl_on_file 1:nxr_on_file+1) )928 nxl_on_filenbgp:nxr_on_file+nbgp) ) 925 929 READ ( 13 ) tmp_3dwws 926 930 ENDIF 927 931 IF ( outflow_s ) THEN 928 w_m_s(:,:,nxlc 1:nxrc+1) = tmp_3dwws(:,:,nxlf1:nxrf+1)932 w_m_s(:,:,nxlcnbgp:nxrc+nbgp) = tmp_3dwws(:,:,nxlfnbgp:nxrf+nbgp) 929 933 ENDIF 930 934 DEALLOCATE( tmp_3dwws ) … … 932 936 CASE ( 'z0' ) 933 937 IF ( k == 1 ) READ ( 13 ) tmp_2d 934 z0(nysc 1:nync+1,nxlc1:nxrc+1)= &935 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)938 z0(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 939 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 936 940 937 941 CASE ( 'z0_av' ) 938 942 IF ( .NOT. ALLOCATED( z0_av ) ) THEN 939 ALLOCATE( z0_av(nys 1:nyn+1,nxl1:nxr+1) )940 ENDIF 941 IF ( k == 1 ) READ ( 13 ) tmp_2d 942 z0_av(nysc 1:nync+1,nxlc1:nxrc+1)= &943 tmp_2d(nysf1:nynf+1,nxlf1:nxrf+1)943 ALLOCATE( z0_av(nysg:nyng,nxlg:nxrg) ) 944 ENDIF 945 IF ( k == 1 ) READ ( 13 ) tmp_2d 946 z0_av(nyscnbgp:nync+nbgp,nxlcnbgp:nxrc+nbgp) = & 947 tmp_2d(nysfnbgp:nynf+nbgp,nxlfnbgp:nxrf+nbgp) 944 948 945 949 CASE DEFAULT
Note: See TracChangeset
for help on using the changeset viewer.