Skip to content

Commit

Permalink
rcontroll 0.2.0.9021:
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
sylvainschmitt committed Jul 26, 2024
1 parent f250ab6 commit 3041446
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions R/generate_dailyvar.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
10 changes: 5 additions & 5 deletions R/generate_parameters.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions inst/extdata/TROLLv4_input.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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) */
Expand Down Expand Up @@ -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) */
Expand All @@ -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 */
Expand Down

0 comments on commit 3041446

Please sign in to comment.