Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DART-WRF
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
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
f528b92e
Commit
f528b92e
authored
Mar 31, 2023
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
remove quickfix
parent
6012905d
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dartwrf/obsseq.py
+9
-6
9 additions, 6 deletions
dartwrf/obsseq.py
with
9 additions
and
6 deletions
dartwrf/obsseq.py
+
9
−
6
View file @
f528b92e
...
@@ -80,11 +80,14 @@ class ObsRecord(pd.DataFrame):
...
@@ -80,11 +80,14 @@ class ObsRecord(pd.DataFrame):
"""
Return posterior Hx array (n_obs, n_ens)
"""
"""
Return posterior Hx array (n_obs, n_ens)
"""
try
:
try
:
return
self
.
_get_model_Hx
(
'
posterior
'
)
return
self
.
_get_model_Hx
(
'
posterior
'
)
except
Exception
as
e
:
except
KeyError
as
e
:
# this is useful if we evaluate a 'posterior state'
raise
# change: not allow this, too unsafe
# then the variable is called 'prior' while it really is a posterior
# if posterior is not available, return prior
warnings
.
warn
(
str
(
e
)
+
'
returning prior from this file instead!
'
)
# return self._get_model_Hx('prior')
return
self
.
_get_model_Hx
(
'
prior
'
)
# # this is useful if we evaluate a 'posterior state'
# # then the variable is called 'prior' while it really is a posterior
# #warnings.warn(str(e)+' returning prior from this file instead!')
# return self._get_model_Hx('prior')
def
get_truth_Hx
(
self
):
def
get_truth_Hx
(
self
):
return
self
[
'
truth
'
].
values
return
self
[
'
truth
'
].
values
...
@@ -103,7 +106,7 @@ class ObsRecord(pd.DataFrame):
...
@@ -103,7 +106,7 @@ class ObsRecord(pd.DataFrame):
or a subset of observations (self = self.self[343:348])
or a subset of observations (self = self.self[343:348])
"""
"""
if
what
not
in
[
'
prior
'
,
'
posterior
'
]:
if
what
not
in
[
'
prior
'
,
'
posterior
'
]:
raise
ValueError
raise
ValueError
(
what
,
'
must be prior or posterior
'
)
# which columns do we need?
# which columns do we need?
keys
=
self
.
columns
keys
=
self
.
columns
...
...
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