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
e42219d2
Commit
e42219d2
authored
10 months ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
restructure: only prepare nature file if obsseq not given
parent
e7215a80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dartwrf/assimilate.py
+6
-9
6 additions, 9 deletions
dartwrf/assimilate.py
with
6 additions
and
9 deletions
dartwrf/assimilate.py
+
6
−
9
View file @
e42219d2
...
...
@@ -36,7 +36,9 @@ def _find_nature(time):
# check user input
if
not
'
wrfout
'
in
f_nat
.
split
(
'
/
'
)[
-
1
]:
warnings
.
warn
(
f_nat
+
"
does not contain
'
wrfout
'
in filename, are you sure this is a valid nature file?
"
)
assert
os
.
path
.
exists
(
f_nat
),
f_nat
+
"
does not exist
"
if
not
os
.
path
.
exists
(
f_nat
):
raise
IOError
(
f_nat
+
"
does not exist -> no nature found
"
)
return
f_nat
def
prepare_nature_dart
(
time
):
...
...
@@ -46,12 +48,7 @@ def prepare_nature_dart(time):
time (dt.datetime): Time at which observations will be made
"""
print
(
"
prepare nature
"
)
try
:
f_nat
=
_find_nature
(
time
)
except
:
print
(
'
-> no nature available
'
)
# this is OK if it is a real data case or observations already exist
return
f_nat
=
_find_nature
(
time
)
shutil
.
copy
(
f_nat
,
cluster
.
dart_rundir
+
"
/wrfout_d01
"
)
# copy nature wrfout to DART directory
# add coordinates if necessary
...
...
@@ -419,7 +416,7 @@ def get_obsseq_out(time):
Returns:
obsseq.ObsSeq
"""
if
exp
.
use_existing_obsseq
!=
False
:
if
exp
.
use_existing_obsseq
!=
False
and
os
.
path
.
isfile
(
exp
.
use_existing_obsseq
)
:
# use an existing obs_seq.out file
f_obsseq
=
time
.
strftime
(
exp
.
use_existing_obsseq
)
copy
(
f_obsseq
,
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
# copy to run_DART folder
...
...
@@ -429,6 +426,7 @@ def get_obsseq_out(time):
else
:
# do NOT use an existing obs_seq.out file
# but generate observations with new observation noise
prepare_nature_dart
(
time
)
oso
=
osq_out
.
generate_obsseq_out
(
time
)
# copy to sim_archive
...
...
@@ -564,7 +562,6 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
nml
=
dart_nml
.
write_namelist
()
print
(
"
get observations with specified obs-error
"
)
prepare_nature_dart
(
time
)
oso
=
get_obsseq_out
(
time
)
if
do_QC
:
# additional evaluation of prior (in case some observations are rejected)
...
...
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