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
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
Hide 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):
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
"
):
"""
Calculates either prior or posterior obs space values.
...
...
@@ -307,7 +307,8 @@ def evaluate(assim_time,
Args:
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:
obsseq.ObsSeq
...
...
@@ -324,8 +325,12 @@ def evaluate(assim_time,
print
(
"
prepare nature
"
)
prepare_nature_dart
(
assim_time
)
# link WRF files to DART directory
if
not
os
.
path
.
isfile
(
cluster
.
dart_rundir
+
'
/obs_seq.out
'
):
raise
RuntimeError
(
cluster
.
dart_rundir
+
'
/obs_seq.out does not exist
'
)
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
'
):
raise
RuntimeError
(
cluster
.
dart_rundir
+
'
/obs_seq.out does not exist
'
)
dart_nml
.
write_namelist
(
just_prior_values
=
True
)
filter
(
nproc
=
6
)
...
...
@@ -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)
"
)
write_list_of_inputfiles_posterior
(
time
)
copy
(
cluster
.
archivedir
+
'
/obs_seq_out/
'
+
time
.
strftime
(
'
%Y-%m-%d_%H:%M_obs_seq.out-beforeQC
'
),
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
evaluate
(
time
,
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
)
evaluate
(
time
,
obs_seq_out
=
cluster
.
archivedir
+
'
/obs_seq_out/
'
+
time
.
strftime
(
'
%Y-%m-%d_%H:%M_obs_seq.out-beforeQC
'
),
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
)
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