LSF Tides: Difference between revisions
From WikiROMS
Jump to navigationJump to search
No edit summary (change visibility) |
No edit summary (change visibility) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<div class="title">Least Squares Fit for ROMS Tides</div> | <div class="title">Least Squares Fit for ROMS Tides</div> | ||
< | A ROMS state variable, <math>\phi</math>, can be represented in terms of its time mean, <math>\bar\phi</math>, plus a set of <math>N</math>-tidal harmonics of frequency, <math>\omega_k</math>. | ||
<math display="block"> | |||
\phi(t) = \bar\phi + \sum_{k=1}^N A_k \sin\omega_k t + \sum_{k=1}^N B_k \cos\omega_k t | |||
</math> | |||
The unknown tidal amplitude <math>A_k</math>, and <math>B_k</math> and unknown state <math>\phi</math> coefficients are evaluated by minimizing the least-squares error function defined by: | |||
<math display="block"> | |||
\varepsilon^2 = \frac{1}{T} \int_{t_1}^{t_2} \left[\phi - \left(\bar\phi | |||
+ \sum_{k=1}^N (A_k \sin\omega_k t) | |||
+ \sum_{k=1}^N (B_k \cos\omega_k t)\right)\right]^2dt | |||
</math> | |||
In discrete space: | |||
<math display="block"> | |||
\varepsilon^2 = \frac{1}{M} \sum_{i=1}^M \left[\phi_i - \left(\bar\phi | |||
+ \sum_{k=1}^N (A_k \sin\omega_k t_i) | |||
+ \sum_{k=1}^N (B_k \cos\omega_k t_i)\right)\right]^2 | |||
</math> | |||
Minimization subject to the additional constraints <math>\frac{\partial \varepsilon^2}{\partial \bar\phi} = 0</math>, <math>\frac{\partial \varepsilon^2}{\partial A_k} = 0</math>, <math>\frac{\partial \varepsilon^2}{\partial B_k} = 0</math> result in a linear set of equations: | |||
<math display="block"> | |||
\sum_{i=1}^M \left[-2\phi_i + 2\bar\phi + 2 \sum_{k=1}^N (A_k \sin\omega_k t_i) | |||
+ 2 \sum_{k=1}^N (B_k \sin\omega_k t_i)\right] = 0 | |||
</math> | |||
<math display="block"> | |||
\sum_{i=1}^M \Bigg[ -2 \phi_i \sin\omega_k t_i + 2 \bar\phi \sin\omega_k t_i | |||
+ 2\sum_{p=1}^N (A_p \sin\omega_p t_i \sin\omega_k t_i) | |||
+ 2\sum_{p=1}^N (B_p\cos\omega_p t_i \sin\omega_k t_i)\Bigg] = 0 | |||
</math> | |||
<math display="block"> | |||
\sum_{i=1}^M \Bigg[ -2 \phi_i \cos\omega_k t_i + 2 \bar\phi \cos\omega_k t_i | |||
+ 2\sum_{p=1}^N (A_p \sin\omega_p t_i \cos\omega_k t_i) | |||
+ 2\sum_{p=1}^N (B_p\cos\omega_p t_i \cos\omega_k t_i) \Bigg] = 0 | |||
</math> | |||
in matrix form (<math>N</math> harmonics). Note: all instances of <math>\sum</math> are actually <math>\sum_{i=1}^M</math> where <math>M</math> is the number of time-steps in the time-averaging window. | |||
<math display="block">\begin{matrix} | |||
\begin{bmatrix} | |||
\\ | |||
\ | |||
M & \sum \sin\omega_1 t_i & \sum \sin\omega_2 t_i | M & \sum \sin\omega_1 t_i & \sum \sin\omega_2 t_i | ||
& \cdots & \sum \cos\omega_1 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i & \cdots \\ | ||
\ | \\ | ||
\sum \sin\omega_1 t_i & \sum \sin^2 \omega_1 t_i & \sum \sin\omega_2 t_i \sin\omega_1 t_i | \sum \sin\omega_1 t_i & \sum \sin^2 \omega_1 t_i & \sum \sin\omega_2 t_i \sin\omega_1 t_i | ||
& \cdots & \sum \cos\omega_1 t_i \sin\omega_1 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i \sin\omega_1 t_i & \cdots \\ | ||
\ | \\ | ||
\sum \sin\omega_2 t_i & \sum \sin\omega_1 t_i \sin\omega_2 t_i & \sum \sin^2 \omega_2 t_i | \sum \sin\omega_2 t_i & \sum \sin\omega_1 t_i \sin\omega_2 t_i & \sum \sin^2 \omega_2 t_i | ||
& \cdots & \sum \cos\omega_1 t_i \sin\omega_2 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i \sin\omega_2 t_i & \cdots \\ | ||
\ | \\ | ||
\vdots & \vdots & \cdots & \cdots & \cdots & \cdots \ | \vdots & \vdots & \cdots & \cdots & \cdots & \cdots \\ | ||
\ | \\ | ||
\sum \sin\omega_7 t_i & \sum \sin\omega_1 t_i \sin\omega_7 t_i & \sum \sin\omega_2 t_i \sin\omega_7 t_i | \sum \sin\omega_7 t_i & \sum \sin\omega_1 t_i \sin\omega_7 t_i & \sum \sin\omega_2 t_i \sin\omega_7 t_i | ||
& \cdots & \sum \cos\omega_1 t_i \sin\omega_7 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i \sin\omega_7 t_i & \cdots \\ | ||
\ | \\ | ||
\sum \sin\omega_1 t_i & \sum \sin\omega_1 t_i \cos\omega_1 t_i & \sum \sin\omega_2 t_i \cos\omega_1 t_i | \sum \sin\omega_1 t_i & \sum \sin\omega_1 t_i \cos\omega_1 t_i & \sum \sin\omega_2 t_i \cos\omega_1 t_i | ||
& \cdots & \sum \cos^2 \omega_1 t_i & \cdots \ | & \cdots & \sum \cos^2 \omega_1 t_i & \cdots \\ | ||
\ | \\ | ||
\sum \cos\omega_2 t_i & \sum \sin\omega_1 t_i \cos\omega_2 t_i & \sum \sin\omega_2 t_i \cos\omega_2 t_i | \sum \cos\omega_2 t_i & \sum \sin\omega_1 t_i \cos\omega_2 t_i & \sum \sin\omega_2 t_i \cos\omega_2 t_i | ||
& \cdots & \sum \cos\omega_1 t_i \cos\omega_2 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i \cos\omega_2 t_i & \cdots \\ | ||
\ | \\ | ||
\vdots & \vdots & \vdots & \vdots & \vdots & \vdots \ | \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ | ||
\ | \\ | ||
\sum \cos\omega_7 t_i & \sum \sin\omega_1 t_i \cos\omega_7 t_i & \sum \sin\omega_2 t_2 \cos\omega_7 t_i | \sum \cos\omega_7 t_i & \sum \sin\omega_1 t_i \cos\omega_7 t_i & \sum \sin\omega_2 t_2 \cos\omega_7 t_i | ||
& \cdots & \sum \cos\omega_1 t_i \cos\omega_7 t_i & \cdots \ | & \cdots & \sum \cos\omega_1 t_i \cos\omega_7 t_i & \cdots \\ \\ \end{bmatrix} | ||
\;\;& | |||
\ | \begin{bmatrix} | ||
\ | \\ | ||
\bar\phi \ | \bar\phi \\ \\ A_1 \\ \\ A_2 \\ \\ \vdots \\ \\ A_7 \\ \\ B_1 \\ \\ B_2 \\ \\ \vdots \\ \\ B_7 \\ \\ | ||
} | \end{bmatrix} | ||
= & | & = & | ||
\ | \begin{bmatrix} | ||
\ | \\ | ||
\sum\phi_i \ | \sum\phi_i \\ \\ | ||
\sum\phi_i \sin\omega_1 ti \ | \sum\phi_i \sin\omega_1 ti \\ \\ | ||
\sum\phi_i \sin\omega_2 ti \ | \sum\phi_i \sin\omega_2 ti \\ \\ | ||
\vdots \ | \vdots \\ \\ | ||
\sum\phi_i \sin\omega_7 ti \ | \sum\phi_i \sin\omega_7 ti \\ \\ | ||
\sum\phi_i \cos\omega_1 ti \ | \sum\phi_i \cos\omega_1 ti \\ \\ | ||
\sum\phi_i \cos\omega_2 ti \ | \sum\phi_i \cos\omega_2 ti \\ \\ | ||
\vdots \ | \vdots \\ \\ | ||
\sum\phi_i \cos\omega_7 ti \ | \sum\phi_i \cos\omega_7 ti \\ \\ | ||
} \ | \end{bmatrix} | ||
A & x & & b} | \\ | ||
A & x & & b | |||
</ | \end{matrix}</math> |
Latest revision as of 17:22, 5 August 2015
Least Squares Fit for ROMS Tides
A ROMS state variable, , can be represented in terms of its time mean, , plus a set of -tidal harmonics of frequency, .
The unknown tidal amplitude , and and unknown state coefficients are evaluated by minimizing the least-squares error function defined by:
In discrete space:
Minimization subject to the additional constraints , , result in a linear set of equations:
in matrix form ( harmonics). Note: all instances of are actually where is the number of time-steps in the time-averaging window.