Project

General

Profile

« Previous | Next » 

Revision 905db3dc

Added by Adam Wilson over 11 years ago

Update MOD35 process path extraction to use sensor angle

View differences:

climate/procedures/MOD35_ExtractProcessPath.r
124 124

  
125 125

  
126 126
### run it
127
mclapply(files[1:200],getpath,mc.cores=10)
127
mclapply(files,getpath,mc.cores=10)
128 128

  
129 129
## check gdal can read all of them
130 130
gfiles=list.files(outdir,pattern="tif$",full=T)
......
145 145

  
146 146

  
147 147
###  Merge them into a geotiff
148
    system(paste("gdal_merge.py -v -init 255 -n 255 -o MOD35_ProcessPath_gdalmerge2.tif -co \"ZLEVEL=9\" -co \"COMPRESS=LZW\" -co \"PREDICTOR=2\" `ls -d -1 gridded/*.tif --sort=size `",sep=""))
148
    system(paste("gdal_merge.py -v -init 255 -n 255 -o ",outdir,"/../MOD35_ProcessPath_gdalmerge2.tif -co \"ZLEVEL=9\" -co \"COMPRESS=LZW\" -co \"PREDICTOR=2\" `ls -d -1 ",outdir,"/*.tif --sort=size `",sep=""))
149 149

  
150 150
#  origin(raster(gfiles[5]))
151 151
  
climate/tests/HEG_test.sh
3 3
mkdir /tmp/tmp1
4 4
cd /tmp/tmp1
5 5

  
6
url="ftp://ladsweb.nascom.nasa.gov/allData/6/MOD35_L2/2009/029/"
7
## two granules that still show interpolation artifacts
8
granule="MOD35_L2.A2009029.0500.006.2012245113542.hdf"
9
granule="MOD35_L2.A2009029.0320.006.2012245113606.hdf"
10

  
6 11
## get swath data
7
wget ftp://ladsweb.nascom.nasa.gov/allData/6/MOD35_L2/2009/029/MOD35_L2.A2009029.0005.006.2012245113426.hdf
12
wget $url$granule
8 13

  
9 14
## build parameter file
10 15
echo "
11 16
NUM_RUNS = 1
12 17

  
13 18
BEGIN
14
INPUT_FILENAME = /tmp/tmp1/MOD35_L2.A2009029.0005.006.2012245113426.hdf
19
INPUT_FILENAME = $granule
15 20
OBJECT_NAME = mod35
16 21
FIELD_NAME = Cloud_Mask|
17 22
BAND_NUMBER = 1
......
23 28
OUTPUT_PROJECTION_TYPE = SIN
24 29
ELLIPSOID_CODE = WGS84
25 30
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
31
OUTPUT_FILENAME = out_$granule
27 32
OUTPUT_TYPE = HDFEOS
28 33
END
29 34
" > params.txt
30 35

  
31 36
### run it
32
swtif -p params.txt -d  -tmpLatLondir /tmp/tmp1/
37
/usr/local/heg/2.12/bin/swtif -p params.txt -d  -tmpLatLondir /tmp/tmp1
33 38

  
34 39
## now view the output file in 

Also available in: Unified diff