Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intercal
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Fazlul Shahriar
intercal
Commits
b6358136
Commit
b6358136
authored
13 years ago
by
Greg Quinn
Browse files
Options
Downloads
Patches
Plain Diff
show_cv.py: allow plotting multiple VIIRS granules
parent
9b5d90b8
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
cris-viirs/show_cv.py
+12
-9
12 additions, 9 deletions
cris-viirs/show_cv.py
with
12 additions
and
9 deletions
cris-viirs/show_cv.py
+
12
−
9
View file @
b6358136
...
...
@@ -10,22 +10,24 @@ def main():
f
=
h5py
.
File
(
sys
.
argv
[
1
],
'
r
'
)
g
=
f
[
'
All_Data
'
][
'
CrIS-SDR-GEO_All
'
]
lat
=
g
[
'
Latitude
'
][
:
,:,
4
]
lon
=
g
[
'
Longitude
'
][
:
,:,
4
]
lat
=
g
[
'
Latitude
'
][
2
:
-
2
,:,
4
]
lon
=
g
[
'
Longitude
'
][
2
:
-
2
,:,
4
]
b
=
Basemap
(
projection
=
'
ortho
'
,
lon_0
=
mid
(
lon
),
lat_0
=
mid
(
lat
))
b
.
plot
(
*
b
(
mask
(
outline
(
lon
)),
mask
(
outline
(
lat
))))
b
.
plot
(
*
b
(
mask
(
outline
(
lon
)),
mask
(
outline
(
lat
)))
,
color
=
'
b
'
)
f
=
h5py
.
File
(
sys
.
argv
[
2
],
'
r
'
)
g
=
f
[
'
All_Data
'
][
'
VIIRS-MOD-GEO-TC_All
'
]
lat
=
g
[
'
Latitude
'
][:]
lon
=
g
[
'
Longitude
'
][:]
b
.
plot
(
*
b
(
mask
(
outline
(
lon
)),
mask
(
outline
(
lat
))))
for
gmtco_file
in
sys
.
argv
[
2
:]:
f
=
h5py
.
File
(
gmtco_file
,
'
r
'
)
g
=
f
[
'
All_Data
'
][
'
VIIRS-MOD-GEO-TC_All
'
]
lat
=
g
[
'
Latitude
'
][:]
lon
=
g
[
'
Longitude
'
][:]
b
.
plot
(
*
b
(
mask
(
outline
(
lon
)),
mask
(
outline
(
lat
))),
color
=
'
g
'
)
b
.
drawcoastlines
()
b
.
drawmapboundary
()
plt
.
show
()
def
mid
(
a
):
idx
=
tuple
(
np
.
array
(
a
.
shape
)
/
2
)
return
a
[
idx
]
...
...
@@ -35,7 +37,8 @@ def outline(a):
def
mask
(
a
):
return
np
.
ma
.
masked_array
(
a
,
a
==
-
9999
.0
)
return
np
.
ma
.
masked_array
(
a
,
a
<
-
200
.0
)
if
__name__
==
'
__main__
'
:
main
()
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