Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
intercal
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Collocation
intercal
Commits
3d2680a4
Commit
3d2680a4
authored
15 years ago
by
Greg Quinn
Browse files
Options
Downloads
Patches
Plain Diff
Made airs2modis_pre output filename explicit
parent
a8d0bc7a
No related branches found
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
airs2modis.py
+5
-4
5 additions, 4 deletions
airs2modis.py
airs2modis_pre.py
+5
-4
5 additions, 4 deletions
airs2modis_pre.py
with
10 additions
and
8 deletions
airs2modis.py
+
5
−
4
View file @
3d2680a4
...
...
@@ -8,14 +8,15 @@ from pyhdf.SD import SD, SDC
from
util
import
HdfWriter
# verify command line inputs
if
len
(
sys
.
argv
)
!=
3
:
print
'
usage: python %s <airs_file> <output_file>
'
%
sys
.
argv
[
0
]
if
len
(
sys
.
argv
)
!=
4
:
print
'
usage: python %s <airs_file>
<pre_file>
<output_file>
'
%
sys
.
argv
[
0
]
sys
.
exit
(
1
)
airs_filename
=
sys
.
argv
[
1
]
output_filename
=
sys
.
argv
[
2
]
pre_filename
=
sys
.
argv
[
2
]
output_filename
=
sys
.
argv
[
3
]
# open our "helper" data file (see airs2modis_pre.py)
helper_sd
=
SD
(
'
airs2modis.hdf
'
)
helper_sd
=
SD
(
pre_filename
)
# read in the mask of good AIRS channels and apply it to the AIRS
# radiances from our input granule. note that the mask is stored as
...
...
This diff is collapsed.
Click to expand it.
airs2modis_pre.py
+
5
−
4
View file @
3d2680a4
...
...
@@ -68,12 +68,13 @@ def read_airs_chan_data(filename):
return
mask
,
freqs
[
mask
],
nedts
[
mask
]
# verify command line arguments
if
len
(
sys
.
argv
)
!=
3
:
print
(
'
usage: python %s
<airs_chan_props_file> <modis_srf_file>
'
%
sys
.
argv
[
0
]
)
if
len
(
sys
.
argv
)
!=
4
:
print
(
'
usage: python %s
'
%
sys
.
argv
[
0
]
+
'
<airs_chan_props_file> <modis_srf_file> <output_file>
'
)
sys
.
exit
(
1
)
chan_props_file
=
sys
.
argv
[
1
]
srf_file
=
sys
.
argv
[
2
]
output_file
=
sys
.
argv
[
3
]
# read in the MODIS SRF data
srf_data
=
read_modis_srf_data
(
srf_file
)
...
...
@@ -108,7 +109,7 @@ bt350 = 350.0 * numpy.ones((freqs.size,), numpy.float64)
r350
=
inverse_bright_wavenumber
(
freqs
,
bt350
)
# write out the arrays to HDF
writer
=
HdfWriter
(
'
airs2modis.hdf
'
)
writer
=
HdfWriter
(
output_file
)
writer
.
write
(
'
Channel_Mask
'
,
mask
)
writer
.
write
(
'
Channel_Weights
'
,
response
)
writer
.
write
(
'
Channel_Noise_Rating
'
,
noise
)
...
...
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