#!/bin/bash
export ANCDATA=$HOME/NDVI2.1/run
~/NDVI.2.1/src/crefl.1.4 -f -1km -v MOD021KM.A2007081.1633.005.hdf -of=crefl.hdf -bands=1,2,3,4,5,6,7
~/NDVI.2.1/src/ndvi_evi.2.1 -of=ndvi.hdf -blue=3 -red=1 -nir=2 crefl.hdf
export MRTDATADIR=$HOME/MRTSwath/data
~/MRTSwath/bin/swath2grid -if=ndvi.hdf -gf=MOD03.A2007081.1633.005.hdf -of=ndvi_proj.hdf \
  -off=HDF_FMT -kk=BI -oproj=UTM -opsz=1000 -oul=-90.0,45.0 -olr=-75.0,30.0 -osp=8 -osst=LAT_LONG -ozn=16
