Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
CTDAS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
NearRealTimeCTDAS
CTDAS
Commits
6307662f
Commit
6307662f
authored
12 years ago
by
Peters, Wouter
Browse files
Options
Downloads
Patches
Plain Diff
minor changes needed for SF6 obspacks
parent
c8153d1b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/ct/obspack_geocarbon.py
+4
-4
4 additions, 4 deletions
da/ct/obspack_geocarbon.py
with
4 additions
and
4 deletions
da/ct/obspack_geocarbon.py
+
4
−
4
View file @
6307662f
...
...
@@ -300,7 +300,7 @@ class ObsPackObservations(Observation):
SiteInfo
=
{}
SiteMove
=
{}
for
key
,
value
in
SitesWeights
.
iteritems
():
if
'
co2_
'
in
key
:
if
'
co2_
'
in
key
or
'
sf6
'
in
key
:
# to be fixed later, do not yet know how to parse valid keys from rc-files yet.... WP
sitename
,
sitecategory
=
key
,
value
sitename
=
sitename
.
strip
()
sitecategory
=
sitecategory
.
split
()[
0
].
strip
().
lower
()
...
...
@@ -350,14 +350,14 @@ class ObsPackObservations(Observation):
logging
.
debug
(
"
Added Model Data Mismatch to all samples
"
)
def
write_obs_to_file
(
self
):
def
write_obs_to_file
(
self
,
filenam
=
"
oldstyle
"
):
"""
Write selected information contained in the Observation object to a file.
"""
import
da.tools.io4
as
io
outfile
=
os
.
path
.
join
(
self
.
DaCycle
[
'
dir.output
'
],
'
sampleinfo_%s.nc
'
%
self
.
DaCycle
[
'
time.sample.stamp
'
])
outfile
=
os
.
path
.
join
(
self
.
DaCycle
[
'
dir.output
'
],
'
sampleinfo_%s
__%s
.nc
'
%
(
self
.
DaCycle
[
'
time.sample.stamp
'
]
,
filenam
)
)
f
=
io
.
CT_CDF
(
outfile
,
method
=
'
create
'
)
logging
.
debug
(
'
Creating new Sample output file for postprocessing (%s)
'
%
outfile
)
...
...
@@ -387,7 +387,7 @@ class ObsPackObservations(Observation):
savedict
[
'
comment
'
]
=
"
Unique index number within this dataset ranging from 0 to UNLIMITED.
"
f
.
AddData
(
savedict
)
data
=
[[
d
.
year
,
d
.
month
,
d
.
day
,
d
.
hour
,
d
.
minute
,
d
.
second
]
for
d
in
self
.
getvalues
(
'
xdate
'
)
]
data
=
[[
d
.
year
,
d
.
month
,
d
.
day
,
d
.
hour
,
d
.
minute
,
d
.
second
]
for
d
in
self
.
getvalues
(
'
xdate
'
)]
savedict
=
io
.
std_savedict
.
copy
()
savedict
[
'
dtype
'
]
=
"
int
"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment