Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
locupe
mexec
Commits
bb389ad7
Commit
bb389ad7
authored
5 years ago
by
PStar User Account
Browse files
Options
Download
Email Patches
Plain Diff
mcoxyhyst_reverse that deals with mising data
parent
ae63b40b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
20 deletions
+34
-20
source/mextras/mcoxyhyst_reverse.m
source/mextras/mcoxyhyst_reverse.m
+34
-20
No files found.
source/mextras/mcoxyhyst_reverse.m
100755 → 100644
View file @
bb389ad7
...
...
@@ -10,12 +10,26 @@ function [oxygen_rev]=mcoxyhyst_reverse(oxygen_sbe,time,press,H1,H2,H3)
% H2 5000
% H3 1450 [1200 to 2000]
% DAS chnaged to deal with absent data but note this could give slightly different results from original data as
% the sbe software may deal with absent data differently
oxygen_rev
=
oxygen_sbe
;
kfirst
=
min
(
find
(
isfinite
(
oxygen_sbe
)));
klastgood
=
kfirst
;
% keep track of most recent good cycle
for
k
=
2
:
length
(
time
)
D
=
1
+
H1
*
(
exp
(
press
(
k
)/
H2
)
-
1
);
C
=
exp
(
-
1
*
(
time
(
k
)
-
time
(
k
-
1
))/
H3
);
oxygen_rev
(
k
)
=
D
*
(
oxygen_sbe
(
k
)
-
C
*
oxygen_sbe
(
k
-
1
))
+
C
*
oxygen_rev
(
k
-
1
);
if
isnan
(
oxygen_sbe
(
k
)
+
press
(
k
))
oxygen_rev
(
k
)
=
nan
;
%already the case because of initialisation of oxygen_out
else
if
press
(
k
)
<
0
;
press
(
k
)
=
0
;
end
D
=
1
+
H1
*
(
exp
(
press
(
k
)/
H2
)
-
1
);
C
=
exp
(
-
1
*
(
time
(
k
)
-
time
(
klastgood
))/
H3
);
oxygen_rev
(
k
)
=
D
*
(
oxygen_sbe
(
k
)
-
C
*
oxygen_sbe
(
klastgood
))
+
C
*
oxygen_rev
(
klastgood
);
klastgood
=
k
;
end
end
;
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment