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
008ba5e6
Commit
008ba5e6
authored
1 year ago
by
lkugler
Browse files
Options
Downloads
Patches
Plain Diff
vertical localization False
parent
64f887f1
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
+11
-6
11 additions, 6 deletions
dartwrf/dart_nml.py
with
11 additions
and
6 deletions
dartwrf/dart_nml.py
+
11
−
6
View file @
008ba5e6
...
@@ -182,17 +182,22 @@ def _get_list_of_localizations():
...
@@ -182,17 +182,22 @@ def _get_list_of_localizations():
for
obscfg
in
exp
.
observations
:
for
obscfg
in
exp
.
observations
:
if
obscfg
[
"
loc_vert_km
"
]
==
False
or
obscfg
[
"
loc_vert_scaleheight
"
]
==
False
:
continue
# no vertical localization for this observation type, in all other cases we need it
l_obstypes
.
append
(
obscfg
[
"
kind
"
])
l_obstypes
.
append
(
obscfg
[
"
kind
"
])
loc_horiz_km
=
obscfg
[
"
loc_horiz_km
"
]
loc_horiz_km
=
obscfg
[
"
loc_horiz_km
"
]
if
not
loc_horiz_km
>=
0
:
if
not
loc_horiz_km
>=
0
:
raise
ValueError
(
'
Invalid value for `loc_horiz_km`, set loc_horiz_km >= 0 !
'
)
raise
ValueError
(
'
Invalid value for `loc_horiz_km`, set loc_horiz_km >= 0 !
'
)
# compute horizontal localization
# compute horizontal localization
value
loc_horiz_rad
=
to_radian_horizontal
(
loc_horiz_km
)
loc_horiz_rad
=
to_radian_horizontal
(
loc_horiz_km
)
l_loc_horiz_rad
.
append
(
loc_horiz_rad
)
l_loc_horiz_rad
.
append
(
loc_horiz_rad
)
try
:
# localization by height
# compute vertical localization value
loc_vert_km
=
obscfg
[
"
loc_vert_km
"
]
try
:
# do we localize by height?
loc_vert_km
=
obscfg
[
"
loc_vert_km
"
]
vert_norm_hgt
=
to_vertical_normalization
(
loc_vert_km
,
loc_horiz_km
)
vert_norm_hgt
=
to_vertical_normalization
(
loc_vert_km
,
loc_horiz_km
)
l_loc_vert_km
.
append
(
vert_norm_hgt
)
l_loc_vert_km
.
append
(
vert_norm_hgt
)
...
@@ -200,7 +205,7 @@ def _get_list_of_localizations():
...
@@ -200,7 +205,7 @@ def _get_list_of_localizations():
# set the other (unused) list to a dummy value
# set the other (unused) list to a dummy value
l_loc_vert_scaleheight
.
append
(
-
1
)
l_loc_vert_scaleheight
.
append
(
-
1
)
except
KeyError
:
# localiz
ation
by scale height
except
KeyError
:
#
do we
localiz
e
by scale height
?
try
:
try
:
loc_vert_scaleheight
=
obscfg
[
"
loc_vert_scaleheight
"
]
loc_vert_scaleheight
=
obscfg
[
"
loc_vert_scaleheight
"
]
...
@@ -210,9 +215,9 @@ def _get_list_of_localizations():
...
@@ -210,9 +215,9 @@ def _get_list_of_localizations():
# set the other (unused) list to a dummy value
# set the other (unused) list to a dummy value
l_loc_vert_km
.
append
(
-
1
)
l_loc_vert_km
.
append
(
-
1
)
except
KeyError
:
except
KeyError
:
# if neither is defined
# do we have vertical localization?
# do we have vertical localization
at all
?
# check parameter horiz_dist_only == true
# check parameter horiz_dist_only == true
if
exp
.
dart_nml
[
'
&location_nml
'
][
'
horiz_dist_only
'
]
==
'
.true.
'
:
if
exp
.
dart_nml
[
'
&location_nml
'
][
'
horiz_dist_only
'
]
==
'
.true.
'
:
# no vertical localization
# no vertical localization
...
...
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