Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #163 #174

Merged
merged 5 commits into from
Jul 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 26 additions & 36 deletions src/Root_properties.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,27 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% REFERENCES
DanyangYu marked this conversation as resolved.
Show resolved Hide resolved
function [Rl] = Root_properties(Rl, Ac, rroot, frac, bbx, KT)
%%% INPUTS
global DeltZ sfactor LAI_msr
% BR = 10:1:650; %% [gC /m^2 PFT]
% rroot = 0.5*1e-3 ; % 3.3*1e-4 ;%% [0.5-6 *10^-3] [m] root radius
%%% OUTPUTS
if KT < 2880
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;
end
else
fr = 0.001;
end
% if KT<3840
% fr=-0.091*LAI(KT)+0.40;
% else
% fr=0.001;
% end
% elseif KT<3200
% fr=0.05;
% else
% fr=0.02;
% end
%{
This function is used to calculate the dynamic growth of root
This part can refer to Wang et al. (2021) "Intergrated modelling of photosynthesis and transfer of energy, mass, and momentum in the SPAC system"
%}

function [Rl] = Root_properties(Rl, Ac, rroot, frac, bbx, KT, DeltZ, sfactor, LAI_msr)
%INPUTS
%global DeltZ sfactor LAI_msr
DanyangYu marked this conversation as resolved.
Show resolved Hide resolved
DanyangYu marked this conversation as resolved.
Show resolved Hide resolved

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
if (~isnan(Ac)) || (Ac > 0)
Rl = Rl .* DeltZ0;
Delta_Rltot = BR / R_C / root_den / (pi * (rroot^2)); %% %% root length index [m root / m^2 PFT]
% for i=1:nn
% if Rl(i)>50000
% frac(i)=0;
% end
% end
if ~isnan(frac)
frac = frac / sum(sum(frac));
else
Expand All @@ -48,11 +32,17 @@
Delta_Rl = frac .* bbx * Delta_Rltot;
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
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;
end
else
fr = 0.001;
end
% for i=1:nn
% if Rl(i)>50000
% Rl(i)=50000;
% end
% end
end
10 changes: 5 additions & 5 deletions src/ebal.m
Original file line number Diff line number Diff line change
Expand Up @@ -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(Actot,rroot);
%%%%%%%%%%%%%%%%%%% 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;
DanyangYu marked this conversation as resolved.
Show resolved Hide resolved
% sum of soil fluxes and average temperature
% (note that averaging temperature is physically not correct...)
Rnstot = Fs * Rns; % Net radiation soil
Expand Down