1 |
5f212fe8
|
Adam M. Wilson
|
#! /bin/bash
|
2 |
|
|
|
3 |
|
|
mkdir /tmp/tmp1
|
4 |
|
|
cd /tmp/tmp1
|
5 |
|
|
|
6 |
|
|
## get swath data
|
7 |
|
|
wget ftp://ladsweb.nascom.nasa.gov/allData/6/MOD35_L2/2009/029/MOD35_L2.A2009029.0005.006.2012245113426.hdf
|
8 |
|
|
|
9 |
|
|
## build parameter file
|
10 |
|
|
echo "
|
11 |
|
|
NUM_RUNS = 1
|
12 |
|
|
|
13 |
|
|
BEGIN
|
14 |
|
|
INPUT_FILENAME = /tmp/tmp1/MOD35_L2.A2009029.0005.006.2012245113426.hdf
|
15 |
|
|
OBJECT_NAME = mod35
|
16 |
|
|
FIELD_NAME = Cloud_Mask|
|
17 |
|
|
BAND_NUMBER = 1
|
18 |
|
|
OUTPUT_PIXEL_SIZE_X = 1013.0
|
19 |
|
|
OUTPUT_PIXEL_SIZE_Y = 1013.0
|
20 |
|
|
SPATIAL_SUBSET_UL_CORNER = ( 89.929451 -179.998932 )
|
21 |
|
|
SPATIAL_SUBSET_LR_CORNER = ( 64.8638 179.998108 )
|
22 |
|
|
RESAMPLING_TYPE = NN
|
23 |
|
|
OUTPUT_PROJECTION_TYPE = SIN
|
24 |
|
|
ELLIPSOID_CODE = WGS84
|
25 |
|
|
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 )
|
26 |
|
|
OUTPUT_FILENAME = /tmp/tmp1/MOD35_L2.A2009029.0005.006.2012245113426_mod35.hdf
|
27 |
|
|
OUTPUT_TYPE = HDFEOS
|
28 |
|
|
END
|
29 |
|
|
" > params.txt
|
30 |
|
|
|
31 |
|
|
### run it
|
32 |
|
|
swtif -p params.txt -d -tmpLatLondir /tmp/tmp1/
|
33 |
|
|
|
34 |
|
|
## now view the output file in
|