From d6ff8444ce56431c27817d55c11354acd5e874aa Mon Sep 17 00:00:00 2001 From: Yunfei-Wang1993 Date: Wed, 24 May 2023 14:48:49 +0200 Subject: [PATCH 1/2] fix function path --- src/+init/updateSoilVariables.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/+init/updateSoilVariables.m b/src/+init/updateSoilVariables.m index 24706aa5..91e3fa94 100644 --- a/src/+init/updateSoilVariables.m +++ b/src/+init/updateSoilVariables.m @@ -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 From bf3bde2c343ab305938fb2171661095d0ccd30f7 Mon Sep 17 00:00:00 2001 From: Yunfei-Wang1993 Date: Wed, 24 May 2023 14:49:33 +0200 Subject: [PATCH 2/2] Moving equations to the right folder --- src/+equations/calcLambda.m | 14 ++++++++++++++ src/+equations/calcPhi_s.m | 15 +++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/+equations/calcLambda.m create mode 100644 src/+equations/calcPhi_s.m diff --git a/src/+equations/calcLambda.m b/src/+equations/calcLambda.m new file mode 100644 index 00000000..c07c0d54 --- /dev/null +++ b/src/+equations/calcLambda.m @@ -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 diff --git a/src/+equations/calcPhi_s.m b/src/+equations/calcPhi_s.m new file mode 100644 index 00000000..8ea67972 --- /dev/null +++ b/src/+equations/calcPhi_s.m @@ -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