Project

General

Profile

Download (1008 Bytes) Statistics
| Branch: | Revision:
1
#! /bin/bash
2

    
3
tempdir=~/acrobates/adamw/projects/tmp
4
mkdir $tempdir
5
cd $tempdir
6

    
7
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
## get swath data
13
wget $url$granule
14

    
15
## build parameter file
16
echo "
17
NUM_RUNS = 1
18

    
19
BEGIN
20
INPUT_FILENAME = $granule
21
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
OUTPUT_FILENAME = out_$granule
33
OUTPUT_TYPE = HDFEOS
34
END
35
" > params.txt
36

    
37
### run it
38
/usr/local/heg/2.12b/bin/swtif -p params.txt -d  -tmpLatLondir $tempdir
39

    
40
## now view the output file in 
41

    
42

    
(1-1/2)