-
Notifications
You must be signed in to change notification settings - Fork 0
/
findProcessError.m
89 lines (79 loc) · 3.55 KB
/
findProcessError.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
function Q = findProcessError(siteStr, bathy, H)
% Q = findProcessErrorDuck(siteString, newBathy, H);
%
% creates a reasonable estimate of process error for Kalman
% filtering. For Duck, the equation was based on magnitudes of daily
% deviation from the SandyDuck CRAB data. For Agate it is simply a
% similar guess
switch siteStr
case 'argus02a'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.067; % units /day, from 012012 re-analysis.
x0 = 150; % m, same calib
sig = 100; % m, same calib
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'argus02b'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.067; % units /day, from 012012 re-analysis.
x0 = 150; % m, same calib
sig = 100; % m, same calib
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'batman'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.002; % units /day, from 012012 re-analysis.
x0 = 150; % m, same calib
sig = 5000; % m, same calib
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'argus00'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.005; % units /day, from 04/29/10 guess
x0 = 700; % m, same calib
sig = 300; % m, same calib
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'rosie'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.067; % take Duck value randomly
CQ = 0.02; % change 1, 12/28/12
x0 = 0; % m, same calib
sig = 5000; % m, essentially constant values
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'droskyn'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.02; % units /day, from total guess
x0 = 700; % m, same calib
sig = 500; % m, same calib
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'massa'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.067; % take Duck value randomly
x0 = 100; % m, same calib
sig = 100; % m, essentially constant values
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
case 'secret'
X = repmat(bathy.xm, size(bathy.runningAverage.h,1), 1);
CQ = 0.067; % take Duck value randomly
x0 = 100; % m, same calib
sig = 75; % m, essentially constant values
Q = CQ * H^2 * exp(-((X-x0).^2)/(2*sig*sig));
otherwise
error('No process error defined for this site, in findProcessError')
end
%
% Copyright (C) 2017 Coastal Imaging Research Network
% and Oregon State University
% This program is free software: you can redistribute it and/or
% modify it under the terms of the GNU General Public License as
% published by the Free Software Foundation, version 3 of the
% License.
% This program is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
% You should have received a copy of the GNU General Public License
% along with this program. If not, see
% <http://www.gnu.org/licenses/>.
% CIRN: https://coastal-imaging-research-network.github.io/
% CIL: http://cil-www.coas.oregonstate.edu
%
%key cBathy
%