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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tom Rink
python
Commits
1c16e5d2
Commit
1c16e5d2
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
bd586536
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
modules/amv/intercompare.py
+2
-5
2 additions, 5 deletions
modules/amv/intercompare.py
with
2 additions
and
5 deletions
modules/amv/intercompare.py
+
2
−
5
View file @
1c16e5d2
...
@@ -948,10 +948,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
...
@@ -948,10 +948,7 @@ def best_fit(amv_spd, amv_dir, amv_prs, amv_lat, amv_lon, fcst_spd, fcst_dir, fc
v3
=
VecDiff
[
imin
+
1
]
v3
=
VecDiff
[
imin
+
1
]
v1
=
VecDiff
[
imin
-
1
]
v1
=
VecDiff
[
imin
-
1
]
# if top of allowed region
if
p3
<
TopPress
and
v1
!=
v2
and
v2
!=
v3
:
# check not collinear, above allowed region
if
p3
<
TopPress
:
SatwindBestFitPress
=
p2
elif
v1
!=
v2
and
v2
!=
v3
:
# check not collinear
SatwindBestFitPress
=
p2
-
(
0.5
*
SatwindBestFitPress
=
p2
-
(
0.5
*
((((
p2
-
p1
)
*
(
p2
-
p1
)
*
(
v2
-
v3
))
-
((
p2
-
p3
)
*
(
p2
-
p3
)
*
(
v2
-
v1
)))
/
((((
p2
-
p1
)
*
(
p2
-
p1
)
*
(
v2
-
v3
))
-
((
p2
-
p3
)
*
(
p2
-
p3
)
*
(
v2
-
v1
)))
/
(((
p2
-
p1
)
*
(
v2
-
v3
))
-
((
p2
-
p3
)
*
(
v2
-
v1
)))))
(((
p2
-
p1
)
*
(
v2
-
v3
))
-
((
p2
-
p3
)
*
(
v2
-
v1
)))))
...
@@ -1094,7 +1091,7 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs
...
@@ -1094,7 +1091,7 @@ def best_fit_altitude(amv_spd, amv_dir, amv_alt, amv_lat, amv_lon, fcst_spd, fcs
v3
=
vec_diff
[
imin
+
1
]
v3
=
vec_diff
[
imin
+
1
]
# check not co-linear and below alt_max
# check not co-linear and below alt_max
if
a3
<
alt_max
and
a
1
!=
a
2
and
a
2
!=
a
3
:
if
a3
<
alt_max
and
v
1
!=
v
2
and
v
2
!=
v
3
:
sat_wind_best_fit_alt
=
minimize_quadratic
(
a1
,
a2
,
a3
,
v1
,
v2
,
v3
)
sat_wind_best_fit_alt
=
minimize_quadratic
(
a1
,
a2
,
a3
,
v1
,
v2
,
v3
)
if
sat_wind_best_fit_alt
<
a1
or
sat_wind_best_fit_alt
>
a3
:
if
sat_wind_best_fit_alt
<
a1
or
sat_wind_best_fit_alt
>
a3
:
sat_wind_best_fit_alt
=
a2
sat_wind_best_fit_alt
=
a2
...
...
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