Changeset 0a94e13 in flexpart.git for src/timemanager_mpi.f90


Ignore:
Timestamp:
May 6, 2019, 11:43:21 AM (5 years ago)
Author:
Espen Sollum ATMOS <eso@…>
Branches:
master, 10.4.1_pesei, GFS_025, bugfixes+enhancements, dev, release-10, release-10.4.1, scaling-bug
Children:
0c8c7f2
Parents:
328fdf9
Message:

Added ipout=3 option for time averaged particle output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/timemanager_mpi.f90

    r328fdf9 r0a94e13  
    113113  integer :: j,ks,kp,l,n,itime=0,nstop,nstop1,memstat=0
    114114! integer :: ksp
    115   integer :: ip
     115  integer :: ip,irec
    116116  integer :: loutnext,loutstart,loutend
    117117  integer :: ix,jy,ldeltat,itage,nage,idummy
     
    129129! Measure time spent in timemanager
    130130  if (mp_measure_time) call mpif_mtime('timemanager',0)
     131
    131132
    132133! First output for time 0
     
    344345! Check if particles should be redistributed among processes
    345346!***********************************************************
    346     if (mp_rebalance) call mpif_calculate_part_redist(itime)
     347    call mpif_calculate_part_redist(itime)
    347348
    348349
     
    59359446      format(' Simulated ',f7.1,' hours (',i13,' s), ',i13, ' particles')
    594595        if (ipout.ge.1) then
     596          irec=0
    595597          do ip=0, mp_partgroup_np-1
    596             if (ip.eq.mp_partid) call partoutput(itime) ! dump particle positions
     598            if (ip.eq.mp_partid) then
     599              if (mod(itime,ipoutfac*loutstep).eq.0) call partoutput(itime) ! dump particle positions
     600              if (ipout.eq.3) call partoutput_average(itime,irec) ! dump particle positions
     601            endif
     602            if (ipout.eq.3) irec=irec+npart_per_process(ip)
    597603            call mpif_mpi_barrier
    598604          end do
     
    757763        if (mp_measure_time) call mpif_mtime('advance',1)
    758764
     765  ! Calculate average position for particle dump output
     766  !****************************************************
     767
     768        if (ipout.eq.3) call partpos_average(itime,j)
     769
    759770
    760771! Calculate the gross fluxes across layer interfaces
     
    895906    do ip=0, mp_partgroup_np-1
    896907      if (ip.eq.mp_partid) then
    897         !if (mp_dbg_mode) write(*,*) 'call partoutput(itime), proc, mp_partid',ip,mp_partid
     908        if (mp_dbg_mode) write(*,*) 'call partoutput(itime), proc, mp_partid',ip,mp_partid
    898909        call partoutput(itime)    ! dump particle positions
    899910      end if
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG