Changeset 3030
- Timestamp:
- May 23, 2018 2:37:00 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/data_output_mask.f90
r2718 r3030 25 25 ! ----------------- 26 26 ! $Id$ 27 ! variable if renamed ivar 28 ! 29 ! 2718 2018-01-02 08:49:38Z maronga 27 30 ! Corrected "Former revisions" section 28 31 ! … … 159 162 INTEGER(iwp) :: ngp !< 160 163 INTEGER(iwp) :: i !< 161 INTEGER(iwp) :: i f !<164 INTEGER(iwp) :: ivar !< 162 165 INTEGER(iwp) :: j !< 163 166 INTEGER(iwp) :: k !< … … 223 226 ! 224 227 !-- Loop over all variables to be written. 225 i f= 1226 227 DO WHILE ( domask(mid,av,i f)(1:1) /= ' ' )228 ivar = 1 229 230 DO WHILE ( domask(mid,av,ivar)(1:1) /= ' ' ) 228 231 ! 229 232 !-- Reallocate local_pf on PE 0 since its shape changes during MPI exchange 230 IF ( netcdf_data_format < 5 .AND. myid == 0 .AND. i f> 1 ) THEN233 IF ( netcdf_data_format < 5 .AND. myid == 0 .AND. ivar > 1 ) THEN 231 234 DEALLOCATE( local_pf ) 232 235 ALLOCATE( local_pf(mask_size_l(mid,1),mask_size_l(mid,2), & … … 240 243 !-- Store the variable chosen. 241 244 resorted = .FALSE. 242 SELECT CASE ( TRIM( domask(mid,av,i f) ) )245 SELECT CASE ( TRIM( domask(mid,av,ivar) ) ) 243 246 244 247 CASE ( 'e' ) … … 511 514 !-- Radiation quantity 512 515 IF ( radiation ) THEN 513 CALL radiation_data_output_mask(av, domask(mid,av,i f), found,&516 CALL radiation_data_output_mask(av, domask(mid,av,ivar), found,& 514 517 local_pf ) 515 518 ENDIF … … 518 521 !-- User defined quantity 519 522 IF ( .NOT. found ) THEN 520 CALL user_data_output_mask(av, domask(mid,av,i f), found,&523 CALL user_data_output_mask(av, domask(mid,av,ivar), found, & 521 524 local_pf ) 522 525 ENDIF … … 526 529 IF ( .NOT. found ) THEN 527 530 WRITE ( message_string, * ) 'no output available for: ', & 528 TRIM( domask(mid,av,i f) )531 TRIM( domask(mid,av,ivar) ) 529 532 CALL message( 'data_output_mask', 'PA0327', 0, 0, 0, 6, 0 ) 530 533 ENDIF … … 559 562 ! 560 563 !-- (1) a. Parallel I/O using netCDF 4 (not yet tested) 561 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 562 id_var_domask(mid,av,if), & 563 local_pf, & 564 start = (/ mask_start_l(mid,1), mask_start_l(mid,2), & 565 mask_start_l(mid,3), domask_time_count(mid,av) /), & 566 count = (/ mask_size_l(mid,1), mask_size_l(mid,2), & 564 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 565 id_var_domask(mid,av,ivar), local_pf, & 566 start = (/ mask_start_l(mid,1), mask_start_l(mid,2), & 567 mask_start_l(mid,3), domask_time_count(mid,av) /), & 568 count = (/ mask_size_l(mid,1), mask_size_l(mid,2), & 567 569 mask_size_l(mid,3), 1 /) ) 568 570 CALL netcdf_handle_error( 'data_output_mask', 461 ) … … 608 610 ENDDO 609 611 610 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), &611 id_var_domask(mid,av,i f), total_pf,&612 start = (/ 1, 1, 1, domask_time_count(mid,av) /), &613 count = (/ mask_size(mid,1), mask_size(mid,2), &612 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 613 id_var_domask(mid,av,ivar), total_pf, & 614 start = (/ 1, 1, 1, domask_time_count(mid,av) /), & 615 count = (/ mask_size(mid,1), mask_size(mid,2), & 614 616 mask_size(mid,3), 1 /) ) 615 617 CALL netcdf_handle_error( 'data_output_mask', 462 ) … … 652 654 !-- (2) For serial execution of PALM, the single processor (PE0) holds all 653 655 !-- data and writes them directly to file. 654 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 655 id_var_domask(mid,av,if), & 656 local_pf, & 657 start = (/ 1, 1, 1, domask_time_count(mid,av) /), & 658 count = (/ mask_size_l(mid,1), mask_size_l(mid,2), & 659 mask_size_l(mid,3), 1 /) ) 656 nc_stat = NF90_PUT_VAR( id_set_mask(mid,av), & 657 id_var_domask(mid,av,ivar), local_pf, & 658 start = (/ 1, 1, 1, domask_time_count(mid,av) /), & 659 count = (/ mask_size_l(mid,1), mask_size_l(mid,2),& 660 mask_size_l(mid,3), 1 /) ) 660 661 CALL netcdf_handle_error( 'data_output_mask', 463 ) 661 662 #endif 662 663 663 i f = if+ 1664 ivar = ivar + 1 664 665 665 666 ENDDO
Note: See TracChangeset
for help on using the changeset viewer.