MARRMOT_05
Implementation
MARRMoT v2.1.1 rev eeb7e15 m_05_ihacres_7p_1s; standardized continuous structure, not original model
Time step: daily
Backend: octave-cli + Octave optim
Calibrated parameters: 7
Temperature required: no
Parameters and initial configuration
Parameter |
Supported calibration range |
Default |
|---|---|---|
|
1 to 2000 |
1000.5 |
|
1 to 2000 |
1000.5 |
|
0 to 10 |
5.0 |
|
0 to 1 |
0.5 |
|
1 to 700 |
350.5 |
|
1 to 700 |
350.5 |
|
0 to 119 |
59.5 |
|
Fixed initial/configuration value |
0.0 |
Ranges/defaults are implementation contracts, not universal priors or a recommended basin calibration. Consult source comments for parameter units and coupling.
Governing equations
The following source is the exact model kernel used by this adapter. For MARRMoT it includes the state derivative and each referenced flux function; the solver and routing are described above. Original notices and source citations are retained in the files.
function [dS, fluxes] = model_fun(obj, S)
% parameters
theta = obj.theta;
lp = theta(1); % Wilting point [mm]
d = theta(2); % Threshold for flow generation [mm]
p = theta(3); % Flow response non-linearity [-]
alpha = theta(4); % Fast/slow flow division [-]
% delta_t
delta_t = obj.delta_t;
% unit hydrographs and still-to-flow vectors
uhs = obj.uhs;
uh_q = uhs{1};
uh_s = uhs{2};
uh_t = uhs{3};
% stores
S1 = S(1);
% climate input
t = obj.t; % this time step
climate_in = obj.input_climate(t,:); % climate at this step
P = climate_in(1);
Ep = climate_in(2);
% fluxes functions
flux_ea = evap_12(S1,lp,Ep);
flux_u = saturation_5(S1,d,p,P);
flux_uq = split_1(alpha,flux_u);
flux_us = split_1(1-alpha,flux_u);
flux_xq = route(flux_uq, uh_q);
flux_xs = route(flux_us, uh_s);
flux_xt = route(flux_xq + flux_xs, uh_t);
% stores ODEs
dS1 = -P + flux_ea + flux_u;
% outputs
dS = dS1;
fluxes = [flux_ea, flux_u, flux_uq, flux_us,...
flux_xq, flux_xs, flux_xt];
end
% STEP runs at the end of every timestep, use it to update
% still-to-flow vectors from unit hydrographs
function [out] = evap_12(S,p1,Ep)
%evap_11
% Copyright (C) 2019, 2021 Wouter J.M. Knoben, Luca Trotter
% This file is part of the Modular Assessment of Rainfall-Runoff Models
% Toolbox (MARRMoT).
% MARRMoT is a free software (GNU GPL v3) and distributed WITHOUT ANY
% WARRANTY. See <https://www.gnu.org/licenses/> for details.
% Flux function
% ------------------
% Description: Evaporation from deficit store, with exponential decline as
% deficit goes below a threshold
% Constraints: -
% @(Inputs): S - current storage [mm]
% p1 - wilting point [mm]
% Ep - potential evapotranspiration rate [mm/d]
out = min(1,exp(2*(1-S/p1)))*Ep;
end
function [out] = saturation_5(S,p1,p2,In)
%saturation_5
% Copyright (C) 2019, 2021 Wouter J.M. Knoben, Luca Trotter
% This file is part of the Modular Assessment of Rainfall-Runoff Models
% Toolbox (MARRMoT).
% MARRMoT is a free software (GNU GPL v3) and distributed WITHOUT ANY
% WARRANTY. See <https://www.gnu.org/licenses/> for details.
% Flux function
% ------------------
% Description: Deficit store: exponential saturation excess based on current
% storage and a threshold parameter
% Constraints: S >= 0 prevents numerical issues with complex numbers
% @(Inputs): p1 - deficit threshold above which no flow occurs [mm]
% p2 - exponential scaling parameter [-]
% S - current deficit [mm]
% In - incoming flux [mm/d]
out = (1-min(1,(max(S,0)/p1).^p2)).*In;
end
function [out] = split_1(p1,In)
%split_1 flow splitting
% Copyright (C) 2019, 2021 Wouter J.M. Knoben, Luca Trotter
% This file is part of the Modular Assessment of Rainfall-Runoff Models
% Toolbox (MARRMoT).
% MARRMoT is a free software (GNU GPL v3) and distributed WITHOUT ANY
% WARRANTY. See <https://www.gnu.org/licenses/> for details.
% Flux function
% ------------------
% Description: Split flow (returns flux [mm/d])
% Constraints: -
% @(Inputs): p1 - fraction of flux to be diverted [-]
% In - incoming flux [mm/d]
out = p1.*In;
end
function [ flux_out ] = route(flux_in, uh)
% ROUTE calculates the output of a unit hydrograph at the current timestep
% after routing a flux through it.
% Copyright (C) 2019, 2021 Wouter J.M. Knoben, Luca Trotter
% This file is part of the Modular Assessment of Rainfall-Runoff Models
% Toolbox (MARRMoT).
% MARRMoT is a free software (GNU GPL v3) and distributed WITHOUT ANY
% WARRANTY. See <https://www.gnu.org/licenses/> for details.
% In:
% flux_in - input flux [1x1]
% uh - unit hydrograph [nx2]
% uh's first row contains coeficients to splut flow at each
% of n timesteps forward, the second row contains
% still-to-flow values.
%
% Out:
% flux_out - flux routed through the uh at this step [1x1]
%
flux_out = uh(1,1) * flux_in + uh(2,1);
end
Note
This standardized MARRMoT structure is not identical to the original named model. p01... follow exact source order; s01... are fixed initial stores, defaulting to zero. Octave + optim are required. Solver behavior can differ across runtime versions.
Simulation
from basinforge import Basin, get_model
basin = Basin.from_csv("basin.csv", basin_id="A", area_km2=1200,
q_unit="m3/s", timestep="daily")
q_mm = get_model("MARRMOT_05").simulate(basin)
q_m3s = basin.to_m3s(q_mm)
Supply your actual data and catchment area; temperature-dependent models require a temperature column. For non-daily models, choose an appropriate warmup in model steps.
See calibration, input requirements, sources and verification limitations.