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
Container registry
Model registry
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
CTDAS
CTDAS
Commits
fb2a70b7
Commit
fb2a70b7
authored
5 years ago
by
Florentie, Liesbeth
Browse files
Options
Downloads
Patches
Plain Diff
fixed an error that caused the new location of moved observation locations not to be saved
parent
8184dbc5
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
da/carbondioxide/obspack_globalviewplus2.py
+11
-9
11 additions, 9 deletions
da/carbondioxide/obspack_globalviewplus2.py
with
11 additions
and
9 deletions
da/carbondioxide/obspack_globalviewplus2.py
+
11
−
9
View file @
fb2a70b7
...
@@ -69,6 +69,10 @@ class ObsPackObservations(Observations):
...
@@ -69,6 +69,10 @@ class ObsPackObservations(Observations):
self
.
sites_file
=
dacycle
.
dasystem
[
'
obs.sites.rc
'
]
self
.
sites_file
=
dacycle
.
dasystem
[
'
obs.sites.rc
'
]
def
get_samples_type
(
self
):
return
'
flask
'
def
add_observations
(
self
):
def
add_observations
(
self
):
"""
Returns a MoleFractionList holding individual MoleFractionSample objects for all obs in a file
"""
Returns a MoleFractionList holding individual MoleFractionSample objects for all obs in a file
...
@@ -390,7 +394,9 @@ class ObsPackObservations(Observations):
...
@@ -390,7 +394,9 @@ class ObsPackObservations(Observations):
else
:
species
,
site
,
method
,
lab
,
datasetnr
=
identifier
.
split
(
'
_
'
)
else
:
species
,
site
,
method
,
lab
,
datasetnr
=
identifier
.
split
(
'
_
'
)
if
site_info
.
has_key
(
identifier
):
if
site_info
.
has_key
(
identifier
):
if
site_info
[
identifier
][
'
category
'
]
!=
'
do-not-use
'
and
obs
.
flag
!=
99
:
if
site_info
[
identifier
][
'
category
'
]
==
'
do-not-use
'
or
obs
.
flag
==
99
:
obs
.
flag
=
99
else
:
if
site_info
[
identifier
][
'
category
'
]
==
'
aircraft
'
:
if
site_info
[
identifier
][
'
category
'
]
==
'
aircraft
'
:
nr_obs_per_day
=
1
nr_obs_per_day
=
1
else
:
else
:
...
@@ -400,9 +406,6 @@ class ObsPackObservations(Observations):
...
@@ -400,9 +406,6 @@ class ObsPackObservations(Observations):
obs
.
may_localize
=
site_info
[
identifier
][
'
may_localize
'
]
obs
.
may_localize
=
site_info
[
identifier
][
'
may_localize
'
]
obs
.
may_reject
=
site_info
[
identifier
][
'
may_reject
'
]
obs
.
may_reject
=
site_info
[
identifier
][
'
may_reject
'
]
obs
.
flag
=
0
obs
.
flag
=
0
obs_to_keep
.
append
(
obs
)
elif
obs
.
flag
==
99
:
logging
.
info
(
'
Observation has flag 99, excluded from assimilation
'
)
else
:
else
:
logging
.
warning
(
"
Observation NOT found (%s, %d), please check sites.rc file (%s) !!!
"
%
(
identifier
,
obs
.
id
,
self
.
sites_file
))
logging
.
warning
(
"
Observation NOT found (%s, %d), please check sites.rc file (%s) !!!
"
%
(
identifier
,
obs
.
id
,
self
.
sites_file
))
...
@@ -417,11 +420,10 @@ class ObsPackObservations(Observations):
...
@@ -417,11 +420,10 @@ class ObsPackObservations(Observations):
obs
.
height
=
obs
.
height
+
incalt
obs
.
height
=
obs
.
height
+
incalt
logging
.
warning
(
"
Observation location for (%s, %d), is moved by %3.2f meters in altitude
"
%
(
identifier
,
obs
.
id
,
incalt
))
logging
.
warning
(
"
Observation location for (%s, %d), is moved by %3.2f meters in altitude
"
%
(
identifier
,
obs
.
id
,
incalt
))
if
advance
==
False
:
if
advance
==
False
and
obs
.
flag
>
80
:
if
obs
.
flag
>
80
:
logging
.
debug
(
'
Dropped observation from datalist, as it is not to be assimilated
'
)
self
.
datalist
.
remove
(
obs
)
else
:
logging
.
debug
(
'
Dropped observation from datalist, as it is not to be assimilated
'
)
obs_to_keep
.
append
(
obs
)
# Only keep obs in datalist that will be used in assimilation
# Only keep obs in datalist that will be used in assimilation
self
.
datalist
=
obs_to_keep
self
.
datalist
=
obs_to_keep
...
...
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