Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
python
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Anthony J. Wimmers
python
Commits
168bd385
Commit
168bd385
authored
Oct 26, 2020
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
fef9480e
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
modules/amv/intercompare.py
+13
-15
13 additions, 15 deletions
modules/amv/intercompare.py
with
13 additions
and
15 deletions
modules/amv/intercompare.py
+
13
−
15
View file @
168bd385
...
...
@@ -968,19 +968,18 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
SatwindBestFitU
=
fcst_uwind
[
LevBelow
]
*
(
1.0
-
Prop
)
+
fcst_uwind
[
LevAbove
]
*
Prop
SatwindBestFitV
=
fcst_vwind
[
LevBelow
]
*
(
1.0
-
Prop
)
+
fcst_vwind
[
LevAbove
]
*
Prop
# Check to see if the best fit pressure is constrained.
SatwindGoodConstraint
=
1
flag
=
0
# Check for overall good agreement
vdiff
=
np
.
sqrt
((
amv_uwind
-
SatwindBestFitU
)
**
2
+
(
amv_vwind
-
SatwindBestFitV
)
**
2
)
if
vdiff
>
4.0
:
SatwindGoodConstraint
=
0
flag
=
2
# Check for a substantial secondary local minimum or if local minimum is too broad
if
SatwindGoodConstraint
==
1
:
mm
=
np
.
where
(
fcst_prs
>
(
SatwindBestFitPress
+
100
))[
0
]
nn
=
np
.
where
(
fcst_prs
<
(
SatwindBestFitPress
-
100
))[
0
]
if
(
np
.
sum
(
VecDiff
[
mm
]
<
(
vdiff
+
2.0
))
+
np
.
sum
(
VecDiff
[
nn
]
<
(
vdiff
+
2.0
)))
>
0
:
SatwindGoodConstraint
=
0
flag
=
1
...
...
@@ -1107,7 +1106,6 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs
# check contraints
good_constraint
=
1
flag
=
0
# Check for overall good agreement: want vdiff less than 4 m/s
vdiff
=
np
.
sqrt
((
amv_uwind
-
sat_wind_best_fit_u
)
**
2
+
(
amv_vwind
-
sat_wind_best_fit_v
)
**
2
)
if
vdiff
>
4.0
:
...
...
@@ -1115,9 +1113,9 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs
flag
=
2
# Check for a substantial secondary local minimum or if local minimum is too broad
if
good_constraint
==
1
:
mm
=
np
.
where
(
fcst_alt
>
(
sat_wind_best_fit_alt
+
constraint_half_width
))[
0
]
nn
=
np
.
where
(
fcst_alt
<
(
sat_wind_best_fit_alt
-
constraint_half_width
))[
0
]
if
(
np
.
sum
(
vec_diff
[
mm
]
<
(
vdiff
+
2.0
))
+
np
.
sum
(
vec_diff
[
nn
]
<
(
vdiff
+
2.0
)))
>
0
:
good_constraint
=
0
flag
=
1
...
...
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