...
 
......@@ -8,8 +8,8 @@
PCCN_AERO=-9.9, ! In-cloud scavenging (particles) - CCNeff (ccn_aero)
PIN_AERO=-9.9, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=-0.9E+9, ! Dry deposition (particles) - rho
PDQUER=-9.9, ! Dry deposition (particles) - dquer
PDSIGMA=-9.9, ! Dry deposition (particles) - dsig
PDQUER=0., ! Dry deposition (particles) - dquer
PDSIGMA=0., ! Dry deposition (particles) - dsig
PDRYVEL=-9.9, ! Alternative: dry deposition velocity
PRELDIFF=1.6, ! Dry deposition (gases) - D
PHENRY=1.0E-2, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2000.0, ! Dry deposition (particles) - rho
PDQUER=4.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E+9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2.0E+3, ! Dry deposition (particles) - rho
PDQUER=4.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E+9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2500.0, ! Dry deposition (particles) - rho
PDQUER=6.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-9.9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.9, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=1900.0, ! Dry deposition (particles) - rho
PDQUER=0.4E-06, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E-9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2500.0, ! Dry deposition (particles) - rho
PDQUER=6.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E-9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2500.0, ! Dry deposition (particles) - rho
PDQUER=6.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E-9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2500.0, ! Dry deposition (particles) - rho
PDQUER=6.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.99, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E-9, ! Dry deposition (gases) - Henrys const.
......
......@@ -9,7 +9,7 @@
PIN_AERO=0.1, ! In-cloud scavenging (particles) - INeff (in_aero)
PDENSITY=2000.0, ! Dry deposition (particles) - rho
PDQUER=4.0E-07, ! Dry deposition (particles) - dquer
PDSIGMA=0.3, ! Dry deposition (particles) - dsig
PDSIGMA=3.3, ! Dry deposition (particles) - dsig
PDRYVEL=-9.9, ! Alternative: dry deposition velocity
PRELDIFF=-9.9, ! Dry deposition (gases) - D
PHENRY=-0.9E-9, ! Dry deposition (gases) - Henrys const.
......
......@@ -110,5 +110,6 @@ enddo
write(*,*) '** unit [cm^3/molec/s] (in FLEXPART version 9.2 and below this had unit [cm3/s], note the unit is now changed!)'
write(*,*) '*** no unit'
print*,'rho: density'
end
......@@ -61,7 +61,7 @@ program flexpart
implicit none
integer :: i,j,ix,jy,inest
integer :: i,j,ix,jy,inest, iopt
integer :: idummy = -320
character(len=256) :: inline_options !pathfile, flexversion, arg2
integer :: metdata_format = GRIBFILE_CENTRE_UNKNOWN
......@@ -79,7 +79,7 @@ program flexpart
! FLEXPART version string
flexversion_major = '10' ! Major version number, also used for species file names
flexversion='Version '//trim(flexversion_major)//'.4 (2019-07-16)'
flexversion='Version '//trim(flexversion_major)//'.4 (2019-07-23)'
verbosity=0
! Read the pathnames where input/output files are stored
......@@ -108,15 +108,43 @@ program flexpart
print*,'Welcome to FLEXPART ', trim(flexversion)
print*,'FLEXPART is free software released under the GNU General Public License.'
! Ingest inline options
!*******************************************************
if (inline_options(1:1).eq.'-') then
if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then
print*, 'Verbose mode 1: display detailed information during run'
verbosity=1
print*,'inline_options:',inline_options
!verbose mode
iopt=index(inline_options,'v')
if (iopt.gt.0) then
verbosity=1
!print*, iopt, inline_options(iopt+1:iopt+1)
if (trim(inline_options(iopt+1:iopt+1)).eq.'2') then
!print*, 'verbosity=2'
print*, 'Verbose mode 2: display more detailed information during run'
verbosity=2
endif
endif
if (trim(inline_options).eq.'-v2') then
print*, 'Verbose mode 2: display more detailed information during run'
verbosity=2
!debug mode
iopt=index(inline_options,'d')
if (iopt.gt.0) then
debug_mode=.true.
endif
endif
! stop
! if (trim(inline_options).eq.'-v'.or.trim(inline_options).eq.'-v1') then
! print*, 'Verbose mode 1: display detailed information during run'
! verbosity=1
! endif
! if (trim(inline_options).eq.'-v2') then
! print*, 'Verbose mode 2: display more detailed information during run'
! verbosity=2
! endif
if (trim(inline_options).eq.'-i') then
print*, 'Info mode: provide detailed run specific information and stop'
verbosity=1
......@@ -134,6 +162,9 @@ program flexpart
print*, 'nymax=',nymax
print*, 'nzmax=',nzmax
print*,'nxshift=',nxshift
endif
if (verbosity.gt.0) then
write(*,*) 'call readpaths'
endif
call readpaths
......@@ -192,6 +223,9 @@ program flexpart
! Detect metdata format
!**********************
if (verbosity.gt.0) then
write(*,*) 'call detectformat'
endif
metdata_format = detectformat()
......
......@@ -761,6 +761,7 @@ module com_mod
!********************
! Verbosity, testing flags, namelist I/O
!********************
logical :: debug_mode=.false.
integer :: verbosity=0
integer :: info_flag=0
integer :: count_clock, count_clock0, count_rate, count_max
......
......@@ -354,7 +354,8 @@ subroutine concoutput_inversion(itime,outnum,gridtotalunc,wetgridtotalunc, &
open(unit=unitrelnames, file=path(2)(1:length(2))//'releases_out',form='formatted', &
& access='APPEND', iostat=ierr)
write(unitrelnames,'(a)') areldate//areltime//'_'//anspec
call flush(unit=unitrelnames)
!call flush(unit=unitrelnames)
flush(unit=unitrelnames)
close(unitrelnames)
endif
endif
......
......@@ -169,9 +169,6 @@ subroutine getvdep(n,ix,jy,ust,temp,pa,L,gr,rh,rr,snow,vdepo)
if (reldiff(i).gt.0.) then
if ((ra+rb(i)+rc(i)).gt.0.) then
vd=1./(ra+rb(i)+rc(i))
! XXXXXXXXXXXXXXXXXXXXXXXXXX TEST
! vd=1./rc(i)
! XXXXXXXXXXXXXXXXXXXXXXXXXX TEST
else
vd=9.999
endif
......@@ -187,6 +184,10 @@ subroutine getvdep(n,ix,jy,ust,temp,pa,L,gr,rh,rr,snow,vdepo)
call partdep(nspec,density,fract,schmi,vset,raquer,ust,nyl,vdepo)
!if (debug_mode) then
! print*,'getvdep:188: vdepo=', vdepo
!stop
!endif
! 7. If no detailed parameterization available, take constant deposition
! velocity if that is available
......
......@@ -92,8 +92,9 @@ module par_mod
! r_water specific gas constant for water vapor [J/kg/K]
real,parameter :: karman=0.40, href=15., convke=2.0
real,parameter :: hmixmin=100., hmixmax=4500., turbmesoscale=0.16
real,parameter :: d_trop=50., d_strat=0.1
real,parameter :: hmixmin=100., hmixmax=4500. !, turbmesoscale=0.16
!real,parameter :: d_trop=50., d_strat=0.1
real :: d_trop=50., d_strat=0.1, turbmesoscale=0.16 ! turbulence factors can change for different runs
real,parameter :: rho_water=1000. !ZHG 2015 [kg/m3]
!ZHG MAR2016
real,parameter :: incloud_ratio=6.2
......@@ -156,7 +157,7 @@ module par_mod
! GFS
integer,parameter :: nxmax=361,nymax=181,nuvzmax=138,nwzmax=138,nzmax=138
integer :: nxshift=0
integer :: nxshift=0 ! shift not fixed for the executable
!*********************************************
......
......@@ -102,19 +102,20 @@ subroutine part0(dquer,dsigma,density,fract,schmi,cun,vsh)
d01=dquer*dsigma**(-3.+delta*real(i))
x01=alog(d01/dquer)/xdummy
x02=alog(d02/dquer)/xdummy
!print*,'part0:: d02=' , d02 , 'd01=', d01
! Area under Gauss-function is calculated and gives mass fraction of interval
!****************************************************************************
fract(i)=0.5*(erf(x01)-erf(x02))
!print*,'part0:: fract(',i,')', fract(i)
!print*,'part0:: fract', fract(i), x01, x02, erf(x01), erf(x02)
! Geometric mean diameter of interval in [m]
!*******************************************
dmean=1.E-6*exp(0.5*alog(d01*d02))
!print*,'part0:: dmean=', dmean
! Calculation of time independent parameters of each interval
!************************************************************
......@@ -131,6 +132,10 @@ subroutine part0(dquer,dsigma,density,fract,schmi,cun,vsh)
schmi(i)=schmidt**(-2./3.)
vsh(i)=ga*density*dmean*dmean*cun/(18.*myl)
!print*,'part0:: vsh(',i,')', vsh(i)
end do
!stop 'part0'
end subroutine part0
......@@ -71,6 +71,7 @@ subroutine partdep(nc,density,fract,schmi,vset,ra,ustar,nyl,vdep)
!*****************************************************************************
use par_mod
use com_mod, only: debug_mode
implicit none
......@@ -109,8 +110,19 @@ subroutine partdep(nc,density,fract,schmi,vset,ra,ustar,nyl,vdep)
!***********************************************************************
vdep(ic)=vdep(ic)+vdepj*fract(ic,j)
!print*, 'partdep:113: ic', ic, 'vdep', vdep
!stop
end do
endif
end do
!if (debug_mode) then
! print*, 'partdep:122:'
! write(*,*) (vdep(ic), ic=1,nc)
!stop
!endif
end subroutine partdep
......@@ -114,7 +114,9 @@ subroutine readcommand
surf_only, &
cblflag, &
linversionout, &
ohfields_path
ohfields_path, &
d_trop, &
d_strat
! Presetting namelist command
ldirect=0
......
......@@ -295,7 +295,13 @@ subroutine readspecies(id_spec,pos_spec)
end if
if (density(pos_spec) .gt. 0) then
write(*,'(a)') ' Dry deposition is turned : ON'
if (reldiff(pos_spec).gt.0) then
stop 'density>0 (SPECIES is a particle) implies reldiff <=0 '
endif
else
if (reldiff(pos_spec).le.0) then
stop 'density<=0 (SPECIES is a gas) implies reldiff >0 '
endif
write(*,'(a)') ' Dry deposition is (density<0) : OFF'
end if
if (crain_aero(pos_spec).gt.10.0 .or. csnow_aero(pos_spec).gt.10.0 .or. &
......@@ -343,7 +349,21 @@ subroutine readspecies(id_spec,pos_spec)
end if
end if
if (dsigma(i).eq.0.) dsigma(i)=1.0001 ! avoid floating exception
! if (dsigma(i).eq.0.) dsigma(i)=1.0001 ! avoid floating exception
if (dquer(i).gt.0 .and. dsigma(i).le.1.) then !dsigma(i)=1.0001 ! avoid floating exception
!write(*,*) '#### FLEXPART MODEL ERROR! ####'
write(*,*) '#### FLEXPART MODEL WARNING ####'
write(*,*) '#### in SPECIES_',aspecnumb, ' ####'
write(*,*) '#### from v10.4 dsigma has to be larger than 1 ####'
write(*,*) '#### to adapt older SPECIES files, ####'
write(*,*) '#### if dsigma was < 1 ####'
write(*,*) '#### use the reciprocal of the old dsigma ####'
if (.not.debug_mode) then
stop
else
write(*,*) 'debug mode: continue'
endif
endif
if ((reldiff(i).gt.0.).and.(density(i).gt.0.)) then
write(*,*) '#### FLEXPART MODEL ERROR! FILE "SPECIES" ####'
......