Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DART-WRF-delete_byApril
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Monitor
Service Desk
Analyze
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-delete_byApril
Commits
2df04819
Commit
2df04819
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
obs_seq.out as argument to evaluate()
parent
feff66d8
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/assim_synth_obs.py
+11
-7
11 additions, 7 deletions
dartwrf/assim_synth_obs.py
with
11 additions
and
7 deletions
dartwrf/assim_synth_obs.py
+
11
−
7
View file @
2df04819
...
@@ -297,7 +297,7 @@ def qc_obs(time, oso):
...
@@ -297,7 +297,7 @@ def qc_obs(time, oso):
print
(
'
saved
'
,
f_out_dart
)
print
(
'
saved
'
,
f_out_dart
)
def
evaluate
(
assim_time
,
def
evaluate
(
assim_time
,
obs_seq_out
=
False
,
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
):
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
):
"""
Calculates either prior or posterior obs space values.
"""
Calculates either prior or posterior obs space values.
...
@@ -307,7 +307,8 @@ def evaluate(assim_time,
...
@@ -307,7 +307,8 @@ def evaluate(assim_time,
Args:
Args:
assim_time (datetime): time of assimilation
assim_time (datetime): time of assimilation
output_format (str): format string for output filename, default is `
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
`
obs_seq_out (str, optional): use the argument as obs_seq.out file, defaults to use the existing obs_seq.out file
output_format (str, optional): format string for output filename, default is `
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
`
Returns:
Returns:
obsseq.ObsSeq
obsseq.ObsSeq
...
@@ -324,6 +325,10 @@ def evaluate(assim_time,
...
@@ -324,6 +325,10 @@ def evaluate(assim_time,
print
(
"
prepare nature
"
)
print
(
"
prepare nature
"
)
prepare_nature_dart
(
assim_time
)
# link WRF files to DART directory
prepare_nature_dart
(
assim_time
)
# link WRF files to DART directory
if
obs_seq_out
:
copy
(
obs_seq_out
,
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
else
:
# use existing obs_seq.out file
if
not
os
.
path
.
isfile
(
cluster
.
dart_rundir
+
'
/obs_seq.out
'
):
if
not
os
.
path
.
isfile
(
cluster
.
dart_rundir
+
'
/obs_seq.out
'
):
raise
RuntimeError
(
cluster
.
dart_rundir
+
'
/obs_seq.out does not exist
'
)
raise
RuntimeError
(
cluster
.
dart_rundir
+
'
/obs_seq.out does not exist
'
)
...
@@ -576,9 +581,8 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
...
@@ -576,9 +581,8 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
print
(
"
4) evaluate posterior observations for all observations (incl rejected)
"
)
print
(
"
4) evaluate posterior observations for all observations (incl rejected)
"
)
write_list_of_inputfiles_posterior
(
time
)
write_list_of_inputfiles_posterior
(
time
)
copy
(
cluster
.
archivedir
+
'
/obs_seq_out/
'
+
time
.
strftime
(
'
%Y-%m-%d_%H:%M_obs_seq.out-beforeQC
'
),
evaluate
(
time
,
obs_seq_out
=
cluster
.
archivedir
+
'
/obs_seq_out/
'
+
time
.
strftime
(
'
%Y-%m-%d_%H:%M_obs_seq.out-beforeQC
'
),
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
)
evaluate
(
time
,
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
)
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
...
...
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