Changeset 210 for palm/trunk/UTIL
- Timestamp:
- Nov 6, 2008 8:54:02 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/UTIL/combine_plot_fields.f90
r191 r210 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Size of pf3d adjusted to the required output size (1 gridpoint less, along 7 ! all three dimensions), because output of a subset of the data 8 ! (pf3d(nxa:nxe...) in the NF90_PUT_VAR statement caused segmentation fault 9 ! with the INTEL compiler. 6 10 ! Subdomain data are read into temporary arrays pf_tmp/pf3d_tmp in order to 7 11 ! avoid INTEL compiler warnings about (automatic) creation of temporary arrays … … 93 97 94 98 INTEGER :: av, danz, i, id, & 95 j, model, models, nc_stat, nxa, nxag, nxe, nxeg, nya, &99 j, k, model, models, nc_stat, nxa, nxag, nxe, nxeg, nya, & 96 100 nyag, nye, nyeg, nza, nzag, nze, nzeg, pos, time_step, xa, xe, & 97 ya, ye, za,ze101 xxa, xxe, ya, ye, yya, yye, za, ze, zza, zze 98 102 99 103 INTEGER, DIMENSION(0:1) :: current_level, current_var, fanz, id_set, & … … 603 607 ! 604 608 !-- Get variable ID from name 605 ! print*, '*** find id for "',TRIM( var_name ),'" begin'606 609 nc_stat = NF90_INQ_VARID( id_set(av), TRIM( var_name ), & 607 610 id_var(av,i) ) 608 611 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 16 ) 609 ! print*, '*** find id for "',TRIM( var_name ),'" end'610 612 611 613 ENDDO … … 636 638 READ ( id+110 ) nxag, nxeg, nyag, nyeg, nzag, nzeg 637 639 READ ( id+110 ) nxa, nxe, nya, nye, nza, nze 638 ALLOCATE ( pf3d(nxa g:nxeg,nyag:nyeg,nzag:nzeg) )640 ALLOCATE ( pf3d(nxa:nxe,nya:nye,nza:nze) ) 639 641 IF ( avs_output ) THEN 640 642 OPEN ( 2, FILE='PLOT3D_DATA'//TRIM( model_string ), & … … 661 663 ALLOCATE( pf3d_tmp(xa:xe,ya:ye,za:ze) ) 662 664 READ ( id+110 ) pf3d_tmp 663 pf3d(xa:xe,ya:ye,za:ze) = pf3d_tmp 665 666 xxa = MAX( nxa, xa ) 667 xxe = MIN( nxe, xe ) 668 yya = MAX( nya, ya ) 669 yye = MIN( nye, ye ) 670 zza = MAX( nza, za ) 671 zze = MIN( nze, ze ) 672 DO k = zza, zze 673 DO j = yya, yye 674 DO i = xxa, xxe 675 pf3d(i,j,k) = pf3d_tmp(i,j,k) 676 ENDDO 677 ENDDO 678 ENDDO 679 664 680 DEALLOCATE( pf3d_tmp ) 665 681 IF ( id == 0 ) fanz(av) = fanz(av) + 1 … … 688 704 !-- Now write the data 689 705 nc_stat = NF90_PUT_VAR( id_set(av), id_var(av,current_var(av)), & 690 pf3d(nxa:nxe,nya:nye,nza:nze), & 691 start = (/ 1, 1, 1, time_step /), & 706 pf3d, start = (/ 1, 1, 1, time_step /), & 692 707 count = (/ nxe-nxa+1, nye-nya+1, nze-nza+1, 1 /) ) 693 708 IF ( nc_stat /= NF90_NOERR ) CALL handle_netcdf_error( 18 )
Note: See TracChangeset
for help on using the changeset viewer.