-
Notifications
You must be signed in to change notification settings - Fork 0
/
parametersendtoend.m
61 lines (52 loc) · 2.03 KB
/
parametersendtoend.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%setup of parameters for the end to end simulation
%in:
%mAdult: vector, maximum multicellular organism size, the model creates as
%many groups as the length of the vector, default two groups with maximum
%size 20 and 1000 μg respectively
%L: Light, default 100 mmol PAR m^-2
%udeep: deep layer nutrient concentration, default: 50μg l^-1
%d : mixing rate, default: 0.1 d^-1
%onceagain: previous simulation values
function [p,param]=parametersendtoend(mAdult,L,pudeep,d,onceagain)
arguments
mAdult double =[20 1000];
L double = 100;
pudeep double = 50;
d double = 0.1;
onceagain struct =[]
end
%add path to FEISTY folder
addpath('/zhome/2a/3/160177/MATLAB/Projects/FEISTY/Simple_run')
p = setupGeneric(mAdult);
p = parametersChemostat(p);
p.L = L; %Light
p.udeep=pudeep; %deep N concentration
p.d=d; %mixing rate d^-1
baseparameters
% μg/l to g WW/m^2
% μg/l 1000 l/m^3
param.proddepth=20; %________________________%%%% meters
param.p=p;
%add benthos parameters
bent = 150;
BeR = 0.1*(bent*(param.bottom/param.photic)^-0.86);
BeR(BeR>=(bent*0.1)) = bent*0.1;
param.K = [80 80 BeR 0]; % g C ww/m2
if isfield(onceagain,'onceagainnum')
p.onceagainnum=onceagain.onceagainnum;
end
if isfield(onceagain, 'onceagainfeisty')
param.onceagainfeisty=onceagain.onceagainfeisty;
end
param.proddepth=20; %________________________%%%% meters
param.muTg=1/1000000; %μg to g
param.lTm=1000; %liters to cubic meters
param.dTw=10; %dry to wet C weight
param.NtF=param.muTg*param.lTm*param.dTw*param.proddepth;
%trawl-like selectivity curve
param.u=2;
param.Fmax(1:5)=0;
param.Fsmall=sqrt((1+(param.wu(param.ix1(1):param.ix2(1))./param.smat).^(-param.u)).^(-1).*(1+(param.w(param.ix1(1):param.ix2(1))./param.smat).^(-param.u)).^(-1));
param.Flarge=sqrt((1+(param.wu(param.ix1(3):param.ix2(3))./param.smat).^(-param.u)).^(-1).*(1+(param.w(param.ix1(3):param.ix2(3))./param.lmat).^(-param.u)).^(-1));
param.F=[param.Fmax(1).*param.Fsmall'; param.Fmax(2).*param.Fsmall'; param.Fmax(3).*param.Flarge'; param.Fmax(4).*param.Flarge'; param.Fmax(5).*param.Flarge'];
end