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
318f8d67
Commit
318f8d67
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
51005c6c
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/aeolus/aeolus_amv.py
+4
-3
4 additions, 3 deletions
modules/aeolus/aeolus_amv.py
with
4 additions
and
3 deletions
modules/aeolus/aeolus_amv.py
+
4
−
3
View file @
318f8d67
...
@@ -394,6 +394,7 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
...
@@ -394,6 +394,7 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
gfs_press
=
None
gfs_press
=
None
gfs_spd
=
None
gfs_spd
=
None
gfs_dir
=
None
gfs_dir
=
None
bf_gfs_list
=
None
if
gfs_filename
is
not
None
:
if
gfs_filename
is
not
None
:
locs
=
np
.
array
(
keys
)
locs
=
np
.
array
(
keys
)
do_gfs_best_fit
=
True
do_gfs_best_fit
=
True
...
@@ -404,14 +405,13 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
...
@@ -404,14 +405,13 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
gfs_press
=
gfs_press
[::
-
1
]
gfs_press
=
gfs_press
[::
-
1
]
uv_wind
=
get_vert_profile_s
(
xr_dataset
,
[
'
u-wind
'
,
'
v-wind
'
],
locs
[:,
1
],
locs
[:,
0
],
method
=
'
nearest
'
)
uv_wind
=
get_vert_profile_s
(
xr_dataset
,
[
'
u-wind
'
,
'
v-wind
'
],
locs
[:,
1
],
locs
[:,
0
],
method
=
'
nearest
'
)
uv_wind
=
uv_wind
.
data
uv_wind
=
uv_wind
.
values
wspd
,
wdir
=
spd_dir_from_uv
(
uv_wind
[
0
,
:,
:],
uv_wind
[
1
,
:,
:])
wspd
,
wdir
=
spd_dir_from_uv
(
uv_wind
[
0
,
:,
:],
uv_wind
[
1
,
:,
:])
wspd
=
wspd
.
magnitude
wspd
=
wspd
.
magnitude
wdir
=
wdir
.
magnitude
wdir
=
wdir
.
magnitude
gfs_spd
=
wspd
[:,
::
-
1
]
gfs_spd
=
wspd
[:,
::
-
1
]
gfs_dir
=
wdir
[:,
::
-
1
]
gfs_dir
=
wdir
[:,
::
-
1
]
amvs_list
=
[]
amvs_list
=
[]
bf_list
=
[]
bf_list
=
[]
raob_match_list
=
[]
raob_match_list
=
[]
...
@@ -450,7 +450,8 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
...
@@ -450,7 +450,8 @@ def analyze2(raob_to_amv_dct, raob_dct, gfs_filename=None):
amvs
=
np
.
transpose
(
amvs
,
axes
=
[
1
,
0
])
amvs
=
np
.
transpose
(
amvs
,
axes
=
[
1
,
0
])
bfs
=
np
.
stack
(
bf_list
,
axis
=
0
)
bfs
=
np
.
stack
(
bf_list
,
axis
=
0
)
raob_match
=
np
.
stack
(
raob_match_list
,
axis
=
0
)
raob_match
=
np
.
stack
(
raob_match_list
,
axis
=
0
)
bfs_gfs
=
np
.
stack
(
bf_gfs_list
,
axis
=
0
)
if
len
(
bf_gfs_list
)
>
0
:
bfs_gfs
=
np
.
stack
(
bf_gfs_list
,
axis
=
0
)
good_amvs
=
amvs
good_amvs
=
amvs
num_good
=
good_amvs
.
shape
[
0
]
num_good
=
good_amvs
.
shape
[
0
]
...
...
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