Extract Vegetation Phenology at site scale

process_phenofit(
  y,
  t,
  w,
  QC_flag = NULL,
  nptperyear = 36,
  brks = NULL,
  rFUN = "smooth_wWHIT",
  wFUN = wTSM,
  lambda = NULL,
  TRS = c(0.1, 0.2, 0.5, 0.6, 0.8, 0.9),
  iters = 2,
  maxExtendMonth = 12,
  minExtendMonth = 0.5,
  minPercValid = 0,
  south = FALSE,
  verbose = TRUE,
  methods = c("AG", "Zhang", "Beck", "Elmore", "Gu"),
  outfile = NULL,
  title = NULL,
  ylab = "EVI",
  yticks = NULL,
  IsPlot.brks = FALSE,
  write.fig = TRUE,
  show = FALSE,
  ymin = 0.1,
  wmin = 0.1,
  wsnow = 0.8,
  use.y0 = FALSE,
  alpha = 0.02,
  cex = 1.5,
  overwrite = FALSE,
  .v_curve = FALSE,
  run.curvefit = TRUE,
  ...
)

Arguments

y

Numeric vector, vegetation index time-series

t

Numeric vector, Date variable

w

(optional) Numeric vector, weights of y. If not specified, weights of all NA values will be wmin, the others will be 1.0.

QC_flag

Factor (optional) returned by qcFUN, levels should be in the range of c("snow", "cloud", "shadow", "aerosol", "marginal", "good"), others will be categoried into others. QC_flag is used for visualization in get_pheno() and plot_curvefits().

nptperyear

Integer, number of images per year.

brks

A list object with the elements of 'fit' and 'dt', returned by season or season_mov, which contains the growing season dividing information.

rFUN

Rough curve fitting function, can be one of smooth_wSG(), smooth_wWHIT() and smooth_wHANTS().

wFUN

Character or function, weights updating function of fine fitting function. If not specified, it will be determined by phenofit options wFUN_fine.

lambda

The smoothing parameter of smooth_wWHIT(). For season_mov(), if lambda is NULL, init_lambda() will be used. Generally, it was set as 10000, 15, and 5 for daily, 8-day and 16-day inputs respectively.

iters

How many times curve fitting is implemented.

maxExtendMonth

Search good or marginal good values in previous and subsequent maxExtendMonth period.

minExtendMonth

Extending perid defined by nextend and maxExtendMonth should be no shorter than minExtendMonth. When all points of the input time-series are good value, then the extending period will be too short. In that situation, we can't make sure the connection between different growing seasons is smoothing.

minPercValid

(optional, default not use). If the percentage of good and marginal quality points is less than minPercValid, curve fiting result is set to NA.

south

Boolean. In south hemisphere, growing year is 1 July to the following year 31 June; In north hemisphere, growing year is 1 Jan to 31 Dec.

methods

Fine curve fitting methods, can be one or more of c('AG', 'Beck', 'Elmore', 'Zhang', 'Gu', 'Klos'). Note that 'Gu' and 'Klos' are very slow. f not specified, it will be determined by phenofit options methods_fine.

ymin

If specified, ylu[1] is constrained greater than ymin. This value is critical for bare, snow/ice land, where vegetation amplitude is quite small. Generally, you can set ymin=0.08 for NDVI, ymin=0.05 for EVI, ymin=0.5 gC m-2 s-1 for GPP.

wmin

Double, minimum weight of bad points, which could be smaller the weight of snow, ice and cloud.

wsnow

Doulbe. Reset the weight of snow points, after get ylu. Snow flag is an important flag of ending of growing season. Snow points is more valuable than marginal points. Hence, the weight of snow should be great than that of marginal.

use.y0

boolean. whether to use original y0, which is before the process of check_input.

alpha

Double, in [0,1], quantile prob of ylu_min.

...

other parameters to curvefits()