Commit 5f9d14aa authored by Espen Sollum's avatar Espen Sollum
Browse files

Updated wet depo scheme

parent cd851382
&COMMAND
LDIRECT= 1,
IBDATE= 20110310,
IBTIME= 120000,
IEDATE= 20110311,
IETIME= 040000,
IBDATE= 20140911,
IBTIME= 050000,
IEDATE= 20140911,
IETIME= 230000,
LOUTSTEP= 3600,
LOUTAVER= 3600,
LOUTSAMPLE= 900,
......
......@@ -6,11 +6,11 @@
********************************************************************************
1. ------.---- 4X,F11.4
-15.0000 GEOGRAFICAL LONGITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
-85.0000 GEOGRAFICAL LONGITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
OUTLONLEFT (left boundary of the first grid cell - not its centre)
2. ------.---- 4X,F11.4
35.0000 GEOGRAFICAL LATITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
30.0000 GEOGRAFICAL LATITUDE OF LOWER LEFT CORNER OF OUTPUT GRID
OUTLATLOWER (lower boundary of the first grid cell - not its centre)
3. ----- 4X,I5
......
......@@ -3,32 +3,32 @@
SPECNUM_REL= 108,
/
&RELEASE
IDATE1= 20110310,
ITIME1= 120000,
IDATE2= 20110310,
ITIME2= 130000,
LON1= 15.004 ,
LON2= 15.054 ,
LAT1= 44.734 ,
LAT2= 44.784 ,
IDATE1= 20140911,
ITIME1= 070000,
IDATE2= 20140911,
ITIME2= 080000,
LON1= -75.250 ,
LON2= -75.250 ,
LAT1= 38.000 ,
LAT2= 38.000 ,
Z1= 1500.000000 ,
Z2= 3000.000000 ,
ZKIND= 1,
MASS= 2.1000E8 ,
MASS= 2.0000E8 ,
PARTS= 2000000
COMMENT="TEST1 ",
/
&RELEASE
IDATE1= 20110310,
ITIME1= 120000,
IDATE2= 20110310,
ITIME2= 130000,
LON1= 20.004 ,
LON2= 20.054 ,
LAT1= 44.734 ,
LAT2= 44.784 ,
Z1= 1500.000000 ,
Z2= 3000.000000 ,
IDATE1= 20140911,
ITIME1= 070000,
IDATE2= 20140911,
ITIME2= 080000,
LON1= -79.250 ,
LON2= -79.250 ,
LAT1= 38.100 ,
LAT2= 38.100 ,
Z1= 100.000000 ,
Z2= 1000.000000 ,
ZKIND= 1,
MASS= 2.0000E8 ,
PARTS= 2000000
......
......@@ -423,12 +423,25 @@ program flexpart
call timemanager
! NIK 16.02.2005
write(*,*) '**********************************************'
write(*,*) 'Total number of occurences of below-cloud scavenging', tot_blc_count
write(*,*) 'Total number of occurences of in-cloud scavenging', tot_inc_count
write(*,*) '**********************************************'
if (lroot) then
! eso TODO: do MPI_Reduce (sum) of total occurences across processes
call MPI_Reduce(MPI_IN_PLACE, tot_blc_count, 1, mp_pp, MPI_SUM, id_root, &
& mp_comm_used, mp_ierr)
call MPI_Reduce(MPI_IN_PLACE, tot_inc_count, 1, mp_pp, MPI_SUM, id_root, &
& mp_comm_used, mp_ierr)
else
call MPI_Reduce(tot_blc_count, tot_blc_count, 1, mp_pp, MPI_SUM, id_root, &
& mp_comm_used, mp_ierr)
call MPI_Reduce(tot_inc_count, tot_inc_count, 1, mp_pp, MPI_SUM, id_root, &
& mp_comm_used, mp_ierr)
end if
if (lroot) then
write(*,*) '**********************************************'
write(*,*) 'Total number of occurences of below-cloud scavenging', tot_blc_count
write(*,*) 'Total number of occurences of in-cloud scavenging', tot_inc_count
write(*,*) '**********************************************'
write(*,*) 'CONGRATULATIONS: YOU HAVE SUCCESSFULLY COMPLETED A FLE&
&XPART MODEL RUN!'
end if
......
......@@ -228,8 +228,7 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
h=0.
if (ngrid.le.0) then
do k=1,2
! eso: compatibility with 3-field version
mind=memind(k)
mind=memind(k) ! eso: compatibility with 3-field version
do j=jy,jyp
do i=ix,ixp
if (hmix(i,j,1,mind).gt.h) h=hmix(i,j,1,mind)
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
......@@ -268,8 +268,7 @@ module com_mod
! wfspec(maxwf) specifications of wind field file, e.g. if on hard
! disc or on tape
integer :: memtime(numwfmem),memind(numwfmem) ! eso: or memind(3) and change
! interpol_rain
integer :: memtime(numwfmem),memind(3) ! eso: or memind(numwfmem)
! memtime [s] validation times of wind fields in memory
! memind pointer to wind field, in order to avoid shuffling
......
......@@ -61,7 +61,8 @@ subroutine conccalc(itime,weight)
real :: rhoprof(2),rhoi
real :: xl,yl,wx,wy,w
real,parameter :: factor=.596831, hxmax=6.0, hymax=4.0, hzmax=150.
integer :: mind2
! mind2 eso: pointer to 2nd windfield in memory
! For forward simulations, make a loop over the number of species;
! for backward simulations, make an additional loop over the
......@@ -70,6 +71,8 @@ subroutine conccalc(itime,weight)
if (mp_measure_time) call mpif_mtime('conccalc',0)
mind2=memind(2)
do i=1,numpart
if (itra1(i).ne.itime) goto 20
......@@ -130,10 +133,15 @@ subroutine conccalc(itime,weight)
! Take density from 2nd wind field in memory (accurate enough, no time interpolation needed)
!*****************************************************************************
do ind=indz,indzp
rhoprof(ind-indz+1)=p1*rho(ix ,jy ,ind,2) &
+p2*rho(ixp,jy ,ind,2) &
+p3*rho(ix ,jyp,ind,2) &
+p4*rho(ixp,jyp,ind,2)
! rhoprof(ind-indz+1)=p1*rho(ix ,jy ,ind,2) &
! +p2*rho(ixp,jy ,ind,2) &
! +p3*rho(ix ,jyp,ind,2) &
! +p4*rho(ixp,jyp,ind,2)
rhoprof(ind-indz+1)=p1*rho(ix ,jy ,ind,mind2) &
+p2*rho(ixp,jy ,ind,mind2) &
+p3*rho(ix ,jyp,ind,mind2) &
+p4*rho(ixp,jyp,ind,mind2)
end do
rhoi=(dz1*rhoprof(2)+dz2*rhoprof(1))*dz
elseif (ind_samp.eq.0) then
......
......@@ -98,6 +98,8 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to ensure identical results between 2&3-fields versions
! Determine current calendar date, needed for the file name
......@@ -139,6 +141,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -161,19 +164,22 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
yl=(yl-ylat0)/dy !v9.1.1
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
! Output is different for forward and backward simulations
......
......@@ -103,6 +103,8 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to ensure identical results between 2&3-fields versions
! Measure execution time
if (mp_measure_time) call mpif_mtime('rootonly',0)
......@@ -147,6 +149,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -169,8 +172,10 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
yl=(yl-ylat0)/dy !v9.1.1
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
......@@ -180,7 +185,8 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
......
......@@ -94,6 +94,8 @@ subroutine concoutput_nest(itime,outnum)
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to ensure identical results between 2&3-fields versions
! Determine current calendar date, needed for the file name
......@@ -133,6 +135,7 @@ subroutine concoutput_nest(itime,outnum)
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -155,19 +158,22 @@ subroutine concoutput_nest(itime,outnum)
yl=(yl-ylat0)/dy
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
! Output is different for forward and backward simulations
......
......@@ -98,6 +98,8 @@ subroutine concoutput_nest(itime,outnum)
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to ensure identical results between 2&3-fields versions
! Measure execution time
if (mp_measure_time) then
......@@ -148,6 +150,7 @@ subroutine concoutput_nest(itime,outnum)
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -170,8 +173,10 @@ subroutine concoutput_nest(itime,outnum)
yl=(yl-ylat0)/dy
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
......@@ -181,7 +186,8 @@ subroutine concoutput_nest(itime,outnum)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
......
......@@ -104,18 +104,12 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to get consistent results between 2&3-fields versions
! Measure execution time
if (mp_measure_time) then
call cpu_time(mp_root_time_beg)
mp_root_wtime_beg = mpi_wtime()
end if
if (mp_measure_time) call mpif_mtime('rootonly',0)
if (verbosity.eq.1) then
print*,'inside concoutput_surf '
CALL SYSTEM_CLOCK(count_clock)
WRITE(*,*) 'SYSTEM_CLOCK',count_clock - count_clock0
endif
! Determine current calendar date, needed for the file name
!**********************************************************
......@@ -164,6 +158,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -186,19 +181,22 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
yl=(yl-ylat0)/dy
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
! Output is different for forward and backward simulations
......@@ -654,11 +652,6 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
end do
end do
if (mp_measure_time) then
call cpu_time(mp_root_time_end)
mp_root_wtime_end = mpi_wtime()
mp_root_time_total = mp_root_time_total + (mp_root_time_end - mp_root_time_beg)
mp_root_wtime_total = mp_root_wtime_total + (mp_root_wtime_end - mp_root_wtime_beg)
end if
if (mp_measure_time) call mpif_mtime('rootonly',1)
end subroutine concoutput_surf
......@@ -97,6 +97,8 @@ subroutine concoutput_surf_nest(itime,outnum)
logical :: sp_zer
character :: adate*8,atime*6
character(len=3) :: anspec
integer :: mind
! mind eso:added to get consistent results between 2&3-fields versions
! Measure execution time
if (mp_measure_time) then
......@@ -147,6 +149,7 @@ subroutine concoutput_surf_nest(itime,outnum)
! data to that altitude
!*******************************************************************
mind=memind(2)
do kz=1,numzgrid
if (kz.eq.1) then
halfheight=outheight(1)/2.
......@@ -169,19 +172,22 @@ subroutine concoutput_surf_nest(itime,outnum)
yl=(yl-ylat0)/dy
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
rho(iix,jjy,kzz-1,2)*dz2)/dz
! densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,2)*dz1+ &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid(ix,jy,kz)=(rho(iix,jjy,kzz,mind)*dz1+ &
rho(iix,jjy,kzz-1,mind)*dz2)/dz
end do
end do
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
densityoutrecept(i)=rho(iix,jjy,1,2)
end do
do i=1,numreceptor
xl=xreceptor(i)
yl=yreceptor(i)
iix=max(min(nint(xl),nxmin1),0)
jjy=max(min(nint(yl),nymin1),0)
!densityoutrecept(i)=rho(iix,jjy,1,2)
densityoutrecept(i)=rho(iix,jjy,1,mind)
end do
! Output is different for forward and backward simulations
......
File mode changed from 100755 to 100644
......@@ -148,7 +148,7 @@ subroutine getfields(itime,nstop,memstat)
else
! 3 fields in memory
! Note that the reader process never needs to keep 3 fields in memory,
! so it is possible to save some memory here
! (2 is enough) so it is possible to save some memory
!*********************************************************************
if (mind3.eq.32.or.mind3.eq.19) then
if (lmpreader) then
......@@ -244,7 +244,7 @@ subroutine getfields(itime,nstop,memstat)
call verttransform_nests(memind(2),uuhn,vvhn,wwhn,pvhn)
end if
memtime(2)=wftime(indj+1)
! :DEV: not used
! DEV: not used
if (.not.lmp_sync) memind(3)=3 ! indicate position of next read
nstop = 1
goto 60
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
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