|
|
Line 35: |
Line 35: |
|
| |
|
|
| |
|
| in matrix form (7 harmonics). '''Note:''' all instances of <math>\sum</math> are actually <math>\sum_{i=1}^M</math> | | in matrix form (N harmonics). '''Note:''' all instances of <math>\sum</math> are actually <math>\sum_{i=1}^M</math> where M is the number of time-steps in the time-averaging window. |
|
| |
|
| :<math>\begin{array}{cccc} | | :<math>\begin{array}{cccc} |
| \left[ \begin{array} {cccccc} | | \left[ \begin{array} {cccccc} |
| \\ | | \\ |
| M & {\color{Blue}\sum \sin\omega_1 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\sum \sin\omega_1 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\sum \sin\omega_2 t_i} & {\color{Blue}\sum \sin\omega_1 t_i \sin\omega_2 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\vdots} & {\color{Blue}\vdots} & \cdots & \cdots & \cdots & \cdots \\
| | \vdots & \vdots & \cdots & \cdots & \cdots & \cdots \\ |
| \\ | | \\ |
| {\color{Blue}\sum \sin\omega_7 t_i} & {\color{Blue}\sum \sin\omega_1 t_i \sin\omega_7 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\sum \sin\omega_1 t_i} & {\color{Blue}\sum \sin\omega_1 t_i \cos\omega_1 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\sum \cos\omega_2 t_i} & {\color{Blue}\sum \sin\omega_1 t_i \cos\omega_2 t_i} & {\color{Blue}\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 \\ |
| \\ | | \\ |
| {\color{Blue}\vdots} & {\color{Blue}\vdots} & \vdots & \vdots & \vdots & \vdots \\
| | \vdots & \vdots & \vdots & \vdots & \vdots & \vdots \\ |
| \\ | | \\ |
| {\color{Blue}\sum \cos\omega_7 t_i} & {\color{Blue}\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{array} \right] & | | \end{array} \right] & |
Least Squares Fit for ROMS Tides
- : state variables
- : tidal frequency
- : amplitude
- : number of harmonics
To minimize cost function
- are unknowns
In discrete space:
at the minimum
-
-
-
in matrix form (N harmonics). Note: all instances of are actually where M is the number of time-steps in the time-averaging window.