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
Tsurata, Aki
CTDAS
Commits
ea36b028
Commit
ea36b028
authored
Feb 17, 2016
by
weihe
Browse files
updated
parent
fbbffceb
Changes
1
Hide whitespace changes
Inline
Side-by-side
da/stilt/stilt.BC.footprint.year.v2.1.normalize.r
View file @
ea36b028
...
...
@@ -34,7 +34,7 @@ datadir="/Storage/ctdas-wrfstilt/new_stilt_footprints/flask/2010/"
eidfilebase
=
"/Storage/ctdas-wrfstilt/stilt_footprints/receptor_info/receptor_info.2010-"
for
(
n
in
1
:
1
)
for
(
n
in
1
:
1
2
)
{
if
(
n
<
10
)
mon
=
paste
(
"0"
,
n
,
sep
=
""
)
...
...
@@ -130,7 +130,7 @@ for(n in 1:1)
}
fnameout1
=
paste
(
pfbpath
,
"FP_BC_3km_time_spent_2.1.
before
.norm.txt"
,
sep
=
""
)
fnameout1
=
paste
(
pfbpath
,
"FP_BC_3km_time_spent_2.1.
prep01
.norm.txt"
,
sep
=
""
)
flog.info
(
"Output to: "
,
fnameout1
,
name
=
'logger.b'
)
outlist
=
c
(
num_out3
/
500
,
num_out3
/
500
*
t_weight1
)
out1
<-
c
(
ident
,
eventid
,
round
(
outlist
,
6
),
flag
)
...
...
@@ -146,7 +146,7 @@ for(n in 1:1)
# for every month, normalize
fnameout2
=
paste
(
pfbpath
,
"FP_BC_3km_time_spent_2.1.norm.txt"
,
sep
=
""
)
fnameout2
=
paste
(
pfbpath
,
"FP_BC_3km_time_spent_2.1.
prep02.
norm.txt"
,
sep
=
""
)
flog.info
(
"Output to: "
,
fnameout2
,
name
=
'logger.b'
)
footfile
<-
fnameout1
...
...
@@ -234,7 +234,7 @@ for(n in 1:1)
print
(
amtsum
)
print
(
bcf
[
i
])
amtsum
=
amtsum
+
bcf
[
i
]
amtsum
=
amtsum
+
as.numeric
(
bcf
[
i
]
)
amtcount
=
amtcount
+1
}
}
...
...
@@ -242,9 +242,10 @@ for(n in 1:1)
newfile3
=
T
for
(
i
in
1
:
lin3
)
{
bcf1
[
i
]
=
bcf
[
i
]
/
(
amtsum
/
amtcount
)
tmp
=
bcf
[
i
]
bcf
[
i
]
=
as.numeric
(
bcf
[
i
])
/
(
amtsum
/
amtcount
)
out3
=
c
(
ident
[
i
],
evn1
[
i
],
bcf
[
i
],
bcf1
[
i
],
sitenew
,
airtowflag
)
out3
=
c
(
ident
[
i
],
evn1
[
i
],
tmp
,
round
(
bcf
[
i
],
6
),
site
[
i
],
type
[
i
]
)
header
=
c
(
"ident"
,
"eventid"
,
"value"
,
"normvalue"
,
"site"
,
"type"
)
if
(
newfile3
)
...
...
Write
Preview
Supports
Markdown
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