Skip to content

Commit

Permalink
maximum temperature change
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcaceres committed May 31, 2024
1 parent 6af83a5 commit b51ce9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transpiration_advanced.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1040,7 +1040,7 @@ List transpirationAdvanced(List x, NumericVector meteovec,

//Soil temperature changes
NumericVector soilTchange = temperatureChange(widths, Tsoil, sand, clay, Ws, Theta_SAT, Theta_FC, Ebalsoil[n], tstep);
for(int l=0;l<nlayers;l++) Tsoil[l] = Tsoil[l] + soilTchange[l];
for(int l=0;l<nlayers;l++) Tsoil[l] = Tsoil[l] + std::max(-3.0, std::min(3.0, soilTchange[l]));
if(n<(ntimesteps-1)) Tsoil_mat(n+1,_)= Tsoil;

} else { //Multilayer canopy balance
Expand Down

0 comments on commit b51ce9b

Please sign in to comment.