interp_phenology: fill MODIS phenology status to arbitrary dates.

View source: R/interp_phenology.R

interp_phenologyR Documentation

fill MODIS phenology status to arbitrary dates.

Description

perform constant interpolation of phenology factor codes( ginc, gmax, gdec, gmin ). That is, fill phenology transition status forward until the value changes, resulting in a ginc, gmax, gdec, or gmin value at all timestamps.

Usage

interp_phenology(phen, dates)

Arguments

phen

data frame with variables date (chron), phen (factor with levels ginc, gdec, gmin, gmax)

dates

chron; dates to fill in.

Details

The interpolation converts the factors to numeric codes 1 to 4 – this code creates a dictionary and maps them back, preserving their factor status for readability.

Value

phen filled to the dates in dates

Author(s)

Timothy W. Hilton

Examples

data(Park_Falls)
interpolated_phen <- interp_phenology(phen=PFa_phen, 
                                      dates=PFa_tower_obs[['date']])

Timothy-W-Hilton/VPRMLandSfcModel documentation built on July 29, 2023, 8:43 p.m.