Flag variables with the same dimension of v in an adp object that
are beyond the water column boundary while retaining existing flags.
Currently, this operation can only be performed on adp objects that
contain bottom ranges. Commonly, handleFlags() would then be used to remove
such data.
Usage
adpFlagPastBoundary(
x = NULL,
fields = NULL,
df = 20,
smoother,
trim = 0.15,
good = 1,
bad = 4,
debug = getOption("oceDebug")
)Arguments
- x
an adp object containing bottom ranges.
- fields
a variable contained within
xindicating which field to flag. If NULL (the default) thenadpFlagPastBoundary()applies itself to all flag fields that have the same dimensionality asvin thedataslot.- df
the degrees of freedom to use during the smoothing spline operation.
- smoother
a function used to smooth the boundary distance. If this is not given, then
smooth.spline()is called withdfset equal to the value ofdfgiven by the user. If it is NULL, then no smoothing is done. If it is a function that takes 2 arguments and returns a vector of values, then that is used. For example, a user might setsmoother=function(x, y) smooth.spline(x,y,nknots=length(x)/5)$yto use a smoothing spline with the indicated number of knots.- trim
a scale factor for boundary trimming (see “Details”).
- good
number stored in flags to indicate good data.
- bad
number stored in flags to indicate bad data.
- debug
an integer specifying whether debugging information is to be printed during the processing. This is a general parameter that is used by many
ocefunctions. Generally, settingdebug=0turns off the printing, while higher values suggest that more information be printed. If one function calls another, it usually reduces the value ofdebugfirst, so that a user can often obtain deeper debugging by specifying higherdebugvalues.
Value
adpFlagPastBoundary returns an adp object with flags
adjusted in the specified fields if data are beyond the water column boundary.
Details
If the object's oceCoordinate is "beam", this works by smoothing the
time-dependent bottom ranges (as controlled by the smoother and perhaps the
df parameters), beam-by-beam. If oceCoordinate is "enu", "xyz", or
"other", smoothing is done based on a time-dependent bottom range averaged
across all the beams. Once this is done, data within distance of
\(1-trim\) multiplied by the bottom range are flagged as being bad. The
default value of trim is 0.15, which is close to the value (0.134) of
\(1-cos(angle*pi/180)\), with angle=30 as the beam angle in degrees.
See also
Other things related to adp data:
[[,adp-method,
[[<-,adp-method,
ad2cpCodeToName(),
ad2cpHeaderValue(),
adp,
adp-class,
adpAd2cpFileTrim(),
adpConvertRawToNumeric(),
adpEnsembleAverage(),
adpRdiFileTrim(),
adp_rdi.000,
applyMagneticDeclination,adp-method,
as.adp(),
beamName(),
beamToXyz(),
beamToXyzAdp(),
beamToXyzAdpAD2CP(),
beamToXyzAdv(),
beamUnspreadAdp(),
binmapAdp(),
enuToOther(),
enuToOtherAdp(),
handleFlags,adp-method,
is.ad2cp(),
plot,adp-method,
read.adp(),
read.adp.ad2cp(),
read.adp.nortek(),
read.adp.rdi(),
read.adp.sontek(),
read.adp.sontek.serial(),
read.aquadopp(),
read.aquadoppHR(),
read.aquadoppProfiler(),
rotateAboutZ(),
setFlags,adp-method,
subset,adp-method,
subtractBottomVelocity(),
summary,adp-method,
toEnu(),
toEnuAdp(),
velocityStatistics(),
xyzToEnu(),
xyzToEnuAdp(),
xyzToEnuAdpAD2CP()