Changeset 2512 for palm/trunk/SOURCE/data_output_3d.f90
- Timestamp:
- Oct 4, 2017 8:26:59 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/data_output_3d.f90
r2292 r2512 25 25 ! ----------------- 26 26 ! $Id$ 27 ! upper bounds of 3d output changed from nx+1,ny+1 to nx,ny 28 ! no output of ghost layer data 29 ! 30 ! 2292 2017-06-20 09:51:42Z schwenkel 27 31 ! Implementation of new microphysic scheme: cloud_scheme = 'morrison' 28 32 ! includes two more prognostic equations for cloud drop concentration (nc) … … 178 182 179 183 USE indices, & 180 ONLY: nbgp, nx, nxl, nx lg, nxr, nxrg, ny, nyn, nyng, nys, nysg, nzb184 ONLY: nbgp, nx, nxl, nxr, ny, nyn, nys, nzb 181 185 182 186 USE kinds … … 241 245 ! 242 246 !-- Open output file. 243 !-- Also creates coordinate and fld-file for AVS. 244 !-- For classic or 64bit netCDF output or output of other (old) data formats, 245 !-- for a run on more than one PE, each PE opens its own file and 246 !-- writes the data of its subdomain in binary format (regardless of the format 247 !-- the user has requested). After the run, these files are combined to one 248 !-- file by combine_plot_fields in the format requested by the user (netcdf 249 !-- and/or avs). 247 !-- For classic or 64bit netCDF output on more than one PE, each PE opens its 248 !-- own file and writes the data of its subdomain in binary format. After the 249 !-- run, these files are combined to one NetCDF file by combine_plot_fields. 250 250 !-- For netCDF4/HDF5 output, data is written in parallel into one file. 251 251 IF ( netcdf_data_format < 5 ) THEN … … 314 314 ! 315 315 !-- Allocate a temporary array with the desired output dimensions. 316 ALLOCATE( local_pf(nxl g:nxrg,nysg:nyng,nzb_do:nzt_do) )316 ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) ) 317 317 318 318 SELECT CASE ( trimvar ) … … 359 359 IF ( simulated_time >= particle_advection_start ) THEN 360 360 tend = prt_count 361 CALL exchange_horiz( tend, nbgp )362 361 ELSE 363 362 tend = 0.0_wp 364 363 ENDIF 365 DO i = nxl g, nxrg366 DO j = nys g, nyng364 DO i = nxl, nxr 365 DO j = nys, nyn 367 366 DO k = nzb_do, nzt_do 368 367 local_pf(i,j,k) = tend(k,j,i) … … 372 371 resorted = .TRUE. 373 372 ELSE 374 CALL exchange_horiz( pc_av, nbgp )375 373 to_be_resorted => pc_av 376 374 ENDIF … … 404 402 ENDDO 405 403 ENDDO 406 CALL exchange_horiz( tend, nbgp )407 404 ELSE 408 405 tend = 0.0_wp 409 406 ENDIF 410 DO i = nxl g, nxrg411 DO j = nys g, nyng407 DO i = nxl, nxr 408 DO j = nys, nyn 412 409 DO k = nzb_do, nzt_do 413 410 local_pf(i,j,k) = tend(k,j,i) … … 417 414 resorted = .TRUE. 418 415 ELSE 419 CALL exchange_horiz( pr_av, nbgp )420 416 to_be_resorted => pr_av 421 417 ENDIF … … 423 419 CASE ( 'prr' ) 424 420 IF ( av == 0 ) THEN 425 CALL exchange_horiz( prr, nbgp ) 426 DO i = nxlg, nxrg 427 DO j = nysg, nyng 421 DO i = nxl, nxr 422 DO j = nys, nyn 428 423 DO k = nzb_do, nzt_do 429 424 local_pf(i,j,k) = prr(k,j,i) … … 432 427 ENDDO 433 428 ELSE 434 CALL exchange_horiz( prr_av, nbgp ) 435 DO i = nxlg, nxrg 436 DO j = nysg, nyng 429 DO i = nxl, nxr 430 DO j = nys, nyn 437 431 DO k = nzb_do, nzt_do 438 432 local_pf(i,j,k) = prr_av(k,j,i) … … 448 442 to_be_resorted => pt 449 443 ELSE 450 DO i = nxl g, nxrg451 DO j = nys g, nyng444 DO i = nxl, nxr 445 DO j = nys, nyn 452 446 DO k = nzb_do, nzt_do 453 447 local_pf(i,j,k) = pt(k,j,i) + l_d_cp * & … … 517 511 ENDDO 518 512 ENDDO 519 CALL exchange_horiz( tend, nbgp )520 513 ELSE 521 514 tend = 0.0_wp 522 515 ENDIF 523 DO i = nxl g, nxrg524 DO j = nys g, nyng516 DO i = nxl, nxr 517 DO j = nys, nyn 525 518 DO k = nzb_do, nzt_do 526 519 local_pf(i,j,k) = tend(k,j,i) … … 530 523 resorted = .TRUE. 531 524 ELSE 532 CALL exchange_horiz( ql_vp_av, nbgp )533 525 to_be_resorted => ql_vp_av 534 526 ENDIF … … 543 535 CASE ( 'qv' ) 544 536 IF ( av == 0 ) THEN 545 DO i = nxl g, nxrg546 DO j = nys g, nyng537 DO i = nxl, nxr 538 DO j = nys, nyn 547 539 DO k = nzb_do, nzt_do 548 540 local_pf(i,j,k) = q(k,j,i) - ql(k,j,i) … … 620 612 621 613 DEALLOCATE ( local_pf ) 622 ALLOCATE( local_pf(nxl g:nxrg,nysg:nyng,nzb_do:nzt_do) )614 ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) ) 623 615 624 616 CALL lsm_data_output_3d( av, do3d(av,if), found, local_pf ) … … 632 624 633 625 DEALLOCATE ( local_pf ) 634 ALLOCATE( local_pf(nxl g:nxrg,nysg:nyng,nzb_do:nzt_do) )626 ALLOCATE( local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do) ) 635 627 ENDIF 636 628 … … 672 664 !-- Resort the array to be output, if not done above 673 665 IF ( .NOT. resorted ) THEN 674 DO i = nxl g, nxrg675 DO j = nys g, nyng666 DO i = nxl, nxr 667 DO j = nys, nyn 676 668 DO k = nzb_do, nzt_do 677 669 local_pf(i,j,k) = to_be_resorted(k,j,i) … … 695 687 DO i = 0, io_blocks-1 696 688 IF ( i == io_group ) THEN 697 WRITE ( 30 ) nxl g, nxrg, nysg, nyng, nzb_do, nzt_do689 WRITE ( 30 ) nxl, nxr, nys, nyn, nzb_do, nzt_do 698 690 WRITE ( 30 ) local_pf(:,:,nzb_do:nzt_do) 699 691 ENDIF … … 707 699 ! 708 700 !-- Parallel output in netCDF4/HDF5 format. 709 !-- Do not output redundant ghost point data except for the 710 !-- boundaries of the total domain. 711 IF ( nxr == nx .AND. nyn /= ny ) THEN 712 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 713 local_pf(nxl:nxr+1,nys:nyn,nzb_do:nzt_do), & 714 start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 715 count = (/ nxr-nxl+2, nyn-nys+1, nzt_do-nzb_do+1, 1 /) ) 716 ELSEIF ( nxr /= nx .AND. nyn == ny ) THEN 717 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 718 local_pf(nxl:nxr,nys:nyn+1,nzb_do:nzt_do), & 719 start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 720 count = (/ nxr-nxl+1, nyn-nys+2, nzt_do-nzb_do+1, 1 /) ) 721 ELSEIF ( nxr == nx .AND. nyn == ny ) THEN 722 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 723 local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do ), & 724 start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 725 count = (/ nxr-nxl+2, nyn-nys+2, nzt_do-nzb_do+1, 1 /) ) 726 ELSE 701 ! IF ( nxr == nx .AND. nyn /= ny ) THEN 702 ! nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 703 ! local_pf(nxl:nxr+1,nys:nyn,nzb_do:nzt_do), & 704 ! start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 705 ! count = (/ nxr-nxl+2, nyn-nys+1, nzt_do-nzb_do+1, 1 /) ) 706 ! ELSEIF ( nxr /= nx .AND. nyn == ny ) THEN 707 ! nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 708 ! local_pf(nxl:nxr,nys:nyn+1,nzb_do:nzt_do), & 709 ! start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 710 ! count = (/ nxr-nxl+1, nyn-nys+2, nzt_do-nzb_do+1, 1 /) ) 711 ! ELSEIF ( nxr == nx .AND. nyn == ny ) THEN 712 ! nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 713 ! local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do ), & 714 ! start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 715 ! count = (/ nxr-nxl+2, nyn-nys+2, nzt_do-nzb_do+1, 1 /) ) 716 ! ELSE 727 717 nc_stat = NF90_PUT_VAR( id_set_3d(av), id_var_do3d(av,if), & 728 718 local_pf(nxl:nxr,nys:nyn,nzb_do:nzt_do), & 729 719 start = (/ nxl+1, nys+1, nzb_do+1, do3d_time_count(av) /), & 730 720 count = (/ nxr-nxl+1, nyn-nys+1, nzt_do-nzb_do+1, 1 /) ) 731 ENDIF721 ! ENDIF 732 722 CALL netcdf_handle_error( 'data_output_3d', 386 ) 733 723 #endif … … 738 728 local_pf(nxl:nxr+1,nys:nyn+1,nzb_do:nzt_do), & 739 729 start = (/ 1, 1, 1, do3d_time_count(av) /), & 740 count = (/ nx+ 2, ny+2, nzt_do-nzb_do+1, 1 /) )730 count = (/ nx+1, ny+1, nzt_do-nzb_do+1, 1 /) ) 741 731 CALL netcdf_handle_error( 'data_output_3d', 446 ) 742 732 #endif
Note: See TracChangeset
for help on using the changeset viewer.