1 |
5f212fe8
|
Adam M. Wilson
|
#! /bin/bash
|
2 |
|
|
|
3 |
555815c9
|
Adam M. Wilson
|
tempdir=~/acrobates/adamw/projects/tmp
|
4 |
|
|
mkdir $tempdir
|
5 |
|
|
cd $tempdir
|
6 |
5f212fe8
|
Adam M. Wilson
|
|
7 |
905db3dc
|
Adam M. Wilson
|
url="ftp://ladsweb.nascom.nasa.gov/allData/6/MOD35_L2/2009/029/"
|
8 |
|
|
## two granules that still show interpolation artifacts
|
9 |
|
|
granule="MOD35_L2.A2009029.0500.006.2012245113542.hdf"
|
10 |
|
|
granule="MOD35_L2.A2009029.0320.006.2012245113606.hdf"
|
11 |
|
|
|
12 |
5f212fe8
|
Adam M. Wilson
|
## get swath data
|
13 |
905db3dc
|
Adam M. Wilson
|
wget $url$granule
|
14 |
5f212fe8
|
Adam M. Wilson
|
|
15 |
|
|
## build parameter file
|
16 |
|
|
echo "
|
17 |
|
|
NUM_RUNS = 1
|
18 |
|
|
|
19 |
|
|
BEGIN
|
20 |
905db3dc
|
Adam M. Wilson
|
INPUT_FILENAME = $granule
|
21 |
5f212fe8
|
Adam M. Wilson
|
OBJECT_NAME = mod35
|
22 |
|
|
FIELD_NAME = Cloud_Mask|
|
23 |
|
|
BAND_NUMBER = 1
|
24 |
|
|
OUTPUT_PIXEL_SIZE_X = 1013.0
|
25 |
|
|
OUTPUT_PIXEL_SIZE_Y = 1013.0
|
26 |
|
|
SPATIAL_SUBSET_UL_CORNER = ( 89.929451 -179.998932 )
|
27 |
|
|
SPATIAL_SUBSET_LR_CORNER = ( 64.8638 179.998108 )
|
28 |
|
|
RESAMPLING_TYPE = NN
|
29 |
|
|
OUTPUT_PROJECTION_TYPE = SIN
|
30 |
|
|
ELLIPSOID_CODE = WGS84
|
31 |
|
|
OUTPUT_PROJECTION_PARAMETERS = ( 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 )
|
32 |
905db3dc
|
Adam M. Wilson
|
OUTPUT_FILENAME = out_$granule
|
33 |
5f212fe8
|
Adam M. Wilson
|
OUTPUT_TYPE = HDFEOS
|
34 |
|
|
END
|
35 |
|
|
" > params.txt
|
36 |
|
|
|
37 |
|
|
### run it
|
38 |
555815c9
|
Adam M. Wilson
|
/usr/local/heg/2.12b/bin/swtif -p params.txt -d -tmpLatLondir $tempdir
|
39 |
|
|
|
40 |
|
|
## now view the output file in
|
41 |
|
|
|