-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetHTL.m
32 lines (30 loc) · 1.27 KB
/
setHTL.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
%
% Sets the higher trophic level mortality. Already done by default in the
% setup function, so this function is only needed to override the defaults.
%
% HTL mortality is either a standard mortality that is fixed by mortHTL, or
% it is a "quadradratic" mortality that is proportional to the biomass. In
% the latter case morthHTL is the constant in front of the quadratic
% mortality, and not the mortality itself.
%
% In:
% mortHTL - the HTL mortality (or the constant if bQuadratic=true)
% mHTL - the size where the HTL starts (usually set to the maximum size
% divided by 500^1.5)
% bQuadraticHTL - boolean which determines whether to use a fixed or
% "quadratic" mortality
% bDecliningHTL - boolean which determines whether the HTL mortality
% declines with size as mass^-0.25.
%
% Out:
% Nothing; the function only affects the fortran library.
%
function setHTL(mortHTL, mHTL, bQuadraticHTL, bDecliningHTL)
arguments
mortHTL double {mustBeNonnegative} = 0.2;
mHTL double = 1/500^1.5; % Suits simulations with only generalists
bQuadraticHTL logical = false;
bDecliningHTL logical = false;
end
calllib(loadNUMmodelLibrary(), 'f_sethtl', ...
double(mHTL), double(mortHTL), logical(bQuadraticHTL), logical(bDecliningHTL) );