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
7418e98f
Commit
7418e98f
authored
4 years ago
by
tomrink
Browse files
Options
Downloads
Patches
Plain Diff
snapshot...
parent
7104dfaf
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
+11
-9
11 additions, 9 deletions
modules/aeolus/aeolus_amv.py
with
11 additions
and
9 deletions
modules/aeolus/aeolus_amv.py
+
11
−
9
View file @
7418e98f
...
@@ -218,9 +218,11 @@ def time_dict_to_nd(time_dict):
...
@@ -218,9 +218,11 @@ def time_dict_to_nd(time_dict):
for
key
in
keys
:
for
key
in
keys
:
vals
=
time_dict
[
key
]
vals
=
time_dict
[
key
]
if
vals
is
not
None
:
if
vals
is
not
None
:
for
i
in
range
(
len
(
vals
)):
nda
=
np
.
array
(
vals
[
0
])
# only take one profile per second
nda
=
np
.
array
(
vals
[
i
])
time_dict
[
key
]
=
nda
vals
[
i
]
=
nda
# for i in range(len(vals)):
# nda = np.array(vals[i])
# vals[i] = nda
return
time_dict
return
time_dict
...
@@ -387,8 +389,8 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14
...
@@ -387,8 +389,8 @@ def match_amvs_to_aeolus(aeolus_dict, amv_files_path, amv_source='OPS', band='14
continue
continue
layers
=
profs
layers
=
profs
if
isinstance
(
profs
,
list
):
#
if isinstance(profs, list):
layers
=
profs
[
0
]
#
layers = profs[0]
lat
=
layers
[
0
,
0
]
lat
=
layers
[
0
,
0
]
lon
=
layers
[
0
,
1
]
lon
=
layers
[
0
,
1
]
...
@@ -456,8 +458,8 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
...
@@ -456,8 +458,8 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
prof_s
=
aeolus_dct
.
get
(
key
)
prof_s
=
aeolus_dct
.
get
(
key
)
prof
=
prof_s
prof
=
prof_s
if
isinstance
(
prof
,
list
):
#
if isinstance(prof, list):
prof
=
prof_s
[
0
]
#
prof = prof_s[0]
num_levs
.
append
(
prof
.
shape
[
0
])
num_levs
.
append
(
prof
.
shape
[
0
])
nlevs
+=
prof
.
shape
[
0
]
nlevs
+=
prof
.
shape
[
0
]
...
@@ -514,8 +516,8 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
...
@@ -514,8 +516,8 @@ def create_file(filename, aeolus_to_amv_dct, aeolus_dct, amv_files, cld_lyr=Fals
prof_s
=
aeolus_dct
.
get
(
key
)
prof_s
=
aeolus_dct
.
get
(
key
)
prof
=
prof_s
prof
=
prof_s
if
isinstance
(
prof_s
,
list
):
#
if isinstance(prof_s, list):
prof
=
prof_s
[
0
]
#
prof = prof_s[0]
if
not
cld_lyr
:
if
not
cld_lyr
:
prf_hht
[
i_c
:
i_d
]
=
prof
[:,
3
]
prf_hht
[
i_c
:
i_d
]
=
prof
[:,
3
]
prf_hhb
[
i_c
:
i_d
]
=
prof
[:,
4
]
prf_hhb
[
i_c
:
i_d
]
=
prof
[:,
4
]
...
...
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