View source: R/sidfex.cdm.complex_demodulation.R
sidfex.cdm.complex_demodulation | R Documentation |
This function takes Lagrangian ice-drift velocities and seperates it into oscillating parts (with two adjustable frequencies) and a background drift. It follows the approach of McPhee (1988), with technical adjustments regarding the minimization. It can be used, for instance, for removing tidal and inertial oscillations from observed trajectories.
Note that the temporal resolution of the observed drift should be high enough for resolving said oscillations, 1h time steps should be sufficient for most applications.
An exemplary use case is provided here: sidfex.cdm.reconstruct_drift
.
sidfex.cdm.complex_demodulation(observed_time, observed_drift, NWIN, DWIN, freqS=NA, freqD=NA)
observed_time |
Vector of equidistant time variable (unit should be days!) |
observed_drift |
Vector of complex drift velocity, |
NWIN |
Window length (scalar) for the complex demodulation. Should cover the time period of the slowest oscillation, or at least not significantly less. With equidistant spacing |
DWIN |
Scalar index by which the moving window is shifted in each iteration. A value of |
freqS |
OPTIONAL, frequency in cycles per day (cpd) of the semidiurnal oscillations. If left to |
freqD |
OPTIONAL, frequency in cycles per day (cpd) of the diurnal oscillations. If left to |
This function fits the complex velocity in each window of length NWIN
to a linear combination of four phasors of type A*exp(1i*omega*t)
(with an amplitude A
and a frequency omega
) and a non-oscillating "background" drift V0
.
The five fitted complex parameters are then V0
(background drift), S_CW
(semidiurnal clockwise amplitude), S_CCW
(semidiurnal counterclockwise amplitude), D_CW
(diurnal clockwise amplitude) , and D_CCW
(diurnal clockwise amplitude). The model for the demodulation then looks like this:
osci_S = S_CW*exp(- 1i * freqS * tgr) + S_CCW*exp(+ 1i * freqS * tgr)
osci_D = D_CW*exp(- 1i * freqD * tgr) + D_CCW*exp(+ 1i * freqD * tgr)
drift_model = V_0 + osci_D + osci_S
The applied optimization minimizes the residuals of observed and modeled drift. For technical reasons, the five complex fit parameters are converted to ten real-valued parameters internally.
The (demodulated) drift trajectory, given an initial position, can be obtained by integration of the (demodulated) velocity. This is done in the example of sidfex.cdm.reconstruct_drift
.
time |
Time vector for fitted parameters, taken as the bin center of the moving window |
fitted_parameters |
Array containing the time series of the fitted parameters (split into real and imaginary part, pairwise, in the same order they appear in the model equation above); time series of the complex parameters are obtained via |
freqS |
Frequency in cycles per day (cpd) of the semidiurnal oscillations used in drift model. |
freqD |
Frequency in cycles per day (cpd) of the diurnal oscillations used in drift model. |
The two input frequencies do not have to be diurnal/semidiurnal. However, this is probably the most common case. In high latitudes, the inertial frequency will be close to the one of the M2 tide, which makes the separation of those two a bit difficult.
Simon F. Reifenberg
McPhee, M. G. (1988). "Analysis and Prediction of Short-Term Ice Drift." ASME. J. Offshore Mech. Arct. Eng. February 1988; 110(1): 94–100. https://doi.org/10.1115/1.3257130
sidfex.cdm.reconstruct_drift
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.