diff --git a/NEWS.md b/NEWS.md index 3229276..8fc847d 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,8 @@ +# rcontroll 0.2.0.9021 + +- parameters: update TROLLv4_input.txt and generate_parameters according to the last discussion with IM +- dailyvar: update dailyvar day index to avoid bissextile years extra days + # rcontroll 0.2.0.9020 - CPP: TROLL version 4.0.1 following discussion with IM, updating treefall time normalisation diff --git a/R/generate_dailyvar.R b/R/generate_dailyvar.R index 923f3e3..2ec8a86 100755 --- a/R/generate_dailyvar.R +++ b/R/generate_dailyvar.R @@ -37,13 +37,13 @@ generate_dailyvar <- function(hourly_data, Snet <- VPD <- WS <- time_numeric <- Temp <- NULL # nolint # dailyvar + ndays <- length(unique(date(hourly_data$time))) hourly_data %>% rename(Temp = temperature, Snet = snet, VPD = vpd, WS = ws) %>% mutate(time_hour = hour(time)) %>% filter(time_hour >= daytime_start, time_hour < daytime_end) %>% select(-time_hour) %>% mutate(time_numeric = hour(time) + minute(time) / 60) %>% - mutate(DayJulian = date(time) - date(first(time)) + 1) %>% - mutate(DayJulian = as.numeric(DayJulian)) %>% + mutate(DayJulian = rep(1:ndays, each = 24)) %>% select(DayJulian, time_numeric, Temp, Snet, VPD, WS) } diff --git a/R/generate_parameters.R b/R/generate_parameters.R index ec006d8..8a5ec5d 100755 --- a/R/generate_parameters.R +++ b/R/generate_parameters.R @@ -122,7 +122,7 @@ generate_parameters <- function(cols = 200, SWtoPPFD = 2.27, # nolint p_nonvert = 0.05, klight = 0.5, - phi = 0.093, + phi = 0.10625, absorptance_leaves = 0.83, theta = 0.7, g1 = 3.77, @@ -134,8 +134,8 @@ generate_parameters <- function(cols = 200, DBH0 = 0.005, # nolint H0 = 0.950, # nolint CR_min = 0.3, # nolint - CR_a = 2.13, # nolint - CR_b = 0.63, # nolint + CR_a = 1.85, # nolint + CR_b = 0.4445, # nolint CD_a = 0, # nolint CD_b = 0.2, # nolint CD0 = 0.3, # nolint @@ -163,8 +163,8 @@ generate_parameters <- function(cols = 200, p_tfsecondary = 1, hurt_decay = 0, crown_gap_fraction = 0.15, - m = 0.025, - m1 = 0.025, + m = 0.045, + m1 = 0.045, Cair = 375, # nolint PRESS = 101.0, # nolint SOIL_LAYER_WEIGHT = 2, # nolint diff --git a/inst/extdata/TROLLv4_input.txt b/inst/extdata/TROLLv4_input.txt index ed90406..c941060 100755 --- a/inst/extdata/TROLLv4_input.txt +++ b/inst/extdata/TROLLv4_input.txt @@ -11,7 +11,7 @@ nbspp 109 /* Number of species */ SWtoPPFD 2.27 /* convert short wave irradiance to PAR photons (cf. code) */ p_nonvert 0.05 /* light incidence param (diff through turbid medium) */ klight 0.5 /* light attenuation in the canopy Beer-Lambert */ -phi 0.093 /* quantum yield (in micromol C/micromol photon) */ +phi 0.10625 /* quantum yield (in micromol C/micromol photon) */ absorptance_leaves 0.83 /* absorptance of individual leaves */ theta 0.7 /* parameter of the Farquhar model */ g1 3.77 /* parameter g1 of Medlyn et al ’s stomatal conductance model */ @@ -23,8 +23,8 @@ vC 0.021 /* variance of the flexion moment */ DBH0 0.005 /* initial dbh (m) */ H0 0.95 /* initial height (m) */ CR_min 0.3 /* minimum crown radius (in m) */ -CR_a 2.13 /* CR log intercept or Michaelis Menten initial growth */ -CR_b 0.63 /* CR log slope or Michaelis Menten asymptotic CR */ +CR_a 1.85 /* CR log intercept or Michaelis Menten initial growth */ +CR_b 0.4445 /* CR log slope or Michaelis Menten asymptotic CR */ CD_a 0.0 /* CD intercept (absolute value) */ CD_b 0.2 /* CD slope (as fraction of tree height) */ CD0 0.3 /* initial crown depth(in m) */ @@ -52,8 +52,8 @@ leafdem_resolution 1 /* resolution of leaf demography model */ p_tfsecondary 1.0 /* probability of secondary treefall */ hurt_decay 0 /* parameter determining how tree damages are repaired */ crown_gap_fraction 0.15 /* fraction of gaps in the crown */ -m 0.025 /* minimal death rate */ -m1 0.025 /* m1 (slope of death rate) */ +m 0.045 /* minimal death rate */ +m1 0.045 /* m1 (slope of death rate) */ Cair 375 /* atmospheric CO2 concentration in micromol/mol */ PRESS 101.0 /* atmospheric pressure in kPa _SOIL_LAYER_WEIGHT 2 /* soil layer weights: relative biomass, conductance, max transpiration (0,1, 2) */ @@ -62,7 +62,7 @@ _LL_parameterization 0 /* LL parameterizations: empirical, Kikuzawa model, and K _LA_regulation 2 /* dynamic LA regulation: off, 1.0, 0.75, or 0.5 (0,1,2,3) */ _sapwood 1 /* sapwood parameterizations: constant thickness (0.04), Fyllas percentage, Fyllas lower limit (0,1,2) */ _seedsadditional 0 /* excess biomass into seeds after maturation (0,1) */ -_NONRANDOM 0 /* If _NONRANDOM == 1, the seeds for the random number generators will be kept fixed at 1, default for bug fixing */ +_NONRANDOM 1 /* If _NONRANDOM == 1, the seeds for the random number generators will be kept fixed at 1, default for bug fixing */ _GPPcrown 0 /* This defines an option to compute only GPP from the topmost value of PPFD and GPP, instead of looping within the crown. */ _BASICTREEFALL 1 /* if defined: treefall is a source of tree death */ _SEEDTRADEOFF 0 /* if defined: the number of seeds produced is determined by NPP allocated to reproduction and seed mass, otherwise the number of seeds is fixed */