dm_join_subdaily_clim: Join subdaily climate features to point-level dendrometer...

View source: R/dm_join_subdaily_clim.R

dm_join_subdaily_climR Documentation

Join subdaily climate features to point-level dendrometer output

Description

Joins timestamp-level subdaily climate features to point-level output from phase.zg() or phase.sc().

The climate input can be:

  • the output of dm_subdaily_clim()

  • the output of read.climate()

  • a raw climate data frame

  • a valid climate file path readable by read.climate()

If the supplied climate input is not already a subdaily climate-feature table, the function attempts to standardize it with read.climate() and then joins by exact timestamp using the TIME column.

Usage

dm_join_subdaily_clim(x, clim_sub)

Arguments

x

Object returned by phase.zg() or phase.sc().

clim_sub

Climate input. This can be a subdaily climate-feature table, a standardized climate object returned by read.climate(), a raw climate data frame, or a valid climate file path.

Value

The same phase object with climate features appended to ZG_phase or SC_phase. The returned object has class c("ZG_output_clim", "ZG_output", ...) or c("SC_output_clim", "SC_output", ...).

Examples


data(gf_nepa17)
data(ktm_clim_hourly)

zg <- phase.zg(df = gf_nepa17[1:800, ], TreeNum = 1)

clim_sub <- dm_subdaily_clim(
  ktm_clim_hourly,
  mean_vars = c("temp", "VPD", "RH"),
  sum_vars  = c("prec"),
  lag_vars  = c("temp", "VPD", "RH"),
  roll_hours = c(1, 3, 6, 24),
  lag_hours  = c(1, 3, 6, 24)
)

zg_point_clim <- dm_join_subdaily_clim(zg, clim_sub)
head(zg_point_clim$ZG_phase)



dendRoAnalyst documentation built on May 20, 2026, 5:07 p.m.