User Tools

Site Tools


wiki:exercise4b

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

wiki:exercise4b [2017/12/05 22:53] (current)
Line 1: Line 1:
 +====== Exercise 4b: Long time series for user defined pixels ======
 +In this exercise the following tools will be used:
 +  * pktools: pkndvi, pkinfo
 +  * bash: for loop, redirect.
  
 +__Create colour table for NDVI image (or use an existing one)__
 +<code bash>
 +pkcreatect -min 0 -max 100 > ${OUTPUTDIR}/​exercise4/​ct_ndvi.txt
 +</​code>​
 +
 +__Create NDVI long time series based on MODIS at 500 m (2006-2010)__
 +
 +<code bash>
 +for YEAR in 2006 2007 2008 2009 2010;do
 +    for MONTH in 01 02 03 04 05 06 07 08 09 10 11 12;do
 + pkndvi -min 0 -max 100 -dst_s 100 -ot Byte -b 0 -b 1 -i ${MODIS500DIR}/​${YEAR}${MONTH}-MODIS500_CW.tif -o ${OUTPUTDIR}/​exercise4/​${YEAR}${MONTH}-MODIS500_CW_NDVI.tif
 +    done
 +done
 +</​code>​
 +
 +__Extract NDVI long time series from MODIS at 500 m (2006-2010)__
 +<code bash>
 +cat ${OUTPUTDIR}/​exercise4/​points.txt |while read LC X Y;do
 +    echo "​create a time series of this NDVI over $LC"
 +    for YEAR in 2006 2007 2008 2009 2010;do
 + for MONTH in 01 02 03 04 05 06 07 08 09 10 11 12;do
 +     NDVIIMG=${OUTPUTDIR}/​exercise4/​${YEAR}${MONTH}-MODIS500_CW_NDVI.tif
 +     pkinfo -i $NDVIIMG -x $X -y $Y -geo -r
 + done
 +    done > ${OUTPUTDIR}/​exercise4/​${LC}_modis500_ndvi.txt
 +done
 +</​code>​
 +
 +__Plot the profiles in gnuplot__ (click [[gnuplot4b | here ]] for thecode)
wiki/exercise4b.txt ยท Last modified: 2017/12/05 22:53 (external edit)