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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
6ba58a3e
Commit
6ba58a3e
authored
10 months ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
related to wrfinput fix
parent
1aff1cf5
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
dartwrf/evaluate_obs_space.py
+11
-7
11 additions, 7 deletions
dartwrf/evaluate_obs_space.py
with
11 additions
and
7 deletions
dartwrf/evaluate_obs_space.py
+
11
−
7
View file @
6ba58a3e
...
...
@@ -23,15 +23,23 @@ def evaluate_one_time(assim_time, valid_time, use_other_obsseq=False):
# does an observation exist at this time?
f_oso
=
valid_time
.
strftime
(
aso
.
pattern_obs_seq_out
)
f_oso
=
cluster
.
archivedir
+
valid_time
.
strftime
(
"
/
obs_seq_out/
%Y-%m-%d_%H:%M
:%S
_obs_seq.out
"
)
f_oso
=
cluster
.
archivedir
+
valid_time
.
strftime
(
"
/%Y-%m-%d_%H:%M_obs_seq.out
"
)
if
os
.
path
.
exists
(
f_oso
):
# use the existing file
shutil
.
copy
(
f_oso
,
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
else
:
if
False
:
try
:
# generate the observations for the specified valid_time
aso
.
prepare_nature_dart
(
valid_time
)
osq_out
.
generate_obsseq_out
(
valid_time
)
except
:
print
(
"
failed to generate observations from a nature file
"
)
print
(
"
-> trying to evaluate posterior with dummy observations
"
)
# use an old obsseq file and overwrite obs/truth values with "missing value"
f_oso
=
cluster
.
archivedir
+
valid_time
.
strftime
(
"
/obs_seq_out/%Y-%m-%d_%H:%M_obs_seq.out
"
)
f_oso
=
cluster
.
archivedir
+
valid_time
.
strftime
(
"
/diagnostics/%Y-%m-%d_%H:%M_obs_seq.out
"
)
if
not
os
.
path
.
isfile
(
f_oso
):
raise
RuntimeError
(
f_oso
+
'
not found. Cannot create dummy observation.
'
)
from
dartwrf.obs
import
obsseq
oso
=
obsseq
.
ObsSeq
(
f_oso
)
...
...
@@ -40,10 +48,6 @@ def evaluate_one_time(assim_time, valid_time, use_other_obsseq=False):
oso
.
df
[
'
observations
'
]
=
-
888888.0
oso
.
df
[
'
truth
'
]
=
-
888888.0
oso
.
to_dart
(
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
else
:
# generate the observations for the specified valid_time
aso
.
prepare_nature_dart
(
valid_time
)
osq_out
.
generate_obsseq_out
(
valid_time
)
aso
.
evaluate
(
valid_time
,
f_out_pattern
=
cluster
.
archivedir
+
"
/diagnostics/%Y-%m-%d_%H:%M:%S_obs_seq.final-evaluate
"
)
...
...
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