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
03ea9c66
Commit
03ea9c66
authored
2 years ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
docs
parent
3fb95d25
Branches
Branches containing commit
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
+21
-16
21 additions, 16 deletions
dartwrf/assim_synth_obs.py
with
21 additions
and
16 deletions
dartwrf/assim_synth_obs.py
+
21
−
16
View file @
03ea9c66
...
...
@@ -445,8 +445,7 @@ def get_obsseq_out(time):
return
oso
if
__name__
==
"
__main__
"
:
def
main
(
time
,
prior_init_time
,
prior_valid_time
,
prior_path_exp
):
"""
Assimilate observations
as defined in config/cfg.py
for a certain timestamp (argument) of the nature run (defined in config/clusters.py)
...
...
@@ -459,21 +458,13 @@ if __name__ == "__main__":
Args:
assim_time (dt.datetime): time of output
prior_init_time: forecast start of prior
prior_valid_time: valid time of prior (may be different to assim_time)
path to prior experiment
prior_init_time
(dt.datetime)
: forecast start of prior
prior_valid_time
(dt.datetime)
: valid time of prior (may be different to assim_time)
prior_path_exp (str):
path to prior experiment
Example call
:
python assim.py 2008-08-07_12:00 2008-08-06:00 2008-08-07_13:00 /home/fs71386/lkugler/data/sim_archive/exp_v1.18_Pwbub-1-ensprof_40mem
Returns
:
None
"""
time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
1
],
"
%Y-%m-%d_%H:%M
"
)
prior_init_time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
2
],
"
%Y-%m-%d_%H:%M
"
)
prior_valid_time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
3
],
"
%Y-%m-%d_%H:%M
"
)
prior_path_exp
=
str
(
sys
.
argv
[
4
])
options
=
[]
if
len
(
sys
.
argv
)
>
4
:
options
=
sys
.
argv
[
5
:]
nproc
=
cluster
.
max_nproc
archive_time
=
cluster
.
archivedir
+
time
.
strftime
(
"
/%Y-%m-%d_%H:%M/
"
)
...
...
@@ -520,3 +511,17 @@ if __name__ == "__main__":
cluster
.
dartrundir
+
'
/obs_seq.out
'
)
evaluate
(
time
,
output_format
=
"
%Y-%m-%d_%H:%M_obs_seq.final-eval_posterior_allobs
"
)
if
__name__
==
"
__main__
"
:
"""
Assimilate synthetic observations
Example:
python assim.py 2008-08-07_12:00 2008-08-06:00 2008-08-07_13:00 /home/fs71386/lkugler/data/sim_archive/exp_v1.18_Pwbub-1-ensprof_40mem
"""
time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
1
],
"
%Y-%m-%d_%H:%M
"
)
prior_init_time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
2
],
"
%Y-%m-%d_%H:%M
"
)
prior_valid_time
=
dt
.
datetime
.
strptime
(
sys
.
argv
[
3
],
"
%Y-%m-%d_%H:%M
"
)
prior_path_exp
=
str
(
sys
.
argv
[
4
])
main
(
time
,
prior_init_time
,
prior_valid_time
,
prior_path_exp
)
\ No newline at end of file
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