Skip to content

Commit

Permalink
correction sunlit fraction
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcaceres committed Mar 19, 2024
1 parent 4ab096c commit c991184
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lightextinction_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ NumericVector layerSunlitFraction(NumericMatrix LAIme, NumericMatrix LAImd,
double s2=0.0;
for(int j = 0;j<ncoh;j++) {
s1 += kb[j]*ClumpingIndex[j]*(LAIme(i,j)+LAImd(i,j));
s2 += kb[j]*ClumpingIndex[j]*(LAIme(i,j)+LAImd(i,j));
s2 += kb[j]*ClumpingIndex[j]*0.5*(LAIme(i,j)+LAImd(i,j));
}
fSL[i] = exp(-1.0*s1)*exp(-1.0*s2);
}
Expand Down
8 changes: 5 additions & 3 deletions vignettes/evaluation/StandLevelEvaluation.Rmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Model evaluation in experimental plots"
author: "Miquel De Cáceres (CREAF), Víctor Granda (CREAF), Rafael Poyatos (CREAF), Teresa Gimeno (CREAF), Nicolas Martin-StPaul (INRAE), Antoine Cabon (WSL)"
author: "Miquel De Cáceres (CREAF), Víctor Granda (CREAF), Rafael Poyatos (CREAF), Teresa Gimeno (CREAF), Nicolas Martin-StPaul (INRAE), Antoine Cabon (WSL), Vincenzo Saponaro (U. Tuscia)"
date: "`r Sys.Date()`"
output:
rmarkdown::html_document:
Expand All @@ -13,17 +13,19 @@ output:
```{r setup, include=FALSE}
params = list(wd='/home/miquel/OneDrive/mcaceres_work/model_development/medfate_development/StandLevelEvaluation/',
model='spwb',
# names = c("Font-Blanche"),
# codes = c("FONBLA"),
# names = c("Collelongo"),
# codes = c("COLLELONGO"),
names=c("Wombat","Euc-FACE",
"Puéchabon", "Hesse","Fontainebleau-Barbeau", "Font-Blanche",
"Collelongo",
"Yatir",
"Mitra",
"Rinconada", "Vallcebre (Barrol)", "Vallcebre (Sort)", "Prades", "Can Balasc", "Alto-Tajo Armallones", "Ronda",
"Davos Seehornwald",
"Morgan-Monroe", "Sevilleta"),
codes=c("WOMBAT", "EUCFACE",
"FRAPUE", "FRAHES", "FONTAINEBLEAU","FONBLA",
"COLLELONGO",
"ISRYAT",
"MITRA",
"ESPRIN", "QVALLCEBRE", "PVALLCEBRE", "PRADES", "CANBALASC", "ESPALTARM", "RONDA",
Expand Down
2 changes: 1 addition & 1 deletion vignettes/evaluation/_Stand_Evaluation_child.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ eval_SWC <- "SWC" %in% names(df_site$SiteData[[1]]$measuredData)

<!-- Plant transpiration -->
```{r, echo=FALSE, results='asis', warning = FALSE, message=FALSE}
eval_Eplant <- TRUE
eval_Eplant <- any(startsWith(names(df_site$SiteData[[1]]$measuredData),"E_"))
if(eval_Eplant) {
res <- knitr::knit_child(file.path(this_path,'_Eplant_Evaluation_child.Rmd'), quiet = TRUE)
cat(res, sep = '\n')
Expand Down
2 changes: 1 addition & 1 deletion vignettes/runmodels/AdvancedWaterEnergyBalance.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Apart from data inputs, the behaviour of simulation models is controlled using a
control <- defaultControl("Sperry")
```

To use the advanced water balance model we must change the values of `transpirationMode` to switch from `"Granier"` to either `"Sperry"` or `"Cochard"`.
To use the advanced water balance model we must change the values of `transpirationMode` to switch from `"Granier"` to either `"Sperry"` or `"Sureau"`.

### Water balance input object
A last object is needed before calling simulation functions, called `spwbInput`. It consists in the compilation of aboveground, belowground parameters and the specification of additional parameter values for each plant cohort. This is done by calling function `forest2spwbInput()`:
Expand Down

0 comments on commit c991184

Please sign in to comment.