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
db7749cd
Commit
db7749cd
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
998bc290
No related branches found
Branches containing commit
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
+8
-0
8 additions, 0 deletions
modules/aeolus/aeolus_amv.py
with
8 additions
and
0 deletions
modules/aeolus/aeolus_amv.py
+
8
−
0
View file @
db7749cd
...
...
@@ -25,6 +25,8 @@ num_lines = 5424
def
get_amvs
(
amv_ds
,
timestamp
,
filepath
=
None
):
if
filepath
is
None
:
filepath
,
ftime
,
f_idx
=
amv_ds
.
get_file
(
timestamp
)
if
filepath
is
None
:
return
None
amv_params
=
amv_ds
.
get_parameters
()
# TODO: Need to generalize this better
amv_params
=
[
amv_ds
.
lat_name
,
amv_ds
.
lon_name
,
amv_ds
.
elem_name
,
amv_ds
.
line_name
]
+
amv_params
...
...
@@ -73,6 +75,8 @@ def match_amvs_to_raobs(raob_dict, raob_time, amv_ds, filepath=None):
if
filepath
is
None
:
filepath
,
ftime
,
f_idx
=
amv_ds
.
get_file
(
raob_time
)
if
filepath
is
None
:
return
None
ds
=
Dataset
(
filepath
)
...
...
@@ -254,6 +258,8 @@ def run_best_fit_all(amv_dir, source, product_dir, product, raob_path, gfs_path,
for
k
,
file
in
enumerate
(
raob_files
):
raob_dct
,
ts
=
get_raob_dict_cdf
(
file
)
m_d
=
match_amvs_to_raobs
(
raob_dct
,
ts
,
amv_files
)
if
m_d
is
None
:
continue
gfs_file
=
gfs_files
.
get_file
(
ts
)[
0
]
if
gfs_file
is
None
:
continue
...
...
@@ -289,6 +295,8 @@ def run_best_fit_all(amv_dir, source, product_dir, product, raob_path, gfs_path,
for
k
,
file
in
enumerate
(
raob_files
):
raob_dct
,
ts
=
get_raob_dict_cdf
(
file
)
amvs
=
get_amvs
(
amv_files
,
ts
)
if
amvs
is
None
:
continue
gfs_file
=
gfs_files
.
get_file
(
ts
)[
0
]
if
gfs_file
is
None
:
continue
...
...
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