Closed dankelley closed 6 years ago
Hm, so the diagnostics are as below. It doesn't even look at equilibration phase.
> a<-ctdTrim(ctdRaw,debug=30)
ctdTrim() {
ctdTrim() using method "downcast"
pmin= -5
removed data at indices from 379 (where pressure is 51.15) to the end of the data
method[2]="A"
scanStart: 1
} # ctdTrim()
Are you sure? I thought it fit a piecewise linear to remove equilibration. Or is that one of the other methods?
Maybe it's time for a separate "ctd processing" package rather than trying to have oce do everything perfectly ...
Sent from a mobile computer phone. Please excuse any tyops.
I think it used to remove the equilibration -- that's why it's a bug. As for a separate package, I'd prefer to get this many-years-old function working first, but, yes, I think by Christmas or say summer 2019, the community will have access to both a glider package and a CTD package. My idea on this is that oce should retain old things but that the docs will start referring to the new packages for better versions (but that requires those packages to be on cran for the oce docs to build on cran).
Oh hang on a tick, guvner, I see that the following removes the equilibration phase.
plotScan(ctdTrim(ctdRaw, method="sbe"))
plot(ctdTrim(ctdRaw, method="sbe"))
The scan plot looks fine:
and the summary plot looks ok:
so crisis averted. Closing issue.
produces as below. That's a lot of equilibration phase being left behind, and the salinities don't look real, either. I'm embarrassed by this, because I had in mind that
data(ctd)
was produced from simply usingctdTrim(ctdRaw)
but not so!It's a bit scary to go into
ctdTrim
, a function that's had a lot of reworking, but if it's this bad on a sample file we give withoce
, I reckon it needs some fixing.