Skip to content

Commit

Permalink
Update loadForcingData.m
Browse files Browse the repository at this point in the history
  • Loading branch information
MostafaGomaa93 authored Jun 19, 2024
1 parent 2e03ece commit 8136430
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/+io/loadForcingData.m
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@
wat_Dep = Tot_Depth / 100; % (m)
fover = 0.5; % decay factor (fixed to 0.5 m-1)
fmax = SoilProperties.fmax; % potential maximum value of fsat
fsat = (fmax .* exp(-0.5 * fover * wat_Dep)); % fraction of saturated area (unitless), note: the division by 100 is a unit conversion from 'cm' to 'm'
fsat = (fmax .* exp(-0.5 * fover * wat_Dep)); % fraction of saturated area (unitless)
ForcingData.R_Dunn = Precip_msr .* fsat; % Dunnian runoff (saturation excess runoff, in c/sec)
Precip_msr = Precip_msr .* (1 - fsat); % applied infiltration after removing Dunnian runoff

else % Groundwater Coupling is activated
else % Groundwater coupling is activated
% Different approach (not CLM). Dunnian runoff = Direct water input from precipitation + return flow
% (a) direct water input from precipitation when soil is fully saturated (depth to water table = 0)
wat_Dep = GroundwaterSettings.gw_Dep / 100; % (m);
Expand All @@ -44,11 +44,12 @@
else
ForcingData.R_Dunn = zeros(size(Precip_msr));
end
% (b) Return flow (from groundwater exfiltration) is added to the Dunnian runoff (through BMI)
% (b) Return flow (from groundwater exfiltration) calculated in MODFLOW and added to the Dunnian runoff (through BMI)
end

% (2) Infiltration excess runoff (Hortonian runoff)

ForcingData.R_Hort = zeros(size(Precip_msr)); % will be updated in the +soilmoisture/calculateBoundaryConditions file

% replace negative values
for jj = 1:Dur_tot
if ForcingData.Ta_msr(jj) < -100
Expand All @@ -60,7 +61,6 @@
ForcingData.Tmin = min(ForcingData.Ta_msr);
ForcingData.Precip_msr = Precip_msr;
% Applied infiltration (= precipitation after removal of Dunnian runoff)
ForcingData.applied_inf = Precip_msr; % later will be updated in the +soilmoisture/calculateBoundaryConditions file
ForcingData.R_Hort = zeros(size(Precip_msr)); % will be updated in the +soilmoisture/calculateBoundaryConditions file
% Applied infiltration will be updated again in the +soilmoisture/calculateBoundaryConditions file after removal of Hortonian runoff
ForcingData.applied_inf = Precip_msr; % later will be updated in the ....
% +soilmoisture/calculateBoundaryConditions after removal of Hortonian runoff
end

0 comments on commit 8136430

Please sign in to comment.