Skip to content

Commit

Permalink
Merge pull request #171 from EcoExtreML/move_equation
Browse files Browse the repository at this point in the history
Move equations to right folder
  • Loading branch information
Yunfei-Wang1993 authored May 24, 2023
2 parents 783d500 + bf3bde2 commit 6ff53c1
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 2 deletions.
14 changes: 14 additions & 0 deletions src/+equations/calcLambda.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
function calcLambda(VPER, POR, Lamda_soc, XSOC)
%{
Calculate soil hydraulic properties according to equation 6c in
Zheng, D., van der Velde, R., Su, Z., Wang, X., Wen, J., Booij, M. J.,
Hoekstra, A. Y., and Chen, Y.: Augmentations to the Noah model physics
for application to the Yellow River source area. Part I: Soil water
flow, Journal of Hydrometeorology, 16, 2659-2676,
https://doi.org/10.1175/JHM-D-14-0198.1, 2015
%}

Lamda = (2.91 + 0.159 * VPER / (1 - POR) * 100);
Lamda = 1 / (Lamda * (1 - XSOC) + XSOC * Lamda_soc);
end
15 changes: 15 additions & 0 deletions src/+equations/calcPhi_s.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
function Phi_s = calcPhi_s(VPER, POR, Phi_soc, XSOC)
%{
Calculate soil hydraulic properties according to equation 6b in
Zheng, D., van der Velde, R., Su, Z., Wang, X., Wen, J., Booij, M. J.,
Hoekstra, A. Y., and Chen, Y.: Augmentations to the Noah model physics
for application to the Yellow River source area. Part I: Soil water
flow, Journal of Hydrometeorology, 16, 2659-2676,
https://doi.org/10.1175/JHM-D-14-0198.1, 2015
%}

Phi_s = -0.01 * 10^(1.88 - 0.0131 * VPER / (1 - POR) * 100);
Phi_s = (Phi_s * (1 - XSOC) + XSOC * Phi_soc) * 100;

end
4 changes: 2 additions & 2 deletions src/+init/updateSoilVariables.m
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
SoilVariables.Lamda(i) = SoilProperties.Coef_Lamda(j);
else
VanGenuchten.Theta_s(i) = 0.489 - 0.00126 * SoilVariables.VPER(i, 1) / (1 - SoilVariables.POR(i)) * 100;
SoilVariables.Phi_s(i) = init.calcPhi_s(SoilVariables.VPER(i, 1), SoilVariables.POR, SoilConstants.Phi_soc, SoilVariables.XSOC);
SoilVariables.Lamda(i) = init.calcLambda(SoilVariables.VPER(i, 3), SoilVariables.POR, SoilVariables.Lamda_soc, SoilVariables.XSOC);
SoilVariables.Phi_s(i) = equations.calcPhi_s(SoilVariables.VPER(i, 1), SoilVariables.POR, SoilConstants.Phi_soc, SoilVariables.XSOC);
SoilVariables.Lamda(i) = equations.calcLambda(SoilVariables.VPER(i, 3), SoilVariables.POR, SoilVariables.Lamda_soc, SoilVariables.XSOC);
end
SoilVariables.XWILT(i) = VanGenuchten.Theta_s(i) * ((-1.5e4) / SoilVariables.Phi_s(i))^(-1 * SoilVariables.Lamda(i));
end

0 comments on commit 6ff53c1

Please sign in to comment.