Commit 94bb3836 authored by Espen Sollum's avatar Espen Sollum
Browse files

Merge branch 'wetdep' into dev

parents 1a04fab1 18adf604
...@@ -492,14 +492,15 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, & ...@@ -492,14 +492,15 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
!************************************************************************* !*************************************************************************
if (mdomainfill.eq.0) then if (mdomainfill.eq.0) then
do nsp=1,nspec ! ESO 05.2015 Changed this to fix MQUASILAG option, where nrelpoint is
if (xmass(nrelpoint,nsp).gt.eps2) goto 887 ! particle number and thus xmass array goes out of bounds
end do ! do nsp=1,nspec
887 nsp=min(nsp,nspec) ! if (xmass(nrelpoint,nsp).gt.eps2) goto 887
!!$ if (density(nsp).gt.0.) & ! end do
!!$ call get_settling(itime,xts,yts,zt,nsp,settling) !old ! 887 nsp=min(nsp,nspec)
if (density(nsp).gt.0.) & if (nspec.eq.1.and.density(1).gt.0.) then
call get_settling(itime,real(xt),real(yt),zt,nsp,settling) !bugfix call get_settling(itime,real(xt),real(yt),zt,nsp,settling) !bugfix
end if
w=w+settling w=w+settling
endif endif
...@@ -653,14 +654,17 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, & ...@@ -653,14 +654,17 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
if (mdomainfill.eq.0) then if (mdomainfill.eq.0) then
do nsp=1,nspec ! ESO 05.2015 Changed this to fix MQUASILAG option, where nrelpoint is
if (xmass(nrelpoint,nsp).gt.eps2) goto 888 ! particle number and thus xmass array goes out of bounds
end do
888 nsp=min(nsp,nspec) ! do nsp=1,nspec
!!$ if (density(nsp).gt.0.) & ! if (xmass(nrelpoint,nsp).gt.eps2) goto 888
!!$ call get_settling(itime,xts,yts,zt,nsp,settling) !old ! end do
if (density(nsp).gt.0.) & ! 888 nsp=min(nsp,nspec)
call get_settling(itime,real(xt),real(yt),zt,nsp,settling) !bugfix ! if (density(nsp).gt.0.) then
if (nspec.eq.1.and.density(1).gt.0.) then
call get_settling(itime,real(xt),real(yt),zt,nsp,settling) !bugfix
end if
w=w+settling w=w+settling
endif endif
...@@ -857,14 +861,16 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, & ...@@ -857,14 +861,16 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
endif endif
if (mdomainfill.eq.0) then if (mdomainfill.eq.0) then
do nsp=1,nspec ! ESO 05.2015 Changed this to fix MQUASILAG option, where nrelpoint is
if (xmass(nrelpoint,nsp).gt.eps2) goto 889 ! particle number and thus xmass array goes out of bounds
end do ! do nsp=1,nspec
889 nsp=min(nsp,nspec) ! if (xmass(nrelpoint,nsp).gt.eps2) goto 889
!!$ if (density(nsp).gt.0.) & ! end do
!!$ call get_settling(itime+ldt,xts,yts,zt,nsp,settling) !old ! 889 nsp=min(nsp,nspec)
if (density(nsp).gt.0.) & ! if (density(nsp).gt.0.) then
call get_settling(itime+ldt,real(xt),real(yt),zt,nsp,settling) !bugfix if (nspec.eq.1.and.density(1).gt.0.) then
call get_settling(itime+ldt,real(xt),real(yt),zt,nsp,settling) !bugfix
end if
w=w+settling w=w+settling
endif endif
......
...@@ -185,7 +185,7 @@ module par_mod ...@@ -185,7 +185,7 @@ module par_mod
! Maximum number of particles, species, and similar ! Maximum number of particles, species, and similar
!************************************************** !**************************************************
integer,parameter :: maxpart=20000000 integer,parameter :: maxpart=1000000
integer,parameter :: maxspec=6 integer,parameter :: maxspec=6
real,parameter :: minmass=0.0001 real,parameter :: minmass=0.0001
......
...@@ -145,7 +145,7 @@ subroutine partoutput_short(itime) ...@@ -145,7 +145,7 @@ subroutine partoutput_short(itime)
(i4dump(i),(idump(j,i),j=1,3),i=1,numshortout) (i4dump(i),(idump(j,i),j=1,3),i=1,numshortout)
write(*,*) numshortout,numshortall !write(*,*) numshortout,numshortall
close(unitshortpart) close(unitshortpart)
......
...@@ -588,8 +588,8 @@ subroutine timemanager ...@@ -588,8 +588,8 @@ subroutine timemanager
xmass1(j,ks)=xmass1(j,ks)*decfact xmass1(j,ks)=xmass1(j,ks)*decfact
endif endif
! Skip check on mass fraction when npoint represents particle number
if (mdomainfill.eq.0) then if (mdomainfill.eq.0.and.mquasilag.eq.0) then
if (xmass(npoint(j),ks).gt.0.) & if (xmass(npoint(j),ks).gt.0.) &
xmassfract=max(xmassfract,real(npart(npoint(j)))* & xmassfract=max(xmassfract,real(npart(npoint(j)))* &
xmass1(j,ks)/xmass(npoint(j),ks)) xmass1(j,ks)/xmass(npoint(j),ks))
...@@ -604,8 +604,8 @@ subroutine timemanager ...@@ -604,8 +604,8 @@ subroutine timemanager
!CGZ-lifetime: Check mass fraction left/save lifetime !CGZ-lifetime: Check mass fraction left/save lifetime
!ZHG 2015 !ZHG 2015
else else
xmassfract=1. xmassfract=1.0
endif end if
end do end do
if (xmassfract.lt.minmass) then ! terminate all particles carrying less mass if (xmassfract.lt.minmass) then ! terminate all particles carrying less mass
......
...@@ -545,9 +545,14 @@ subroutine timemanager ...@@ -545,9 +545,14 @@ subroutine timemanager
! Decide whether to write an estimate of the number of particles released, ! Decide whether to write an estimate of the number of particles released,
! or exact number (require MPI reduce operation) ! or exact number (require MPI reduce operation)
numpart_tot_mpi = numpart*mp_partgroup_np if (mp_dev_mode) then
numpart_tot_mpi = numpart
else
numpart_tot_mpi = numpart*mp_partgroup_np
end if
if (mp_exact_numpart.and..not.(lmpreader.and.lmp_use_reader)) then if (mp_exact_numpart.and..not.(lmpreader.and.lmp_use_reader).and.&
&.not.mp_dev_mode) then
call MPI_Reduce(numpart, numpart_tot_mpi, 1, MPI_INTEGER, MPI_SUM, id_root, & call MPI_Reduce(numpart, numpart_tot_mpi, 1, MPI_INTEGER, MPI_SUM, id_root, &
& mp_comm_used, mp_ierr) & mp_comm_used, mp_ierr)
endif endif
...@@ -737,8 +742,8 @@ subroutine timemanager ...@@ -737,8 +742,8 @@ subroutine timemanager
xmass1(j,ks)=xmass1(j,ks)*decfact xmass1(j,ks)=xmass1(j,ks)*decfact
endif endif
! Skip check on mass fraction when npoint represents particle number
if (mdomainfill.eq.0) then if (mdomainfill.eq.0.and.mquasilag.eq.0) then
if (xmass(npoint(j),ks).gt.0.)then if (xmass(npoint(j),ks).gt.0.)then
xmassfract=max(xmassfract,real(npart(npoint(j)))* & xmassfract=max(xmassfract,real(npart(npoint(j)))* &
xmass1(j,ks)/xmass(npoint(j),ks)) xmass1(j,ks)/xmass(npoint(j),ks))
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment