Skip to content

Commit

Permalink
after merging with devel
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcaceres committed Nov 12, 2024
2 parents f199b70 + 796f652 commit a664be5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/inner_sperry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ List initSperryNetwork(int c,
DataFrame internalWater, DataFrame paramsTranspiration, DataFrame paramsWaterStorage,
NumericVector VCroot_kmax, NumericVector VGrhizo_kmax,
NumericVector psiSoil, NumericVector VG_n, NumericVector VG_alpha,
double sapFluidityDay = 1.0, List control = NULL) {
List control,
double sapFluidityDay = 1.0) {

NumericVector VCstem_kmax = Rcpp::as<Rcpp::NumericVector>(paramsTranspiration["VCstem_kmax"]);
NumericVector VCleaf_kmax = Rcpp::as<Rcpp::NumericVector>(paramsTranspiration["VCleaf_kmax"]);
Expand Down Expand Up @@ -73,8 +74,8 @@ List initSperryNetworks(List x) {
networks[c] = initSperryNetwork(c,
internalWater, paramsTranspiration, paramsWaterStorage,
VCroot_kmax(c,_), VGrhizo_kmax(c,_),
psiSoil, VG_n, VG_alpha, 1.0,
control);
psiSoil, VG_n, VG_alpha,
control, 1.0);
}
networks.attr("names") = above.attr("row.names");
return(networks);
Expand Down
2 changes: 1 addition & 1 deletion src/inner_sperry.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ List initSperryNetwork(int c,
DataFrame internalWater, DataFrame paramsTranspiration, DataFrame paramsWaterStorage,
NumericVector VCroot_kmax, NumericVector VGrhizo_kmax,
NumericVector psiSoil, NumericVector VG_n, NumericVector VG_alpha,
double sapFluidityDay = 1.0, List control = NULL);
List control, double sapFluidityDay = 1.0);

List profitMaximization2(List supplyFunction, int initialPos,
double Catm, double Patm, double Tair, double vpa, double u,
Expand Down
6 changes: 4 additions & 2 deletions src/transpiration_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,8 @@ void transpirationAdvanced(List transpOutput, List x, NumericVector meteovec,
internalWater, paramsTranspiration, paramsWaterStorage,
VCroot_kmaxc, VGrhizo_kmaxc,
psic, VG_nc, VG_alphac,
control, sapFluidityDay);
control,
sapFluidityDay);
hydraulicNetwork[c] = HN;
supply[c] = supplyFunctionNetwork(HN, 0.0, 0.001);
} else if(transpirationMode == "Sureau") {
Expand Down Expand Up @@ -696,7 +697,8 @@ void transpirationAdvanced(List transpOutput, List x, NumericVector meteovec,
internalWater, paramsTranspiration, paramsWaterStorage,
VCroot_kmaxc, VGrhizo_kmaxc,
psic, VG_nc, VG_alphac,
control, sapFluidityDay);
control,
sapFluidityDay);
hydraulicNetwork[c] = HN;
supply[c] = supplyFunctionNetwork(HN, 0.0, 0.001);
} else if(transpirationMode == "Sureau") {
Expand Down

0 comments on commit a664be5

Please sign in to comment.