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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DataAssimilation
DART-WRF-delete_byApril
Commits
98888f5b
Commit
98888f5b
authored
1 year ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
just_posterior should override user input
parent
8bbbdb55
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/dart_nml.py
+16
-9
16 additions, 9 deletions
dartwrf/dart_nml.py
with
16 additions
and
9 deletions
dartwrf/dart_nml.py
+
16
−
9
View file @
98888f5b
...
@@ -266,14 +266,7 @@ def write_namelist(just_prior_values=False):
...
@@ -266,14 +266,7 @@ def write_namelist(just_prior_values=False):
nml
[
'
&location_nml
'
][
'
special_vert_normalization_levels
'
]
=
[[
-
1
,]
*
n_obstypes
]
nml
[
'
&location_nml
'
][
'
special_vert_normalization_levels
'
]
=
[[
-
1
,]
*
n_obstypes
]
nml
[
'
&location_nml
'
][
'
special_vert_normalization_pressures
'
]
=
[[
-
1
,]
*
n_obstypes
]
nml
[
'
&location_nml
'
][
'
special_vert_normalization_pressures
'
]
=
[[
-
1
,]
*
n_obstypes
]
# dont compute posterior, just evaluate prior
if
just_prior_values
:
nml
[
'
&filter_nml
'
][
'
compute_posterior
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
output_members
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
output_mean
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
output_sd
'
]
=
[[
'
.false.
'
]]
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[[]]
nml
[
'
&obs_kind_nml
'
][
'
evaluate_these_obs_types
'
]
=
[
list_obstypes
]
# overwrite namelist parameters as defined in the experiment configuration
# overwrite namelist parameters as defined in the experiment configuration
for
section
,
sdata
in
exp
.
dart_nml
.
items
():
for
section
,
sdata
in
exp
.
dart_nml
.
items
():
...
@@ -296,7 +289,21 @@ def write_namelist(just_prior_values=False):
...
@@ -296,7 +289,21 @@ def write_namelist(just_prior_values=False):
# overwrite entry in each dictionary
# overwrite entry in each dictionary
nml
[
section
][
parameter
]
=
value
# every entry in this list is one line
nml
[
section
][
parameter
]
=
value
# every entry in this list is one line
# final checks
# necessary options if we dont compute posterior but only evaluate prior
if
just_prior_values
:
nml
[
'
&obs_kind_nml
'
][
'
assimilate_these_obs_types
'
]
=
[[]]
nml
[
'
&obs_kind_nml
'
][
'
evaluate_these_obs_types
'
]
=
[
list_obstypes
]
nml
[
'
&filter_nml
'
][
'
compute_posterior
'
]
=
[[
'
.false.
'
]]
# inf_flavor posterior must be 0 if posterior is not computed
# inf_flavor keyword exists, so we can just overwrite it
nml
[
'
&filter_nml
'
][
'
inf_flavor
'
]
=
[[
'
0
'
,
'
0
'
]]
nml
[
'
&filter_nml
'
][
'
output_members
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
output_mean
'
]
=
[[
'
.false.
'
]]
nml
[
'
&filter_nml
'
][
'
output_sd
'
]
=
[[
'
.false.
'
]]
# fail if horiz_dist_only == false but observations contain a satellite channel
# fail if horiz_dist_only == false but observations contain a satellite channel
if
nml
[
'
&location_nml
'
][
'
horiz_dist_only
'
][
0
]
==
'
.false.
'
:
if
nml
[
'
&location_nml
'
][
'
horiz_dist_only
'
][
0
]
==
'
.false.
'
:
for
obscfg
in
exp
.
observations
:
for
obscfg
in
exp
.
observations
:
...
...
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