diff --git a/src/Root_properties.m b/src/Root_properties.m index d2659866..2dbf3834 100644 --- a/src/Root_properties.m +++ b/src/Root_properties.m @@ -9,15 +9,15 @@ %} function [Rl] = Root_properties(Rl, Ac, rroot, frac, bbx, KT, DeltZ, sfactor, LAI_msr) -% %%% INPUTS -% global DeltZ sfactor LAI_msr + %INPUTS + %global DeltZ sfactor LAI_msr fr = calculateRootfraction(KT); DeltZ0 = DeltZ' / 100; BR = Ac * fr * 1800 * 12 / 1000000; - root_den = 250 * 1000; %% [gDM / m^3] Root density Jackson et al., 1997 - R_C = 0.488; %% [gC/gDM] Ratio Carbon-Dry Matter in root Jackson et al., 1997 + root_den = 250 * 1000; % [gDM / m^3] Root density Jackson et al., 1997 + R_C = 0.488; % [gC/gDM] Ratio Carbon-Dry Matter in root Jackson et al., 1997 nn = numel(Rl); % This is used to simulate the root growth @@ -33,12 +33,11 @@ Rl = Rl + Delta_Rl; Rl = Rl ./ DeltZ0; end - end function fr = calculateRootfraction(KT) % this function is used to calculate the root fraction - if KT < 2880 %2880 means the time step when the root stops growing + if KT < 2880 % 2880 means the time step when the root stops growing fr = 0.3 * 3 * exp(-0.15 * LAI_msr(KT)) / (exp(-0.15 * LAI_msr(KT)) + 2 * sfactor); if fr < 0.15 fr = 0.15; diff --git a/src/ebal.m b/src/ebal.m index e1e5cf48..eb0eb33c 100644 --- a/src/ebal.m +++ b/src/ebal.m @@ -461,11 +461,11 @@ Rntot_PAR = LAI * (Fc * Rnh_PAR + equations.meanleaf(canopy, Rnu_PAR, 'angles_and_layers', Ps)); % net PAR leaves aPAR_Cab_eta = LAI * (Fc * (profiles.etah .* Rnh_PAR) + equations.meanleaf(canopy, profiles.etau .* Rnu_PAR, 'angles_and_layers', Ps)); % ... green ePAR * relative fluorescence emission efficiency - %%%%%%%%%%%%%%%%%%% [Delta_Rltot] = Root_properties(Rl, Ac, rroot, frac, bbx, KT, DeltZ, sfactor, LAI_msr); - %%%%%%%%%%%%%%%%%%% Delta_Rl = fc*Delta_Rltot; - %%%%%%%%%%%%%%%%%%% Rl = Rl + Delta_Rl; - %%%%%%%%%%%%%%%%%%% Rltot = sum(sum(Rl)); - %%%%%%%%%%%%%%%%%%% fc = Rl./Rltot; + % [Delta_Rltot] = Root_properties(Rl, Ac, rroot, frac, bbx, KT, DeltZ, sfactor, LAI_msr); + % Delta_Rl = fc*Delta_Rltot; + % Rl = Rl + Delta_Rl; + % Rltot = sum(sum(Rl)); + % fc = Rl./Rltot; % sum of soil fluxes and average temperature % (note that averaging temperature is physically not correct...) Rnstot = Fs * Rns; % Net radiation soil