Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
flexpart
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
flexpart
flexpart
Commits
07c3e71f
Commit
07c3e71f
authored
Jul 24, 2019
by
Ignacio Pisso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check dsigma for dry deposition velocity
parent
95a45d34
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
88 additions
and
15 deletions
+88
-15
src/FLEXPART.f90
src/FLEXPART.f90
+42
-8
src/com_mod.f90
src/com_mod.f90
+1
-0
src/getvdep.f90
src/getvdep.f90
+4
-3
src/part0.f90
src/part0.f90
+8
-3
src/partdep.f90
src/partdep.f90
+12
-0
src/readspecies.f90
src/readspecies.f90
+21
-1
No files found.
src/FLEXPART.f90
View file @
07c3e71f
...
...
@@ -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
()
...
...
src/com_mod.f90
View file @
07c3e71f
...
...
@@ -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
...
...
src/getvdep.f90
View file @
07c3e71f
...
...
@@ -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
...
...
src/part0.f90
View file @
07c3e71f
...
...
@@ -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
src/partdep.f90
View file @
07c3e71f
...
...
@@ -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
src/readspecies.f90
View file @
07c3e71f
...
...
@@ -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
(
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" ####'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment