Changeset b5127f9 in flexpart.git


Ignore:
Timestamp:
Aug 4, 2017, 2:18:03 PM (7 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, univie
Children:
61e07ba, 1d072c0
Parents:
5184a7c
Message:

Fixed an inconsistency (serial vs parallel) with domain-filling option

Location:
src
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • src/init_domainfill.f90

    r7999df47 rb5127f9  
    400400  end do
    401401
     402! Reduce numpart if invalid particles at end of arrays
     403  do i=numpart, 1, -1
     404      if (itra1(i).eq.-999999999) then
     405        numpart=numpart-1
     406      else
     407        exit
     408      end if
     409    end do
     410
    402411! If particles shall be read in to continue an existing run,
    403412! then the accumulated masses at the domain boundaries must be read in, too.
     
    414423
    415424
    416 
    417 
    418425end subroutine init_domainfill
  • src/init_domainfill_mpi.f90

    r16b61a5 rb5127f9  
    370370!***********************************************
    371371
    372 !    do j=1,numpart
    373     do j=1,npoint(1)
     372    do j=1,numpart
    374373      if ((xtra1_tmp(j).lt.0.).or.(xtra1_tmp(j).ge.real(nxmin1)).or. &
    375374           (ytra1_tmp(j).lt.0.).or.(ytra1_tmp(j).ge.real(nymin1))) then
     
    475474    endif
    476475
    477     numpart = npart(1)/mp_partgroup_np
     476    numpart = numpart/mp_partgroup_np
    478477    if (mod(numpart,mp_partgroup_np).ne.0) numpart=numpart+1
    479478
     
    488487
    489488! Distribute particles to other processes (numpart is 'per-process', not total)
    490     call MPI_Bcast(numpart, 1, MPI_INTEGER, id_root, mp_comm_used, mp_ierr)
     489  call MPI_Bcast(numpart, 1, MPI_INTEGER, id_root, mp_comm_used, mp_ierr)
    491490! eso TODO: xmassperparticle: not necessary to send
    492     call MPI_Bcast(xmassperparticle, 1, mp_sp, id_root, mp_comm_used, mp_ierr)
    493     call mpif_send_part_properties(numpart)
     491  call MPI_Bcast(xmassperparticle, 1, mp_sp, id_root, mp_comm_used, mp_ierr)
     492  call mpif_send_part_properties(numpart)
    494493
    495494! Deallocate the temporary arrays used for all particles
    496     deallocate(itra1_tmp,npoint_tmp,nclass_tmp,idt_tmp,itramem_tmp,&
     495  deallocate(itra1_tmp,npoint_tmp,nclass_tmp,idt_tmp,itramem_tmp,&
    497496         & itrasplit_tmp,xtra1_tmp,ytra1_tmp,ztra1_tmp,xmass1_tmp)
    498497
  • src/mean_mod.f90

    r4c64400 rb5127f9  
    180180    xq=0._sp
    181181    do i=1,number
    182       xl=xl+x_dp(i)
    183       xq=xq+x_dp(i)*x_dp(i)
     182      xl=xl+real(x_dp(i),kind=sp)
     183      xq=xq+real(x_dp(i),kind=sp)*real(x_dp(i),kind=sp)
    184184    end do
    185185
     
    237237    end do
    238238
    239     xm=xl/real(number,kind=sp)
     239    xm=real(xl,kind=sp)/real(number,kind=sp)
    240240
    241241    xaux=xq-xl*xl/real(number,kind=dp)
  • src/mpi_mod.f90

    r4c64400 rb5127f9  
    332332! eso 08/2016: Increase maxpart per process, in case of unbalanced distribution
    333333    maxpart_mpi=int(mp_maxpart_factor*real(maxpart)/real(mp_partgroup_np))
     334    if (mp_np == 1) maxpart_mpi = maxpart
    334335
    335336! Do not allocate particle data arrays for readwind process
     
    550551! "numpart" is larger than the actual used, so we reduce it if there are
    551552! invalid particles at the end of the arrays
     553
    552554601 do i=num_part, 1, -1
    553555      if (itra1(i).eq.-999999999) then
     
    559561
    560562
    561 !601 end subroutine mpif_send_part_properties
    562563  end subroutine mpif_send_part_properties
    563564
  • src/readavailable.f90

    r4c64400 rb5127f9  
    6363  integer :: i,idiff,ldat,ltim,wftime1(maxwf),numbwfn(maxnests),k
    6464  integer :: wftime1n(maxnests,maxwf),wftimen(maxnests,maxwf)
     65  logical :: lwarntd=.true.
    6566  real(kind=dp) :: juldate,jul,beg,end
    6667  character(len=255) :: fname,spec,wfname1(maxwf),wfspec1(maxwf)
     
    241242           &'
    242243      write(*,*) 'THEREFORE, TRAJECTORIES HAVE TO BE SKIPPED.'
    243     else if (idiff.gt.idiffnorm.and.lroot) then
     244    else if (idiff.gt.idiffnorm.and.lroot.and.lwarntd) then
    244245      write(*,*) 'FLEXPART WARNING: TIME DIFFERENCE BETWEEN TWO'
    245246      write(*,*) 'WIND FIELDS IS BIG. THIS MAY CAUSE A DEGRADATION'
    246247      write(*,*) 'OF SIMULATION QUALITY.'
     248      lwarntd=.false. ! only issue this warning once
    247249    endif
    248250  end do
  • src/readcommand.f90

    r6985a98 rb5127f9  
    146146  ohfields_path="../../flexin/"
    147147
     148  !Af set release-switch
     149  WETBKDEP=.false.
     150  DRYBKDEP=.false.
     151
    148152  ! Open the command file and read user options
    149153  ! Namelist input first: try to read as namelist file
     
    321325        ind_samp = 0
    322326     endif
    323   !Af set release-switch
    324      WETBKDEP=.false.
    325      DRYBKDEP=.false.
    326327     select case (ind_receptor)
    327328     case (1)  !  1 .. concentration at receptor
  • src/timemanager_mpi.f90

    r16b61a5 rb5127f9  
    773773              endif
    774774            else
    775               xmassfract=1.
     775              xmassfract=1.0
    776776            endif
    777777          end do
     
    781781          !         xmass1(j,:)), ' of ', sum(xmass(npoint(j),:)),')'
    782782            itra1(j)=-999999999
     783            if (verbosity.gt.0) then
     784              print*,'terminated particle ',j,' for small mass'
     785            endif
    783786          endif
    784787
Note: See TracChangeset for help on using the changeset viewer.
hosted by ZAMG