Changeset 1551 for palm/trunk/UTIL
- Timestamp:
- Mar 3, 2015 2:18:16 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/combine_plot_fields.f90
r1469 r1551 20 20 ! Current revisions: 21 21 ! ----------------- 22 ! 22 ! Adjustments for data output of soil model quantities 23 23 ! 24 24 ! Former revisions: … … 91 91 CHARACTER (LEN=2) :: modus, model_string 92 92 CHARACTER (LEN=6) :: id_string 93 CHARACTER (LEN= 10) :: dimname, var_name93 CHARACTER (LEN=20) :: dimname, var_name 94 94 CHARACTER (LEN=40) :: filename 95 95 … … 100 100 INTEGER(iwp) :: av, danz, i, id, j, k, model, models, nc_stat, & 101 101 nxa, nxag, nxe, nxeg, nya, nyag, nye, nyeg, & 102 nza, nzag, nze, nzeg, pos, time_step, & 103 xa, xe, xxa, xxe, ya, ye, yya, yye, za, ze, zza, zze 102 nza, nze, pos, time_step, & 103 xa, xe, xxa, xxe, ya, ya_do, ya_tot, ye, ye_do, ye_tot, yya, yye, za, & 104 ze, zza, zze 104 105 105 106 #if defined( __lc ) || defined( __decalpha ) … … 372 373 !-- concerning the lower and upper indices of the total-domain 373 374 !-- used in PALM (nxag, nxeg, nyag, nyeg) and the lower and 374 !-- upper indices of the array to be writte by this routine375 !-- upper indices of the array to be written by this routine 375 376 !-- (nxa, nxe, nya, nye). Usually in the horizontal directions 376 377 !-- nxag=-1 and nxa=0 while all other variables have the same … … 385 386 READ ( id+110 ) dx, eta, hu, ho 386 387 388 389 ! 390 !-- Set actual domain bounds to total domain 391 ya_do = nya 392 ye_do = nye 393 387 394 IF ( iso2d_output ) THEN 388 395 OPEN ( 2, FILE='PLOT2D_'//modus//TRIM( model_string ),& … … 405 412 ! 406 413 !-- Read subdomain indices 407 READ ( id+110, END=998 ) xa, xe, ya, ye 414 READ ( id+110, END=998 ) xa, xe, ya, ye, ya_tot, ye_tot 415 408 416 ! 409 417 !-- IF the PE made no output (in case that no part of the … … 412 420 IF ( .NOT. ( xa == -1 .AND. xe == -1 .AND. & 413 421 ya == -1 .AND. ye == -1 ) ) THEN 422 423 414 424 ! 415 425 !-- Read the subdomain grid-point values 416 426 ALLOCATE( pf_tmp(xa:xe,ya:ye) ) 417 427 READ ( id+110 ) pf_tmp 418 pf(xa:xe,ya:ye) = pf_tmp 428 ! 429 !-- Calculate indices on atmospheric grid (e.g. for soil model 430 !-- quantities) 431 IF ( ya /= ya_tot .OR. ye /= ye_tot ) THEN 432 ye_do = ye - ya 433 ya_do = ya 434 pf(xa:xe,ya_do:ye_do) = pf_tmp 435 ELSE 436 ye_do = nye 437 ya_do = nya 438 pf(xa:xe,ya:ye) = pf_tmp 439 ENDIF 440 419 441 DEALLOCATE( pf_tmp ) 420 442 ENDIF … … 459 481 nc_stat = NF90_PUT_VAR( id_set(av), & 460 482 id_var(av,current_var(av)), & 461 pf(nxa:nxe, nya:nye),&483 pf(nxa:nxe,ya_do:ye_do), & 462 484 start = (/ 1, current_level(av), 1, time_step /), & 463 count = (/ nxe-nxa+1, 1, nye-nya+1, 1 /) )485 count = (/ nxe-nxa+1, 1, ye_do-ya_do+1, 1 /) ) 464 486 IF ( nc_stat /= NF90_NOERR ) THEN 465 487 CALL handle_netcdf_error( 9 ) … … 469 491 nc_stat = NF90_PUT_VAR( id_set(av), & 470 492 id_var(av,current_var(av)), & 471 pf(nxa:nxe, nya:nye),&493 pf(nxa:nxe,ya_do:ye_do), & 472 494 start = (/ current_level(av), 1, 1, time_step /), & 473 count = (/ 1, nxe-nxa+1, nye-nya+1, 1 /) )495 count = (/ 1, nxe-nxa+1, ye_do-ya_do+1, 1 /) ) 474 496 IF ( nc_stat /= NF90_NOERR ) THEN 475 497 CALL handle_netcdf_error( 10 ) … … 743 765 !-- File from PE0 contains special information at the beginning, 744 766 !-- concerning the lower and upper indices of the total-domain used 745 !-- in PALM (nxag, nxeg, nyag, nyeg , nzag, nzeg) and the lower and767 !-- in PALM (nxag, nxeg, nyag, nyeg) and the lower and 746 768 !-- upper indices of the array to be written by this routine (nxa, 747 769 !-- nxe, nya, nye, nza, nze). Usually nxag=-1 and nxa=0, nyag=-1 748 !-- and nya=0, nzeg=nz and nze=nz_ plot3d.770 !-- and nya=0, nzeg=nz and nze=nz_do3d. 749 771 !-- Allocate necessary array and open the output file. 750 772 IF ( id == 0 .AND. fanz(0) == 0 .AND. fanz(1) == 0 ) THEN 751 READ ( id+110 ) nxag, nxeg, nyag, nyeg , nzag, nzeg773 READ ( id+110 ) nxag, nxeg, nyag, nyeg 752 774 READ ( id+110 ) nxa, nxe, nya, nye, nza, nze 753 775 ALLOCATE ( pf3d(nxa:nxe,nya:nye,nza:nze) ) … … 781 803 yya = MAX( nya, ya ) 782 804 yye = MIN( nye, ye ) 783 zza = MAX( nza, za ) 784 zze = MIN( nze, ze ) 785 DO k = zza, zze 805 DO k = za, ze 786 806 DO j = yya, yye 787 807 DO i = xxa, xxe … … 818 838 !-- Now write the data 819 839 nc_stat = NF90_PUT_VAR( id_set(av), id_var(av,current_var(av)),& 820 pf3d , start = (/ 1, 1, 1, time_step /),&821 count = (/ nxe-nxa+1, nye-nya+1, nze-nza+1, 1 /) )840 pf3d(nxa:nxe,nya:nye,za:ze), start = (/ 1, 1, 1, time_step /),& 841 count = (/ nxe-nxa+1, nye-nya+1, ze-za+1, 1 /) ) 822 842 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 18 ) 823 843
Note: See TracChangeset
for help on using the changeset viewer.