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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF
Commits
e8acb8fe
Commit
e8acb8fe
authored
1 year ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
retract of wrfinput fix
parent
12c45e6f
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dartwrf/assimilate.py
+11
-15
11 additions, 15 deletions
dartwrf/assimilate.py
with
11 additions
and
15 deletions
dartwrf/assimilate.py
+
11
−
15
View file @
e8acb8fe
...
@@ -21,9 +21,9 @@ pattern_obs_seq_final = cluster.archivedir + "/diagnostics/%Y-%m-%d_%H:%M_obs_se
...
@@ -21,9 +21,9 @@ pattern_obs_seq_final = cluster.archivedir + "/diagnostics/%Y-%m-%d_%H:%M_obs_se
def
_prepare_DART_grid_template
():
def
_prepare_DART_grid_template
():
# DART needs a wrfinput file as a template for the grid
# DART needs a wrfinput file as a template for the grid
# No data will be read from this file
, but the grid information must match exactly.
# No data
except grid info
will be read from this file
#
./perfect_model_obs might fail in case there is no ensemble data in the folder prior_ens1
#
The grid information must match exactly with the nature file "wrfout_d01"
symlink
(
cluster
.
dart_rundir
+
"
/
prior_ens1/
wrfout_d01
"
,
symlink
(
cluster
.
dart_rundir
+
"
/wrfout_d01
"
,
cluster
.
dart_rundir
+
"
/wrfinput_d01
"
)
cluster
.
dart_rundir
+
"
/wrfinput_d01
"
)
def
_find_nature
(
time
):
def
_find_nature
(
time
):
...
@@ -369,9 +369,6 @@ def evaluate(assim_time,
...
@@ -369,9 +369,6 @@ def evaluate(assim_time,
# remove any existing observation files
# remove any existing observation files
os
.
system
(
"
rm -f input.nml obs_seq.final
"
)
os
.
system
(
"
rm -f input.nml obs_seq.final
"
)
# TODO: Maybe only necessary if there is no obs_seq.out file yet?
prepare_nature_dart
(
assim_time
)
# link WRF files to DART directory
if
prior_is_filter_output
:
if
prior_is_filter_output
:
print
(
'
using filter_restart files in run_DART as prior
'
)
print
(
'
using filter_restart files in run_DART as prior
'
)
use_filter_output_as_prior
()
use_filter_output_as_prior
()
...
@@ -383,6 +380,9 @@ def evaluate(assim_time,
...
@@ -383,6 +380,9 @@ def evaluate(assim_time,
if
obs_seq_out
:
if
obs_seq_out
:
copy
(
obs_seq_out
,
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
# user defined file
copy
(
obs_seq_out
,
cluster
.
dart_rundir
+
'
/obs_seq.out
'
)
# user defined file
else
:
else
:
# probably not necessary
# prepare_nature_dart(assim_time) # link WRF nature file to run_DART directory
# use existing obs_seq.out file currently present in the run_DART directory
# use existing obs_seq.out file currently present in the run_DART directory
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
'
)
...
@@ -557,22 +557,18 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
...
@@ -557,22 +557,18 @@ def main(time, prior_init_time, prior_valid_time, prior_path_exp):
Returns:
Returns:
None
None
"""
"""
obscfg
=
exp
.
observations
do_QC
=
getattr
(
exp
,
"
do_quality_control
"
,
False
)
# True: triggers additional evaluations of prior & posterior
do_QC
=
getattr
(
exp
,
"
do_quality_control
"
,
False
)
# True: triggers additional evaluations of prior & posterior
prepare_run_DART_folder
()
prepare_run_DART_folder
()
prepare_nature_dart
(
time
)
# from previous forecast
prepare_prior_ensemble
(
time
,
prior_init_time
,
prior_valid_time
,
prior_path_exp
)
prepare_prior_ensemble
(
time
,
prior_init_time
,
prior_valid_time
,
prior_path_exp
)
obscfg
=
exp
.
observations
nml
=
dart_nml
.
write_namelist
()
nml
=
dart_nml
.
write_namelist
()
print
(
"
get observations with specified obs-error
"
)
print
(
"
get observations with specified obs-error
"
)
prepare_nature_dart
(
time
)
oso
=
get_obsseq_out
(
time
)
oso
=
get_obsseq_out
(
time
)
if
do_QC
:
# additional evaluation of prior
if
do_QC
:
# additional evaluation of prior
(in case some observations are rejected)
print
(
"
(optional)
evaluate prior for all observations (incl rejected)
"
)
print
(
"
evaluate prior for all observations (incl rejected)
"
)
evaluate
(
time
,
f_out_pattern
=
pattern_obs_seq_final
+
"
-evaluate_prior
"
)
evaluate
(
time
,
f_out_pattern
=
pattern_obs_seq_final
+
"
-evaluate_prior
"
)
print
(
"
assign observation-errors for assimilation
"
)
print
(
"
assign observation-errors for assimilation
"
)
...
...
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