Created
November 2, 2023 00:06
-
-
Save pukpr/3e1484dd8248623453ccf77723957b55 to your computer and use it in GitHub Desktop.
Analytic Tidal Forcing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Conventional tidal series summation or superposition of cycles | |
function Tide_Sum (Template : in Data_Pairs; | |
Constituents : in Long_Periods_Amp_Phase; | |
Periods : in Long_Periods; | |
Ref_Time : in Long_Float := 0.0; | |
Scaling : in Long_Float := 1.0; | |
Cos_Phase : in Boolean := True; | |
Year_Len : in Long_Float := Year_Length; | |
Integ: in Long_Float := 0.0 | |
) return Data_Pairs is | |
Pi : Long_Float := Ada.Numerics.Pi; | |
Time : Long_Float; | |
Res : Data_Pairs := Template; | |
Yr : Long_Float := Year_Len; | |
Drac : Long_Float := 2.0*pi*Yr/Draconic; | |
Trop : Long_Float := 2.0*pi*Yr/Tropical; | |
Anom : Long_Float := 2.0*pi*Yr/Anomalistic; | |
Nodal : Long_Float := Drac-Trop; | |
Peri : Long_Float := (Trop-Anom)/2.0; | |
K1 : Long_Float := Constituents(1).Value; -- -0.06 | |
K2 : Long_Float := Constituents(2).Value; -- -0.064 | |
TA : Long_Float := Constituents(3).Value; -- 0.144 | |
TP : Long_Float := Constituents(4).Value; -- 0.7 | |
AA : Long_Float := Constituents(5).Value; -- -0.718 | |
AP : Long_Float := Constituents(6).Value; -- -0.62 | |
T2A : Long_Float := Constituents(7).Value; -- 0.16 | |
T2P : Long_Float := Constituents(8).Value; -- 0.29 | |
DSA : Long_Float := Constituents(9).Value; -- 0.001 ---- | |
DSP : Long_Float := Constituents(10).Value; -- -0.0129 | |
A2A : Long_Float := Constituents(11).Value; -- -0.062 | |
SYA : Long_Float := Constituents(12).Value; -- 0.362 | |
SYP : Long_Float := Constituents(13).Value; -- 0.96 | |
EA : Long_Float := Constituents(14).Value; -- 0.284 | |
EP : Long_Float := Constituents(15).Value; -- 4.0 | |
E2A : Long_Float := Constituents(16).Value; -- -0.0227 | |
T2AYA : Long_Float := Constituents(17).Value; -- 0.04 --- | |
T2AYP : Long_Float := Constituents(18).Value; -- 0 | |
Q1 : Long_Float := Constituents(19).Value; -- -0.01 | |
Q2 : Long_Float := Constituents(20).Value; -- 9.47 | |
DA : Long_Float := Constituents(21).Value; -- -0.087 | |
DP : Long_Float := Constituents(22).Value; -- 0.17 | |
K3 : Long_Float := Constituents(23).Value; -- -0.088 | |
NA : Long_Float := Constituents(24).Value; -- 0.1 | |
NP : Long_Float := Constituents(25).Value; -- 9.6 | |
PA : Long_Float := Constituents(26).Value; -- 0.05 | |
PP : Long_Float := Constituents(27).Value; -- -6 | |
TN2A : Long_Float := Constituents(28).Value; -- 0 --- | |
TN2P : Long_Float := Constituents(29).Value; | |
function Ds is new rsin (DA, Drac, DP); -- = A*sin(2*Drac*(x+p)); | |
function Ts is new rsin (TA, Trop, TP); -- = A*sin(2*Trop*(x+p)) | |
function DsB is new gsin (DSA, 2.0*Drac, DSP); -- = A*sin(2*Drac*(x+p)); | |
function TsB is new gsin (TN2A, 2.0*Trop, TN2P); -- = A*sin(2*Trop*(x+p)) | |
function T2s is new gsin (T2AYA, Trop+Drac, T2AYP); -- = A*sin((Trop+Drac)*(x+p)) | |
function As is new gsin (AA, Anom, AP); -- = A*sin(Anom*(x+p)) | |
-- function Semi is new gsin(SA, 4.0*Pi, SP); -- = A*sin(4*pi*(x+p)) | |
function Evect is new gsin(EA, 2.0*Trop-Anom-4.0*Pi, EP); -- = A*sin((2*Trop-Anom-4*pi)*(x+p)) | |
function Syn is new gsin(SYA, 2.0*Trop-4.0*Pi, SYP); -- = A*sin((2*Trop-4*pi)*(x+p)) | |
--function Annual is new gsin(YA, 2.0*Pi, YP); -- = A*cos(2*pi*(x+p)) | |
function N is new gsin (NA, Nodal, NP); -- = A*sin(Nodal*(x+p)) | |
--function N2 is new gsin (N2A, Nodal/2.0, N2P); -- = A*sin(Nodal/2.0*(x+p)) | |
function P is new gsin (PA, Peri, PP); -- = A*sin(Peri*(x+p)) | |
-- # Define the model | |
function Model (Time : in Long_Float) return Long_Float is | |
MM : Long_Float := As(Time, 0.0); | |
Msm : Long_Float := Evect(Time, 0.0); | |
Mfp : Long_Float := T2s(Time, + A2A*Mm + E2A*Msm); | |
Mf : Long_Float := Ts(Time, + A2A*Mm + E2A*Msm, T2A) + TsB(Time, + A2A*Mm + E2A*Msm); | |
Mfd : Long_Float := Ds(Time, + A2A*Mm + E2A*Msm, T2P) + DsB(Time, + A2A*Mm + E2A*Msm); | |
Msf : Long_Float := Syn(Time, + Q1*(Mf+Mfd+Mfp+Q2*Mf*Mfd)); -- + Q2*Mfp | |
begin | |
return Mf + Mfd + Mfp + Q2*Mf*Mfd + Msm + Msf + N(Time, 0.0) + P(Time, 0.0) + -- + Semi(Time) + Annual(Time) + N2(Time) | |
As(Time, + K1*(Mf+Mfd+Mfp+Q2*Mf*Mfd) + K2*Mm + K3*Msf); | |
end Model; | |
begin | |
for I in Template'Range loop | |
Time := Template(I).Date - Ref_Time; | |
declare | |
TF : Long_Float := 0.0; | |
begin | |
Tf := Model (Time); | |
Res(I) := (Time, Scaling * TF); | |
end; | |
end loop; | |
return Res; | |
end Tide_Sum; |
AMO prediction
-0.33045945085 :offset:
-0.42132010636 :bg:
4.15362205615 :impA:
0.43215012024 :impB:
0.00000000000 :impC:
0.37688229113:delA:
0.04731461377:delB:
0.02504912914:asym:
-0.33700267001:ann1:
-6.47744778804:ann2:
-0.06766374487:sem1:
1.96885766471:sem2:
-0.00296073076:year:
0.02173436466:IR:
0.00000000000 :mA:
0.00114122577 :mP:
0.00709886446 :shiftT:
-0.00000000000 :init:
---- Tidal ----
9.10846048884, -0.22199719134 1
29.53065053743, -1.38416898508 2
27.09267692660, 0.12408858564 3
7.08840639938, -7.37655224426 4
6.85248390316, -0.63598735794 5
13.60611040750, 0.28554936998 6
13.66083077700, 15.01177338789 7
3396.73824406533, 0.89663899165 8
9.12068919638, 0.00268711864 9
6793.47648813065, 0.55422371202 11
27.55454988600, 3.73055466288 12
27.66676714572, -0.01900705629 13
27.44323926226, -0.14589218893 14
1616.30271425126, -1.56439453348 15
6.85940288609, -1.96844419755 16
7.09581026499, -0.65872437487 17
9.55688676576, -3.21781733757 18
9.13295078376, -0.11171426764 19
2190.35004466729, 156.21082724055 20
27.21222081500, -0.00702066091 21
9.18484996200, 0.56979449476 22
14.76532526872, 3.02063176673 23
31.81208430337, 0.20835423705 24
9.54346127163, 0.55519661295 25
13.63341568476, -0.17965634562 26
26.98505934729, -180.74060942340 27
365.24692766924, -5.23844360474 28
182.62346383462, 6.83906010597 29
121.74897588975, 0.77912830087 30
9.61373090569, 0.47395208342 31
3232.60542850251, -24.40217743847 32
---- LTE ----
-0.09809491950 :trend:
0.00081032700 :accel:
0.41249454859 :K0:
183.97710821612 :level:
0.11791321798, 1.40382109203, 0.96170358617 0
0.25559838787, 0.43602776288, 1.26251943739 0
1.17966429326, 0.65255029313, 0.59683015838 0
3.91702339483, 0.44503267930, -2.43146936168 0
-1.76746688225, 0.93772874989, -2.97845658452 0
-3.00859600132, 0.43182615019, 1.91186462147 0
-1.59509658896, 0.55959849984, 2.97402045801 0
2.25841116676, 0.44974467396, 2.83841008218 0
-17.48606161790, 0.68457757885, -1.68393916956 0
-13.37300525839, 0.34019129919, 1.49290501936 0
-0.66467212242, 0.32121977573, 2.07913328749 0
876.25080736031, 0.28233355038, -2.28588387762 1
42936.28956065520, 0.24207216321, 0.38677843531 49
28916.27664289024, 0.30818655567, 2.31786679792 33
12267.51130304434, 0.22391537159, 0.44529406066 14
CC 0.8258724478 0.1926826412 1 1
0.00000000000:dLOD:
PS C:\Users\pp\github\pukpr\GEMa\GeoEnergyMath\eqlong> ../io/backup 130_year_cal_amo_harm_nino34_relax_pdo_wow4_amo_try2_relax_pdo_lockt_relax_amo_lockt_relax1pt826
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Darwin
High frequency terms