From 2e62f57485d1929093a04cc301ca31b01f4289af Mon Sep 17 00:00:00 2001 From: Fabian Bernhard <10245680+fabern@users.noreply.github.com> Date: Thu, 19 Dec 2024 18:34:32 +0100 Subject: [PATCH] Add missing documentation *.Rd-files --- DESCRIPTION | 2 +- man/collect_drivers_sofun.Rd | 38 ++++++++++++++++++++++++++++++++++ man/prepare_setup_sofun.Rd | 40 ++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 man/collect_drivers_sofun.Rd create mode 100644 man/prepare_setup_sofun.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 23b9b0e..eb2d09a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -46,7 +46,7 @@ Remotes: bczernecki/climate LazyData: true ByteCompile: true -RoxygenNote: 7.3.1 +RoxygenNote: 7.3.2 Suggests: ggplot2, rmarkdown, diff --git a/man/collect_drivers_sofun.Rd b/man/collect_drivers_sofun.Rd new file mode 100644 index 0000000..bdb547f --- /dev/null +++ b/man/collect_drivers_sofun.Rd @@ -0,0 +1,38 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/collect_drivers_sofun.R +\name{collect_drivers_sofun} +\alias{collect_drivers_sofun} +\title{Collect all drivers} +\usage{ +collect_drivers_sofun(site_info, params_siml, meteo, fapar, co2, params_soil) +} +\arguments{ +\item{site_info}{A data frame containing site meta info (rows for sites). +Required columns are: \code{"sitename", "year_start", +"year_end", "lon", "lat", "elv"}. See \code{\link{prepare_setup_sofun}} for +details.} + +\item{params_siml}{A nested data frame with rows for each site containing +simulation parameters for SOFUN. See \code{\link{run_pmodel_f_bysite}} or +\code{\link{run_biomee_f_bysite}}.} + +\item{meteo}{A nested data frame with rows for each site and meteorological +forcing data time series nested inside a column named \code{"data"}.} + +\item{fapar}{A nested data frame with rows for each site and fAPAR +forcing data time series nested inside a column named \code{"data"}.} + +\item{co2}{A nested data frame with rows for each site and CO2 +forcing data time series nested inside a column named \code{"data"}.} + +\item{params_soil}{Soil texture data descriptor, a data frame with columns +\code{"layer", "fsand", "fclay", "forg" } and \code{"fgravel"}.} +} +\value{ +A \code{rsofun} input data frame (see \link{p_model_drivers} for a detailed +description of its structure and contents). +} +\description{ +Collect all drivers for site-level simulations +into a nested data frame with one row for each site. +} diff --git a/man/prepare_setup_sofun.Rd b/man/prepare_setup_sofun.Rd new file mode 100644 index 0000000..97784b8 --- /dev/null +++ b/man/prepare_setup_sofun.Rd @@ -0,0 +1,40 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/prepare_setup_sofun.R +\name{prepare_setup_sofun} +\alias{prepare_setup_sofun} +\title{Complements the setup settings} +\usage{ +prepare_setup_sofun(site_info, params_siml) +} +\arguments{ +\item{site_info}{A character string specifying the path to the site meta +information file, or a data frame containing the site meta info. Required +columns are: +\describe{ +\item{\code{sitename}}{Name of the site, must be the first column of the file.} +\item{\code{lon}}{Longitude of site.} +\item{\code{lat}}{Latitude of site.} +\item{\code{elv}}{Elevation of site, in m.} +\item{\code{year_start, year_end}}{Years for which the simulation is to be done, +corresponding to data availability from site.} +}} + +\item{params_siml}{A named list containing the simulation parameters +for SOFUN.} +} +\value{ +A data frame (tibble) containing the site meta information, +complemented by column \code{params_siml} which is a nested list +of complemented simulation parameters. +} +\description{ +Complements the settings based on the site meta info CSV file or data frame. +} +\examples{ +\dontrun{ + setup <- prepare_setup_sofun( + site_info = site_info, + params_siml = params_siml + ) +} +}