User Tools

Site Tools


wiki:exercise4c

Exercise 4c: Study long time series of mean NDVI

In this exercise the following tools will be used:

  • pktools: pkinfo
  • bash: for loop
  • awk: basic

Use the statistics option (–stat) from pkinfo to calculate min, max, mean and std dev of image

Use basic bash to filter values only

for YEAR in 2006 2007 2008 2009 2010;do 
    echo "processing year ${YEAR}"
    for MONTH in 01 02 03 04 05 06 07 08 09 10 11 12; do 
	pkinfo -i ${OUTPUTDIR}/exercise4/${YEAR}${MONTH}-MODIS500_CW_NDVI.tif -stat
    done| awk '{print $2,$4,$6,$8}' > ${OUTPUTDIR}/exercise4/mean_ndvi_${YEAR}.txt
done

plot the profiles in gnuplot (click here for the code)

wiki/exercise4c.txt · Last modified: 2017/12/05 22:53 (external edit)