Skip to content

Commit 8d3ef75

Browse files
Merge pull request #273 from EcoExtreML/add_Trap_to_BMI
Redefine Evap and Trap arrays
2 parents 0f267e0 + b97137c commit 8d3ef75

13 files changed

Lines changed: 126 additions & 107 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ The 1.6.1 release comes with minor changes as:
1515
**Fixed:**
1616
- The bug in the calculation of the soil type index discussed in
1717
[#252](https://github.com/EcoExtreML/STEMMUS_SCOPE/issues/252)
18+
- The EVAP is removed discussed in [#274](https://github.com/EcoExtreML/STEMMUS_SCOPE/issues/274) and fixed in [#273](https://github.com/EcoExtreML/STEMMUS_SCOPE/pull/273)
19+
- The shape of Evap variable is changed to match BMI requirements discussed in [#274](https://github.com/EcoExtreML/STEMMUS_SCOPE/issues/274) and fixed in [#273](https://github.com/EcoExtreML/STEMMUS_SCOPE/pull/273)
1820

1921
**Added:**
2022
- The recharge index is exposed to BMI in [#257](https://github.com/EcoExtreML/STEMMUS_SCOPE/pull/257)
23+
- The Trap variable (after changing its shape) is exposed to BMI discussed in [#271](https://github.com/EcoExtreML/STEMMUS_SCOPE/issues/271) and added in [#273](https://github.com/EcoExtreML/STEMMUS_SCOPE/pull/273)
24+
- The FullCSVfiles option is added in [#273](https://github.com/EcoExtreML/STEMMUS_SCOPE/pull/273)
2125

2226

2327
<a name="1.6.0"></a>

docs/getting_started.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,13 @@ EndTime=2001-01-02T00:00
7676
InputPath=/path_to_model_input_folder/
7777
OutputPath=/path_to_model_output_folder/
7878
```
79+
The configuration file could also contain the optional key `FullCSVfiles`. If
80+
`FullCSVfiles=0`, the model will **not** store some **large** binary files in
81+
csv format. The default value is `FullCSVfiles=1`. To know which files are
82+
stored in csv format, see the function `bin_to_csv()` in `src/+io` folder.
83+
```text
84+
FullCSVfiles=0
85+
```
7986

8087
See example configuration files below:
8188

24 KB
Binary file not shown.

src/+energy/calculateBoundaryConditions.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function [RHS, EnergyMatrices] = calculateBoundaryConditions(BoundaryCondition, EnergyMatrices, HBoundaryFlux, ForcingData, SoilVariables, ...
2-
Precip, EVAP, Delt_t, r_a_SOIL, Rn_SOIL, RHS, L, KT, ModelSettings, GroundwaterSettings)
2+
Precip, Evap, Delt_t, r_a_SOIL, Rn_SOIL, RHS, L, KT, ModelSettings, GroundwaterSettings)
33
%{
44
Determine the boundary condition for solving the energy equation, see
55
STEMMUS Technical Notes.
@@ -46,6 +46,6 @@
4646
else
4747
L_ts = L(n);
4848
SH = 0.1200 * Constants.c_a * (SoilVariables.T(n) - ForcingData.Ta_msr(KT)) / r_a_SOIL(KT);
49-
RHS(n) = RHS(n) + 100 * Rn_SOIL(KT) / 1800 - Constants.RHOL * L_ts * EVAP(KT) - SH + Constants.RHOL * Constants.c_L * (ForcingData.Ta_msr(KT) * Precip(KT) + BoundaryCondition.DSTOR0 * SoilVariables.T(n) / Delt_t); % J cm-2 s-1
49+
RHS(n) = RHS(n) + 100 * Rn_SOIL(KT) / 1800 - Constants.RHOL * L_ts * Evap - SH + Constants.RHOL * Constants.c_L * (ForcingData.Ta_msr(KT) * Precip(KT) + BoundaryCondition.DSTOR0 * SoilVariables.T(n) / Delt_t); % J cm-2 s-1
5050
end
5151
end

src/+init/defineInitialValues.m

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,7 @@
178178

179179
%% Structure 5: variables with zeros(Nmsrmn / 10, 1)
180180
fields = {
181-
'Tp_t', 'Evap', 'Tbtm', 'r_a_SOIL', 'Rn_SOIL', 'EVAP', ...
182-
'PSItot', 'sfactortot', 'Tsur'
181+
'Tbtm', 'r_a_SOIL', 'Rn_SOIL', 'PSItot', 'sfactortot', 'Tsur'
183182
};
184183
structures{5} = helpers.createStructure(zeros(Dur_tot, 1), fields);
185184

src/+io/bin_to_csv.m

Lines changed: 77 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function bin_to_csv(fnames, n_col, ns, options, SoilLayer, GroundwaterSettings)
1+
function bin_to_csv(fnames, n_col, ns, options, SoilLayer, GroundwaterSettings, FullCSVfiles)
22
%% flu
33
flu_names = {'simulation_number', 'nu_iterations', 'year', 'DoY', ...
44
'Rntot', 'lEtot', 'Htot', ...
@@ -91,60 +91,6 @@ function bin_to_csv(fnames, n_col, ns, options, SoilLayer, GroundwaterSettings)
9191
Sim_qtot_units = repelem({'cm s-1'}, length(depth));
9292
write_output(Sim_qtot_names, Sim_qtot_units, fnames.Sim_qtot_file, n_col.Sim_qtot, ns, true);
9393

94-
%% Spectrum (added on 19 September 2008)
95-
spectrum_hemis_optical_names = {'hemispherically integrated radiation spectrum'};
96-
spectrum_hemis_optical_units = {'W m-2 um-1'};
97-
write_output(spectrum_hemis_optical_names, spectrum_hemis_optical_units, fnames.spectrum_hemis_optical_file, n_col.spectrum_hemis_optical, ns, true);
98-
99-
spectrum_obsdir_optical_names = {'radiance spectrum in observation direction'};
100-
spectrum_obsdir_optical_units = {'W m-2 sr-1 um-1'};
101-
write_output(spectrum_obsdir_optical_names, spectrum_obsdir_optical_units, fnames.spectrum_obsdir_optical_file, n_col.spectrum_obsdir_optical, ns, true);
102-
103-
if options.calc_ebal
104-
write_output({'thermal BlackBody emission spectrum in observation direction'}, {'W m-2 sr-1 um-1'}, ...
105-
fnames.spectrum_obsdir_BlackBody_file, n_col.spectrum_obsdir_BlackBody, ns, true);
106-
if options.calc_planck
107-
write_output({'thermal emission spectrum in hemispherical direction'}, {'W m-2 sr-1 um-1'}, ...
108-
fnames.spectrum_hemis_thermal_file, n_col.spectrum_hemis_thermal, ns, true);
109-
write_output({'thermal emission spectrum in observation direction'}, {'W m-2 sr-1 um-1'}, ...
110-
fnames.spectrum_obsdir_thermal_file, n_col.spectrum_obsdir_thermal, ns, true);
111-
end
112-
end
113-
write_output({'irradiance'}, {'W m-2 um-1'}, ...
114-
fnames.irradiance_spectra_file, n_col.irradiance_spectra, ns, true);
115-
write_output({'reflectance'}, {'fraction of radiation in observation direction *pi / irradiance'}, ...
116-
fnames.reflectance_file, n_col.reflectance, ns, true);
117-
%% input and parameter values (added June 2012)
118-
% write_output(fnames.pars_and_input_file, true)
119-
% write_output(fnames.pars_and_input_short_file, true)
120-
%% Optional Output
121-
if options.calc_vert_profiles
122-
write_output({'Fraction leaves in the sun, fraction of observed, fraction of observed&visible per layer'}, {'rows: simulations or time steps, columns: layer numbers'}, ...
123-
fnames.gap_file, n_col.gap, ns, true);
124-
write_output({'aPAR per leaf layer'}, {'umol m-2 s-1'}, ...
125-
fnames.layer_aPAR_file, n_col.layer_aPAR, ns, true);
126-
write_output({'aPAR by Cab per leaf layer'}, {'umol m-2 s-1'}, ...
127-
fnames.layer_aPAR_Cab_file, n_col.layer_aPAR_Cab, ns, true);
128-
if options.calc_ebal
129-
write_output({'leaf temperature of sunlit leaves, shaded leaves, and weighted average leaf temperature per layer'}, {'^oC ^oC ^oC'}, ...
130-
fnames.leaftemp_file, n_col.leaftemp, ns, true);
131-
write_output({'sensible heat flux per layer'}, {'W m-2'}, ...
132-
fnames.layer_H_file, n_col.layer_H, ns, true);
133-
write_output({'latent heat flux per layer'}, {'W m-2'}, ...
134-
fnames.layer_LE_file, n_col.layer_LE, ns, true);
135-
write_output({'photosynthesis per layer'}, {'umol m-2 s-1'}, ...
136-
fnames.layer_A_file, n_col.layer_A, ns, true);
137-
write_output({'average NPQ = 1-(fm-fo)/(fm0-fo0), per layer'}, {''}, ...
138-
fnames.layer_NPQ_file, n_col.layer_NPQ, ns, true);
139-
write_output({'net radiation per leaf layer'}, {'W m-2'}, ...
140-
fnames.layer_Rn_file, n_col.layer_Rn, ns, true);
141-
end
142-
if options.calc_fluor
143-
fluorescence_names = {'supward fluorescence per layer'};
144-
fluorescence_units = {'W m-2'};
145-
write_output(fluorescence_names, fluorescence_units, fnames.layer_fluorescence_file, n_col.layer_fluorescence, ns, true);
146-
end
147-
end
14894
if options.calc_fluor
14995
write_output({'fluorescence per simulation for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
15096
fnames.fluorescence_file, n_col.fluorescence, ns, true);
@@ -154,21 +100,83 @@ function bin_to_csv(fnames, n_col, ns, options, SoilLayer, GroundwaterSettings)
154100
write_output({'fluorescence per simulation for wavelengths of 640 to 850 nm, with 1 nm resolution, for PSII only'}, {'W m-2 um-1 sr-1'}, ...
155101
fnames.fluorescencePSII_file, n_col.fluorescencePSII, ns, true);
156102
end
157-
write_output({'hemispherically integrated fluorescence per simulation for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
158-
fnames.fluorescence_hemis_file, n_col.fluorescence_hemis, ns, true);
159-
write_output({'total emitted fluorescence by all leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
160-
fnames.fluorescence_emitted_by_all_leaves_file, n_col.fluorescence_emitted_by_all_leaves, ns, true);
161-
write_output({'total emitted fluorescence by all photosystems for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
162-
fnames.fluorescence_emitted_by_all_photosystems_file, n_col.fluorescence_emitted_by_all_photosystems, ns, true);
163-
write_output({'TOC fluorescence contribution from sunlit leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
164-
fnames.fluorescence_sunlit_file, n_col.fluorescence_sunlit, ns, true);
165-
write_output({'TOC fluorescence contribution from shaded leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
166-
fnames.fluorescence_shaded_file, n_col.fluorescence_shaded, ns, true);
167-
write_output({'TOC fluorescence contribution from from leaves and soil after scattering for wavelenghts of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
168-
fnames.fluorescence_scattered_file, n_col.fluorescence_scattered, ns, true);
169103
end
170-
write_output({'Bottom of canopy irradiance in the shaded fraction, and average BOC irradiance'}, {'First 2162 columns: shaded fraction. Last 2162 columns: average BOC irradiance. Unit: Wm-2 um-1'}, ...
171-
fnames.BOC_irradiance_file, n_col.BOC_irradiance, ns, true);
104+
105+
% Optional for large output files
106+
if FullCSVfiles
107+
%% Spectrum (added on 19 September 2008)
108+
spectrum_hemis_optical_names = {'hemispherically integrated radiation spectrum'};
109+
spectrum_hemis_optical_units = {'W m-2 um-1'};
110+
write_output(spectrum_hemis_optical_names, spectrum_hemis_optical_units, fnames.spectrum_hemis_optical_file, n_col.spectrum_hemis_optical, ns, true);
111+
112+
spectrum_obsdir_optical_names = {'radiance spectrum in observation direction'};
113+
spectrum_obsdir_optical_units = {'W m-2 sr-1 um-1'};
114+
write_output(spectrum_obsdir_optical_names, spectrum_obsdir_optical_units, fnames.spectrum_obsdir_optical_file, n_col.spectrum_obsdir_optical, ns, true);
115+
116+
if options.calc_ebal
117+
write_output({'thermal BlackBody emission spectrum in observation direction'}, {'W m-2 sr-1 um-1'}, ...
118+
fnames.spectrum_obsdir_BlackBody_file, n_col.spectrum_obsdir_BlackBody, ns, true);
119+
if options.calc_planck
120+
write_output({'thermal emission spectrum in hemispherical direction'}, {'W m-2 sr-1 um-1'}, ...
121+
fnames.spectrum_hemis_thermal_file, n_col.spectrum_hemis_thermal, ns, true);
122+
write_output({'thermal emission spectrum in observation direction'}, {'W m-2 sr-1 um-1'}, ...
123+
fnames.spectrum_obsdir_thermal_file, n_col.spectrum_obsdir_thermal, ns, true);
124+
end
125+
end
126+
write_output({'irradiance'}, {'W m-2 um-1'}, ...
127+
fnames.irradiance_spectra_file, n_col.irradiance_spectra, ns, true);
128+
write_output({'reflectance'}, {'fraction of radiation in observation direction *pi / irradiance'}, ...
129+
fnames.reflectance_file, n_col.reflectance, ns, true);
130+
131+
%% input and parameter values (added June 2012)
132+
% write_output(fnames.pars_and_input_file, true)
133+
% write_output(fnames.pars_and_input_short_file, true)
134+
135+
%% Optional Output
136+
if options.calc_vert_profiles
137+
write_output({'Fraction leaves in the sun, fraction of observed, fraction of observed&visible per layer'}, {'rows: simulations or time steps, columns: layer numbers'}, ...
138+
fnames.gap_file, n_col.gap, ns, true);
139+
write_output({'aPAR per leaf layer'}, {'umol m-2 s-1'}, ...
140+
fnames.layer_aPAR_file, n_col.layer_aPAR, ns, true);
141+
write_output({'aPAR by Cab per leaf layer'}, {'umol m-2 s-1'}, ...
142+
fnames.layer_aPAR_Cab_file, n_col.layer_aPAR_Cab, ns, true);
143+
if options.calc_ebal
144+
write_output({'leaf temperature of sunlit leaves, shaded leaves, and weighted average leaf temperature per layer'}, {'^oC ^oC ^oC'}, ...
145+
fnames.leaftemp_file, n_col.leaftemp, ns, true);
146+
write_output({'sensible heat flux per layer'}, {'W m-2'}, ...
147+
fnames.layer_H_file, n_col.layer_H, ns, true);
148+
write_output({'latent heat flux per layer'}, {'W m-2'}, ...
149+
fnames.layer_LE_file, n_col.layer_LE, ns, true);
150+
write_output({'photosynthesis per layer'}, {'umol m-2 s-1'}, ...
151+
fnames.layer_A_file, n_col.layer_A, ns, true);
152+
write_output({'average NPQ = 1-(fm-fo)/(fm0-fo0), per layer'}, {''}, ...
153+
fnames.layer_NPQ_file, n_col.layer_NPQ, ns, true);
154+
write_output({'net radiation per leaf layer'}, {'W m-2'}, ...
155+
fnames.layer_Rn_file, n_col.layer_Rn, ns, true);
156+
end
157+
if options.calc_fluor
158+
fluorescence_names = {'supward fluorescence per layer'};
159+
fluorescence_units = {'W m-2'};
160+
write_output(fluorescence_names, fluorescence_units, fnames.layer_fluorescence_file, n_col.layer_fluorescence, ns, true);
161+
end
162+
end
163+
if options.calc_fluor
164+
write_output({'hemispherically integrated fluorescence per simulation for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
165+
fnames.fluorescence_hemis_file, n_col.fluorescence_hemis, ns, true);
166+
write_output({'total emitted fluorescence by all leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
167+
fnames.fluorescence_emitted_by_all_leaves_file, n_col.fluorescence_emitted_by_all_leaves, ns, true);
168+
write_output({'total emitted fluorescence by all photosystems for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1'}, ...
169+
fnames.fluorescence_emitted_by_all_photosystems_file, n_col.fluorescence_emitted_by_all_photosystems, ns, true);
170+
write_output({'TOC fluorescence contribution from sunlit leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
171+
fnames.fluorescence_sunlit_file, n_col.fluorescence_sunlit, ns, true);
172+
write_output({'TOC fluorescence contribution from shaded leaves for wavelengths of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
173+
fnames.fluorescence_shaded_file, n_col.fluorescence_shaded, ns, true);
174+
write_output({'TOC fluorescence contribution from from leaves and soil after scattering for wavelenghts of 640 to 850 nm, with 1 nm resolution'}, {'W m-2 um-1 sr-1'}, ...
175+
fnames.fluorescence_scattered_file, n_col.fluorescence_scattered, ns, true);
176+
end
177+
write_output({'Bottom of canopy irradiance in the shaded fraction, and average BOC irradiance'}, {'First 2162 columns: shaded fraction. Last 2162 columns: average BOC irradiance. Unit: Wm-2 um-1'}, ...
178+
fnames.BOC_irradiance_file, n_col.BOC_irradiance, ns, true);
179+
end
172180

173181
fclose('all');
174182

@@ -177,7 +185,6 @@ function bin_to_csv(fnames, n_col, ns, options, SoilLayer, GroundwaterSettings)
177185
for k = 1:numel(fn)
178186
delete(fnames.(fn{k}));
179187
end
180-
181188
end
182189

183190
function write_output(header, units, bin_path, f_n_col, ns, not_header)

src/+io/output_data_binary.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
%% Fluxes product
1111
flu_out = [k iter.counter xyt.year(k) xyt.t(k) fluxes.Rntot fluxes.lEtot fluxes.Htot fluxes.Rnctot fluxes.lEctot, ...
1212
fluxes.Hctot fluxes.Actot fluxes.Rnstot fluxes.lEstot fluxes.Hstot fluxes.Gtot fluxes.Resp 1E6 * fluxes.aPAR, ...
13-
1E6 * fluxes.aPAR_Cab fluxes.aPAR / rad.PAR fluxes.aPAR_Wm2 1E6 * rad.PAR rad.Eoutf rad.Eoutf ./ fluxes.aPAR_Wm2 Trap(k) * 10 Evap(k) * 10 Trap(k) * 10 + Evap(k) * 10 fluxes.GPP fluxes.NEE];
13+
1E6 * fluxes.aPAR_Cab fluxes.aPAR / rad.PAR fluxes.aPAR_Wm2 1E6 * rad.PAR rad.Eoutf rad.Eoutf ./ fluxes.aPAR_Wm2 Trap * 10 Evap * 10 Trap * 10 + Evap * 10 fluxes.GPP fluxes.NEE];
1414
n_col.flu = length(flu_out);
1515
fwrite(f.flu_file, flu_out, 'double');
1616

src/+io/read_config.m

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [InputPath, OutputPath, InitialConditionPath] = read_config(config_file)
1+
function [InputPath, OutputPath, InitialConditionPath, FullCSVfiles] = read_config(config_file)
22

33
file_id = fopen(config_file);
44
config = textscan(file_id, '%s %s', 'HeaderLines', 0, 'Delimiter', '=');
@@ -17,3 +17,10 @@
1717

1818
indx = find(strcmp(config_vars, 'InitialConditionPath'));
1919
InitialConditionPath = config_paths{indx};
20+
21+
indx = find(strcmp(config_vars, 'FullCSVfiles'));
22+
if isempty(indx)
23+
FullCSVfiles = 1;
24+
else
25+
FullCSVfiles = str2num(config_paths{indx});
26+
end

src/+soilmoisture/calculateBoundaryConditions.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@
108108
C4(n - 1, 2) = 0;
109109
C4_a(n - 1) = 0;
110110
else
111-
RHS(n) = RHS(n) + AVAIL0 - Evap(KT);
111+
RHS(n) = RHS(n) + AVAIL0 - Evap;
112112
end
113113
end
114114
HeatMatrices.C4 = C4;

src/+soilmoisture/calculateEvapotranspiration.m

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function [Rn_SOIL, Evap, EVAP, Trap, r_a_SOIL, Srt, RWUs, RWUg] = calculateEvapotranspiration(InitialValues, ForcingData, SoilVariables, KT, RWU, fluxes, Srt, ModelSettings, GroundwaterSettings)
1+
function [Rn_SOIL, Evap, Trap, r_a_SOIL, Srt, RWUs, RWUg] = calculateEvapotranspiration(InitialValues, ForcingData, SoilVariables, KT, RWU, fluxes, Srt, ModelSettings, GroundwaterSettings)
22

33
if ~GroundwaterSettings.GroundwaterCoupling % no Groundwater coupling, added by Mostafa
44
indxBotm = 1; % index of bottom layer is 1, STEMMUS calculates from bottom to top
@@ -14,22 +14,18 @@
1414
U = 100 .* (ForcingData.WS_msr(KT));
1515
AR = soilmoisture.calculateAerodynamicResistance(U);
1616
r_a_SOIL = AR.soil;
17-
1817
Ta = ForcingData.Ta_msr(KT);
19-
Evap = InitialValues.Evap;
20-
EVAP = InitialValues.EVAP;
2118

2219
if fluxes.lEctot < 1000 && fluxes.lEstot < 800 && fluxes.lEctot > -300 && fluxes.lEstot > -300 && any(SoilVariables.TT > 5)
2320
lambda1 = (2.501 - 0.002361 * Ta) * 1E6;
2421
lambda2 = (2.501 - 0.002361 * SoilVariables.Tss(KT)) * 1E6;
25-
Evap(KT) = fluxes.lEstot / lambda2 * 0.1; % transfer to second value unit: cm s-1
26-
EVAP(KT, 1) = Evap(KT);
27-
Tp_t = fluxes.lEctot / lambda1 * 0.1; % transfer to second value
22+
Evap = fluxes.lEstot / lambda2 * 0.1; % transfer to second value unit: cm s-1
23+
Trap = fluxes.lEctot / lambda1 * 0.1; % transfer to second value
2824
Srt1 = RWU * 100 ./ ModelSettings.DeltZ';
2925
else
30-
Evap(KT) = 0; % transfer to second value unit: cm s-1
31-
EVAP(KT, 1) = Evap(KT);
32-
Tp_t = 0; % transfer to second value
26+
Evap = 0; % transfer to second value unit: cm s-1
27+
Trap = 0; % transfer to second value
28+
RWU = 0 * RWU;
3329
Srt1 = 0 ./ ModelSettings.DeltZ';
3430
end
3531

@@ -38,7 +34,6 @@
3834
Srt(i, j) = Srt1(i, 1);
3935
end
4036
end
41-
Trap(KT) = Tp_t; % root water uptake integration by ModelSettings.DeltZ;
4237

4338
% Calculate root water uptake from soil water (RWUs) and groundwater (RWUg)
4439
RWU = RWU * 100; % unit conversion from m/sec to cm/sec

0 commit comments

Comments
 (0)