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
351860df
There was an error fetching the commit references. Please try again later.
Commit
351860df
authored
4 years ago
by
rink
Browse files
Options
Downloads
Patches
Plain Diff
take out explicit GOES-16 range check, shouldn't need now.
parent
19bc4c19
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
+19
-8
19 additions, 8 deletions
modules/aeolus/aeolus_amv.py
with
19 additions
and
8 deletions
modules/aeolus/aeolus_amv.py
+
19
−
8
View file @
351860df
...
...
@@ -16,8 +16,8 @@ first_time = True
ftimes
=
[]
flist
=
None
G16_lon_range
=
[
-
130.0
,
-
30.0
]
G16_lat_range
=
[
-
64.0
,
64.0
]
#
G16_lon_range = [-130.0, -30.0]
#
G16_lat_range = [-64.0, 64.0]
class
MyGenericException
(
Exception
):
...
...
@@ -212,6 +212,8 @@ def get_aeolus_time_dict_s(filenames, lon360=False, do_sort=True):
def
get_search_box
(
nav
,
lon
,
lat
):
cc
,
ll
=
nav
.
earth_to_lc
(
lon
,
lat
)
if
cc
is
None
:
return
None
,
None
c_rng
=
[
cc
-
half_width
,
cc
+
half_width
]
l_rng
=
[
ll
-
half_width
,
ll
+
half_width
]
...
...
@@ -231,6 +233,7 @@ def get_search_box(nav, lon, lat):
return
c_rng
,
l_rng
# Framework
amv_dir_name
=
'
Wind_Dir
'
amv_spd_name
=
'
Wind_Speed
'
amv_lon_name
=
'
Longitude
'
...
...
@@ -238,6 +241,12 @@ amv_lat_name = 'Latitude'
amv_elem_name
=
'
Element
'
amv_line_name
=
'
Line
'
amv_press_name
=
'
MedianPress
'
# -------------------------------
# Carr stereo
amv_lon_name
=
'
Lon
'
amv_lat_name
=
'
Lat
'
amv_press_name
=
'
pres
'
# -------------------------------
# aeolus_dict: time -> profiles
...
...
@@ -262,12 +271,16 @@ def match_amvs_to_aelous(aeolus_dict, amv_files_path, amv_source='OPS', band='14
lat
=
layers
[
0
,
0
]
lon
=
layers
[
0
,
1
]
# check range
if
lat
>
G16_lat_range
[
1
]
or
lat
<
G16_lat_range
[
0
]:
continue
if
lon
>
G16_lon_range
[
1
]
or
lon
<
G16_lon_range
[
0
]:
continue
#
if lat > G16_lat_range[1] or lat < G16_lat_range[0]:
#
continue
#
if lon > G16_lon_range[1] or lon < G16_lon_range[0]:
#
continue
# ------------------------------------------------
c_rng
,
l_rng
=
get_search_box
(
nav
,
lon
,
lat
)
if
c_rng
is
None
:
continue
if
f_idx
!=
last_f_idx
:
last_f_idx
=
f_idx
ds
=
Dataset
(
fname
)
...
...
@@ -281,8 +294,6 @@ def match_amvs_to_aelous(aeolus_dict, amv_files_path, amv_source='OPS', band='14
# cc, ll = nav.earth_to_lc_s(amv_lons, amv_lats)
ds
.
close
()
c_rng
,
l_rng
=
get_search_box
(
nav
,
lon
,
lat
)
in_cc
=
np
.
logical_and
(
cc
>
c_rng
[
0
],
cc
<
c_rng
[
1
])
in_ll
=
np
.
logical_and
(
ll
>
l_rng
[
0
],
ll
<
l_rng
[
1
])
in_box
=
np
.
logical_and
(
in_cc
,
in_ll
)
...
...
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