Skip to content
Snippets Groups Projects
Commit 3d2680a4 authored by Greg Quinn's avatar Greg Quinn
Browse files

Made airs2modis_pre output filename explicit

parent a8d0bc7a
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment