Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
flexpart
flexpart
Commits
f13c04a2
Commit
f13c04a2
authored
Aug 24, 2018
by
Espen Sollum
Browse files
Merge branch rona
parents
39809923
bf7ca87f
Changes
20
Expand all
Hide whitespace changes
Inline
Side-by-side
options/SPECIES/SPECIES_029
0 → 100644
View file @
f13c04a2
&SPECIES_PARAMS
PSPECIES="C-CO2 ",
PWEIGHTMOLAR= 12.0000000 ,
/
src/advance.f90
View file @
f13c04a2
...
@@ -221,6 +221,11 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
...
@@ -221,6 +221,11 @@ subroutine advance(itime,nrelpoint,ldt,up,vp,wp, &
endif
endif
ixp
=
ix
+1
ixp
=
ix
+1
jyp
=
jy
+1
jyp
=
jy
+1
! fix (Espen 02.05.2017)
if
(
jyp
>=
nymax
)
then
write
(
*
,
*
)
'WARNING: advance.f90 jyp>nymax'
jyp
=
jyp
-1
endif
! Determine the lower left corner and its distance to the current position
! Determine the lower left corner and its distance to the current position
...
...
src/com_mod.f90
View file @
f13c04a2
...
@@ -120,6 +120,9 @@ module com_mod
...
@@ -120,6 +120,9 @@ module com_mod
integer
::
lnetcdfout
integer
::
lnetcdfout
! lnetcdfout 1 for netcdf grid output, 0 if not. Set in COMMAND (namelist input)
! lnetcdfout 1 for netcdf grid output, 0 if not. Set in COMMAND (namelist input)
integer
::
linversionout
! linversionout 1 for one grid_time output file for each release containing all timesteps
integer
::
nageclass
,
lage
(
maxageclass
)
integer
::
nageclass
,
lage
(
maxageclass
)
! nageclass number of ageclasses for the age spectra calculation
! nageclass number of ageclasses for the age spectra calculation
...
@@ -360,7 +363,9 @@ module com_mod
...
@@ -360,7 +363,9 @@ module com_mod
real
::
clwc
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!liquid [kg/kg]
real
::
clwc
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!liquid [kg/kg]
real
::
ciwc
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!ice [kg/kg]
real
::
ciwc
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!ice [kg/kg]
real
::
clw
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!combined [m3/m3]
real
::
clw
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
=
0.0
!combined [m3/m3]
! RLT add pressure and dry air density
real
::
prs
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
rho_dry
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
pv
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
pv
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
rho
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
rho
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
drhodz
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
real
::
drhodz
(
0
:
nxmax
-1
,
0
:
nymax
-1
,
nzmax
,
numwfmem
)
...
@@ -382,6 +387,7 @@ module com_mod
...
@@ -382,6 +387,7 @@ module com_mod
! uu,vv,ww [m/2] wind components in x,y and z direction
! uu,vv,ww [m/2] wind components in x,y and z direction
! uupol,vvpol [m/s] wind components in polar stereographic projection
! uupol,vvpol [m/s] wind components in polar stereographic projection
! tt [K] temperature data
! tt [K] temperature data
! prs air pressure
! qv specific humidity data
! qv specific humidity data
! pv (pvu) potential vorticity
! pv (pvu) potential vorticity
! rho [kg/m3] air density
! rho [kg/m3] air density
...
...
src/conccalc.f90
View file @
f13c04a2
...
@@ -101,6 +101,11 @@ subroutine conccalc(itime,weight)
...
@@ -101,6 +101,11 @@ subroutine conccalc(itime,weight)
jy
=
int
(
ytra1
(
i
))
jy
=
int
(
ytra1
(
i
))
ixp
=
ix
+1
ixp
=
ix
+1
jyp
=
jy
+1
jyp
=
jy
+1
! fix (Espen 02.05.2017)
if
(
jyp
>=
nymax
)
then
write
(
*
,
*
)
'WARNING: conccalc.f90 jyp>nymax'
jyp
=
jyp
-1
endif
ddx
=
xtra1
(
i
)
-
real
(
ix
)
ddx
=
xtra1
(
i
)
-
real
(
ix
)
ddy
=
ytra1
(
i
)
-
real
(
jy
)
ddy
=
ytra1
(
i
)
-
real
(
jy
)
rddx
=
1.
-
ddx
rddx
=
1.
-
ddx
...
...
src/concoutput.f90
View file @
f13c04a2
...
@@ -71,6 +71,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -71,6 +71,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
integer
::
sp_count_i
,
sp_count_r
integer
::
sp_count_i
,
sp_count_r
real
::
sp_fact
real
::
sp_fact
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
! RLT
real
::
densitydryrecept
(
maxreceptor
)
real
::
factor_dryrecept
(
maxreceptor
)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...
@@ -105,6 +108,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -105,6 +108,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! mind eso:added to ensure identical results between 2&3-fields versions
! mind eso:added to ensure identical results between 2&3-fields versions
character
(
LEN
=
8
),
save
::
file_stat
=
'REPLACE'
character
(
LEN
=
8
),
save
::
file_stat
=
'REPLACE'
logical
::
ldates_file
logical
::
ldates_file
logical
::
lexist
integer
::
ierr
integer
::
ierr
character
(
LEN
=
100
)
::
dates_char
character
(
LEN
=
100
)
::
dates_char
...
@@ -202,6 +206,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -202,6 +206,9 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
! rho(iix,jjy,kzz-1,2)*dz2)/dz
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
rho
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
rho
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
! RLT
densitydrygrid
(
ix
,
jy
,
kz
)
=
(
rho_dry
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
rho_dry
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
end
do
end
do
end
do
end
do
end
do
end
do
...
@@ -213,8 +220,14 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -213,8 +220,14 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
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
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
mind
)
! RLT
densitydryrecept
(
i
)
=
rho_dry
(
iix
,
jjy
,
1
,
mind
)
end
do
end
do
! RLT
! conversion factor for output relative to dry air
factor_drygrid
=
densityoutgrid
/
densitydrygrid
factor_dryrecept
=
densityoutrecept
/
densitydryrecept
! Output is different for forward and backward simulations
! Output is different for forward and backward simulations
do
kz
=
1
,
numzgrid
do
kz
=
1
,
numzgrid
...
@@ -362,7 +375,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -362,7 +375,7 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
if
((
ldirect
.eq.
1
)
.and.
(
WETDEP
))
then
if
((
ldirect
.eq.
1
)
.and.
(
WETDEP
))
then
do
jy
=
0
,
numygrid
-1
do
jy
=
0
,
numygrid
-1
do
ix
=
0
,
numxgrid
-1
do
ix
=
0
,
numxgrid
-1
!oncentraion greater zero
!
c
oncentraion greater zero
if
(
wetgrid
(
ix
,
jy
)
.gt.
smallnum
)
then
if
(
wetgrid
(
ix
,
jy
)
.gt.
smallnum
)
then
if
(
sp_zer
.eqv.
.true.
)
then
! first non zero value
if
(
sp_zer
.eqv.
.true.
)
then
! first non zero value
sp_count_i
=
sp_count_i
+1
sp_count_i
=
sp_count_i
+1
...
@@ -613,6 +626,49 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -613,6 +626,49 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
end
do
end
do
! RLT Aug 2017
! Write out conversion factor for dry air
inquire
(
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
exist
=
lexist
)
if
(
lexist
)
then
! open and append
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
form
=
'unformatted'
,&
status
=
'old'
,
action
=
'write'
,
access
=
'append'
)
else
! create new
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
form
=
'unformatted'
,&
status
=
'new'
,
action
=
'write'
)
endif
sp_count_i
=
0
sp_count_r
=
0
sp_fact
=
-1.
sp_zer
=
.true.
do
kz
=
1
,
numzgrid
do
jy
=
0
,
numygrid
-1
do
ix
=
0
,
numxgrid
-1
if
(
factor_drygrid
(
ix
,
jy
,
kz
)
.gt.
(
1.
+
smallnum
)
.or.
factor_drygrid
(
ix
,
jy
,
kz
)
.lt.
(
1.
-
smallnum
))
then
if
(
sp_zer
.eqv.
.true.
)
then
! first value not equal to one
sp_count_i
=
sp_count_i
+1
sparse_dump_i
(
sp_count_i
)
=
&
ix
+
jy
*
numxgrid
+
kz
*
numxgrid
*
numygrid
sp_zer
=
.false.
sp_fact
=
sp_fact
*
(
-1.
)
endif
sp_count_r
=
sp_count_r
+1
sparse_dump_r
(
sp_count_r
)
=
&
sp_fact
*
factor_drygrid
(
ix
,
jy
,
kz
)
else
! factor is one
sp_zer
=
.true.
endif
end
do
end
do
end
do
write
(
unitoutfactor
)
sp_count_i
write
(
unitoutfactor
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutfactor
)
sp_count_r
write
(
unitoutfactor
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
close
(
unitoutfactor
)
if
(
gridtotal
.gt.
0.
)
gridtotalunc
=
gridsigmatotal
/
gridtotal
if
(
gridtotal
.gt.
0.
)
gridtotalunc
=
gridsigmatotal
/
gridtotal
if
(
wetgridtotal
.gt.
0.
)
wetgridtotalunc
=
wetgridsigmatotal
/
&
if
(
wetgridtotal
.gt.
0.
)
wetgridtotalunc
=
wetgridsigmatotal
/
&
wetgridtotal
wetgridtotal
...
@@ -639,7 +695,23 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -639,7 +695,23 @@ subroutine concoutput(itime,outnum,gridtotalunc,wetgridtotalunc, &
end
do
end
do
endif
endif
! RLT Aug 2017
! Write out conversion factor for dry air
if
(
numreceptor
.gt.
0
)
then
inquire
(
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
exist
=
lexist
)
if
(
lexist
)
then
! open and append
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
form
=
'unformatted'
,&
status
=
'old'
,
action
=
'write'
,
access
=
'append'
)
else
! create new
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
form
=
'unformatted'
,&
status
=
'new'
,
action
=
'write'
)
endif
write
(
unitoutfactor
)
itime
write
(
unitoutfactor
)
(
factor_dryrecept
(
i
),
i
=
1
,
numreceptor
)
close
(
unitoutfactor
)
endif
! Reinitialization of grid
! Reinitialization of grid
!*************************
!*************************
...
...
src/concoutput_inversion.f90
0 → 100644
View file @
f13c04a2
This diff is collapsed.
Click to expand it.
src/concoutput_inversion_nest.f90
0 → 100644
View file @
f13c04a2
This diff is collapsed.
Click to expand it.
src/concoutput_nest.f90
View file @
f13c04a2
...
@@ -69,6 +69,9 @@ subroutine concoutput_nest(itime,outnum)
...
@@ -69,6 +69,9 @@ subroutine concoutput_nest(itime,outnum)
integer
::
sp_count_i
,
sp_count_r
integer
::
sp_count_i
,
sp_count_r
real
::
sp_fact
real
::
sp_fact
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
! RLT
real
::
densitydryrecept
(
maxreceptor
)
real
::
factor_dryrecept
(
maxreceptor
)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...
@@ -95,6 +98,7 @@ subroutine concoutput_nest(itime,outnum)
...
@@ -95,6 +98,7 @@ subroutine concoutput_nest(itime,outnum)
logical
::
sp_zer
logical
::
sp_zer
character
::
adate
*
8
,
atime
*
6
character
::
adate
*
8
,
atime
*
6
character
(
len
=
3
)
::
anspec
character
(
len
=
3
)
::
anspec
logical
::
lexist
integer
::
mind
integer
::
mind
! mind eso:added to ensure identical results between 2&3-fields versions
! mind eso:added to ensure identical results between 2&3-fields versions
...
@@ -163,6 +167,9 @@ subroutine concoutput_nest(itime,outnum)
...
@@ -163,6 +167,9 @@ subroutine concoutput_nest(itime,outnum)
! rho(iix,jjy,kzz-1,2)*dz2)/dz
! rho(iix,jjy,kzz-1,2)*dz2)/dz
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
rho
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
rho
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
! RLT
densitydrygrid
(
ix
,
jy
,
kz
)
=
(
rho_dry
(
iix
,
jjy
,
kzz
,
mind
)
*
dz1
+
&
rho_dry
(
iix
,
jjy
,
kzz
-1
,
mind
)
*
dz2
)/
dz
end
do
end
do
end
do
end
do
end
do
end
do
...
@@ -174,8 +181,14 @@ subroutine concoutput_nest(itime,outnum)
...
@@ -174,8 +181,14 @@ subroutine concoutput_nest(itime,outnum)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
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
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
mind
)
! RLT
densitydryrecept
(
i
)
=
rho_dry
(
iix
,
jjy
,
1
,
mind
)
end
do
end
do
! RLT
! conversion factor for output relative to dry air
factor_drygrid
=
densityoutgrid
/
densitydrygrid
factor_dryrecept
=
densityoutrecept
/
densitydryrecept
! Output is different for forward and backward simulations
! Output is different for forward and backward simulations
do
kz
=
1
,
numzgrid
do
kz
=
1
,
numzgrid
...
@@ -550,6 +563,47 @@ subroutine concoutput_nest(itime,outnum)
...
@@ -550,6 +563,47 @@ subroutine concoutput_nest(itime,outnum)
end
do
end
do
! RLT Aug 2017
! Write out conversion factor for dry air
inquire
(
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid_nest'
,
exist
=
lexist
)
if
(
lexist
)
then
! open and append
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid_nest'
,
form
=
'unformatted'
,&
status
=
'old'
,
action
=
'write'
,
access
=
'append'
)
else
! create new
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid_nest'
,
form
=
'unformatted'
,&
status
=
'new'
,
action
=
'write'
)
endif
sp_count_i
=
0
sp_count_r
=
0
sp_fact
=
-1.
sp_zer
=
.true.
do
kz
=
1
,
numzgrid
do
jy
=
0
,
numygridn
-1
do
ix
=
0
,
numxgridn
-1
if
(
factor_drygrid
(
ix
,
jy
,
kz
)
.gt.
(
1.
+
smallnum
)
.or.
factor_drygrid
(
ix
,
jy
,
kz
)
.lt.
(
1.
-
smallnum
))
then
if
(
sp_zer
.eqv.
.true.
)
then
! first value not equal to one
sp_count_i
=
sp_count_i
+1
sparse_dump_i
(
sp_count_i
)
=
&
ix
+
jy
*
numxgridn
+
kz
*
numxgridn
*
numygridn
sp_zer
=
.false.
sp_fact
=
sp_fact
*
(
-1.
)
endif
sp_count_r
=
sp_count_r
+1
sparse_dump_r
(
sp_count_r
)
=
&
sp_fact
*
factor_drygrid
(
ix
,
jy
,
kz
)
else
! factor is one
sp_zer
=
.true.
endif
end
do
end
do
end
do
write
(
unitoutfactor
)
sp_count_i
write
(
unitoutfactor
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutfactor
)
sp_count_r
write
(
unitoutfactor
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
close
(
unitoutfactor
)
! Reinitialization of grid
! Reinitialization of grid
...
...
src/concoutput_surf.f90
View file @
f13c04a2
...
@@ -71,6 +71,9 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -71,6 +71,9 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
integer
::
sp_count_i
,
sp_count_r
integer
::
sp_count_i
,
sp_count_r
real
::
sp_fact
real
::
sp_fact
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
! RLT
real
::
densitydryrecept
(
maxreceptor
)
real
::
factor_dryrecept
(
maxreceptor
)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...
@@ -100,6 +103,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -100,6 +103,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
logical
::
sp_zer
logical
::
sp_zer
character
::
adate
*
8
,
atime
*
6
character
::
adate
*
8
,
atime
*
6
character
(
len
=
3
)
::
anspec
character
(
len
=
3
)
::
anspec
logical
::
lexist
if
(
verbosity
.eq.
1
)
then
if
(
verbosity
.eq.
1
)
then
...
@@ -179,6 +183,9 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -179,6 +183,9 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
rho
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
rho
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
! RLT
densitydrygrid
(
ix
,
jy
,
kz
)
=
(
rho_dry
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
rho_dry
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
end
do
end
do
end
do
end
do
end
do
end
do
...
@@ -189,8 +196,14 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -189,8 +196,14 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
iix
=
max
(
min
(
nint
(
xl
),
nxmin1
),
0
)
iix
=
max
(
min
(
nint
(
xl
),
nxmin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
2
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
2
)
! RLT
densitydryrecept
(
i
)
=
rho_dry
(
iix
,
jjy
,
1
,
2
)
end
do
end
do
! RLT
! conversion factor for output relative to dry air
factor_drygrid
=
densityoutgrid
/
densitydrygrid
factor_dryrecept
=
densityoutrecept
/
densitydryrecept
! Output is different for forward and backward simulations
! Output is different for forward and backward simulations
do
kz
=
1
,
numzgrid
do
kz
=
1
,
numzgrid
...
@@ -459,6 +472,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -459,6 +472,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
write
(
unitoutgrid
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutgrid
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutgrid
)
sp_count_r
write
(
unitoutgrid
)
sp_count_r
write
(
unitoutgrid
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
write
(
unitoutgrid
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
! write(unitoutgrid) sp_count_r
! write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
! write(unitoutgrid) (sparse_dump_u(i),i=1,sp_count_r)
endif
! concentration output
endif
! concentration output
...
@@ -503,6 +517,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -503,6 +517,7 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
write
(
unitoutgridppt
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutgridppt
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutgridppt
)
sp_count_r
write
(
unitoutgridppt
)
sp_count_r
write
(
unitoutgridppt
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
write
(
unitoutgridppt
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
! write(unitoutgridppt) sp_count_r
! write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
! write(unitoutgridppt) (sparse_dump_u(i),i=1,sp_count_r)
...
@@ -595,6 +610,49 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -595,6 +610,49 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
end
do
end
do
! RLT Aug 2017
! Write out conversion factor for dry air
inquire
(
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
exist
=
lexist
)
if
(
lexist
)
then
! open and append
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
form
=
'unformatted'
,&
status
=
'old'
,
action
=
'write'
,
access
=
'append'
)
else
! create new
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_drygrid'
,
form
=
'unformatted'
,&
status
=
'new'
,
action
=
'write'
)
endif
sp_count_i
=
0
sp_count_r
=
0
sp_fact
=
-1.
sp_zer
=
.true.
do
kz
=
1
,
1
do
jy
=
0
,
numygrid
-1
do
ix
=
0
,
numxgrid
-1
if
(
factor_drygrid
(
ix
,
jy
,
kz
)
.gt.
(
1.
+
smallnum
)
.or.
factor_drygrid
(
ix
,
jy
,
kz
)
.lt.
(
1.
-
smallnum
))
then
if
(
sp_zer
.eqv.
.true.
)
then
! first value not equal to one
sp_count_i
=
sp_count_i
+1
sparse_dump_i
(
sp_count_i
)
=
&
ix
+
jy
*
numxgrid
+
kz
*
numxgrid
*
numygrid
sp_zer
=
.false.
sp_fact
=
sp_fact
*
(
-1.
)
endif
sp_count_r
=
sp_count_r
+1
sparse_dump_r
(
sp_count_r
)
=
&
sp_fact
*
factor_drygrid
(
ix
,
jy
,
kz
)
else
! factor is one
sp_zer
=
.true.
endif
end
do
end
do
end
do
write
(
unitoutfactor
)
sp_count_i
write
(
unitoutfactor
)
(
sparse_dump_i
(
i
),
i
=
1
,
sp_count_i
)
write
(
unitoutfactor
)
sp_count_r
write
(
unitoutfactor
)
(
sparse_dump_r
(
i
),
i
=
1
,
sp_count_r
)
close
(
unitoutfactor
)
if
(
gridtotal
.gt.
0.
)
gridtotalunc
=
gridsigmatotal
/
gridtotal
if
(
gridtotal
.gt.
0.
)
gridtotalunc
=
gridsigmatotal
/
gridtotal
if
(
wetgridtotal
.gt.
0.
)
wetgridtotalunc
=
wetgridsigmatotal
/
&
if
(
wetgridtotal
.gt.
0.
)
wetgridtotalunc
=
wetgridsigmatotal
/
&
wetgridtotal
wetgridtotal
...
@@ -621,7 +679,23 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
...
@@ -621,7 +679,23 @@ subroutine concoutput_surf(itime,outnum,gridtotalunc,wetgridtotalunc, &
end
do
end
do
endif
endif
! RLT Aug 2017
! Write out conversion factor for dry air
if
(
numreceptor
.gt.
0
)
then
inquire
(
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
exist
=
lexist
)
if
(
lexist
)
then
! open and append
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
form
=
'unformatted'
,&
status
=
'old'
,
action
=
'write'
,
access
=
'append'
)
else
! create new
open
(
unitoutfactor
,
file
=
path
(
2
)(
1
:
length
(
2
))//
'factor_dryreceptor'
,
form
=
'unformatted'
,&
status
=
'new'
,
action
=
'write'
)
endif
write
(
unitoutfactor
)
itime
write
(
unitoutfactor
)
(
factor_dryrecept
(
i
),
i
=
1
,
numreceptor
)
close
(
unitoutfactor
)
endif
! Reinitialization of grid
! Reinitialization of grid
!*************************
!*************************
...
...
src/concoutput_surf_nest.f90
View file @
f13c04a2
...
@@ -69,6 +69,9 @@ subroutine concoutput_surf_nest(itime,outnum)
...
@@ -69,6 +69,9 @@ subroutine concoutput_surf_nest(itime,outnum)
integer
::
sp_count_i
,
sp_count_r
integer
::
sp_count_i
,
sp_count_r
real
::
sp_fact
real
::
sp_fact
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
real
::
outnum
,
densityoutrecept
(
maxreceptor
),
xl
,
yl
! RLT
real
::
densitydryrecept
(
maxreceptor
)
real
::
factor_dryrecept
(
maxreceptor
)
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
!real densityoutgrid(0:numxgrid-1,0:numygrid-1,numzgrid),
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
! +grid(0:numxgrid-1,0:numygrid-1,numzgrid,maxspec,maxpointspec_act,
...
@@ -95,7 +98,7 @@ subroutine concoutput_surf_nest(itime,outnum)
...
@@ -95,7 +98,7 @@ subroutine concoutput_surf_nest(itime,outnum)
logical
::
sp_zer
logical
::
sp_zer
character
::
adate
*
8
,
atime
*
6
character
::
adate
*
8
,
atime
*
6
character
(
len
=
3
)
::
anspec
character
(
len
=
3
)
::
anspec
logical
::
lexist
! Determine current calendar date, needed for the file name
! Determine current calendar date, needed for the file name
!**********************************************************
!**********************************************************
...
@@ -158,18 +161,27 @@ subroutine concoutput_surf_nest(itime,outnum)
...
@@ -158,18 +161,27 @@ subroutine concoutput_surf_nest(itime,outnum)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
densityoutgrid
(
ix
,
jy
,
kz
)
=
(
rho
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
rho
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
rho
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
! RLT
densitydrygrid
(
ix
,
jy
,
kz
)
=
(
rho_dry
(
iix
,
jjy
,
kzz
,
2
)
*
dz1
+
&
rho_dry
(
iix
,
jjy
,
kzz
-1
,
2
)
*
dz2
)/
dz
end
do
end
do
end
do
end
do
end
do
end
do
do
i
=
1
,
numreceptor
do
i
=
1
,
numreceptor
xl
=
xreceptor
(
i
)
xl
=
xreceptor
(
i
)
yl
=
yreceptor
(
i
)
yl
=
yreceptor
(
i
)
iix
=
max
(
min
(
nint
(
xl
),
nxmin1
),
0
)
iix
=
max
(
min
(
nint
(
xl
),
nxmin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
jjy
=
max
(
min
(
nint
(
yl
),
nymin1
),
0
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
2
)
densityoutrecept
(
i
)
=
rho
(
iix
,
jjy
,
1
,
2
)
end
do
! RLT
densitydryrecept
(
i
)
=
rho_dry
(
iix
,
jjy
,
1
,
2
)