interpMODIS: interpolate MODIS band data to provide values at a given set...

View source: R/interpMODIS.R

interpMODISR Documentation

interpolate MODIS band data to provide values at a given set of dates

Description

interpolate MODIS band data to provide values at a given set of dates using either linear or constant interpolation.

Usage

interpMODIS(mod_date, mod_val, out_date, method)

Arguments

mod_date

chron vector; MODIS Time stamp

mod_val

MODIS values

out_date

chron vector; the dates for the output

method

string, either "linear" or "constant"

Value

list with components "date" and "val", containing timestamps (class chron) and values (class is dependent on the MODIS product) of the interpolated data.

Author(s)

Timothy W. Hilton

Examples

data(Park_Falls)
interpolated_EVI <- interpMODIS(mod_date=PFa_evi[['date']],
                                mod_val=PFa_evi[['evi']],
                                out_date=PFa_tower_obs[['date']],
                                method='linear')
plot(interpolated_EVI[['date']], interpolated_EVI[['val']],
     type='l', lty='dashed', 
     xlab='date', ylab='EVI', main='Park Falls')
with(PFa_evi, points(date, evi, pch='*', cex=2.0, col='red'))
legend( x='topright',
       legend=c('observed', 'interpolated'),
       pch=c('*', NULL),
       col=c('red', 'black'),
       lty=c('blank', 'dashed'),
       pt.cex=c(2.0, 1.0))

Timothy-W-Hilton/VPRMLandSfcModel documentation built on Nov. 17, 2024, 1:56 p.m.