Created
June 17, 2024 22:48
-
-
Save pukpr/3a3566b601a54da2724df9c29159ce16 to your computer and use it in GitHub Desktop.
Flat tidal factor series, 2nd-order multiply 1st to 2nd partition
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_Diff (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; | |
One : constant Long_Float := 1.0; | |
Partition : constant Integer := 7; -- 4 | |
begin | |
for I in Template'Range loop | |
Time := Template(I).Date + Ref_Time; | |
declare | |
TF1, TF2 : Long_Float := 0.0; | |
use Ada.Numerics.Long_Elementary_Functions; | |
begin | |
for J in Constituents'First .. Constituents'First + Partition loop | |
declare | |
L : Amp_Phase renames Constituents(J); | |
Freq : Long_Float := Year_Len / Periods(J); | |
begin | |
if Aliased_Period then | |
Freq := Long_Float'Remainder(Freq,One); | |
end if; | |
if Cos_Phase then | |
TF1 := TF1 + L.Amplitude*(Cos(2.0*Pi*Freq*Time + L.Phase)); | |
else | |
TF1 := TF1 + L.Amplitude*(Sin(2.0*Pi*Freq*Time + L.Phase)); | |
end if; | |
end; | |
end loop; | |
for J in Constituents'First + Partition+1 .. Constituents'Last loop | |
declare | |
L : Amp_Phase renames Constituents(J); | |
Freq : Long_Float := Year_Len / Periods(J); | |
begin | |
if Aliased_Period then | |
Freq := Long_Float'Remainder(Freq,One); | |
end if; | |
if Cos_Phase then | |
TF2 := TF2 + L.Amplitude*(Cos(2.0*Pi*Freq*Time + L.Phase)); | |
else | |
TF2 := TF2 + L.Amplitude*(Sin(2.0*Pi*Freq*Time + L.Phase)); | |
end if; | |
end; | |
end loop; | |
Res(I) := (Time, TF1 + TF2 + Scaling * TF1 * TF2 ); | |
end; | |
end loop; | |
return Res; | |
end Tide_Sum_Diff; | |
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 | |
Res1 : Data_Pairs := Template; | |
begin | |
Res1 := Tide_Sum_Diff (Template, Constituents, Periods, 0.0, Scaling, Cos_Phase, Year_Len, Integ); | |
return Res1; | |
end Tide_Sum; |
DTW=2
0.04751432582 :impA:
0.69533965873 :impB:
-0.24732679053 :impC:
-0.12415925709:delA:
0.54630974681:delB:
0.07630715158:asym:
0.86223151225:ann2:
0.20515566727:sem1:
-3.10609765275:sem2:
0.00001071614:year:
-0.23514696896:IR:
-0.02033889019 :mA:
-0.00112782455 :mP:
0.53820907670 :shiftT:
0.00342475582 :init:
---- Tidal ----
27.32166155400, -0.24765084353, 3.52534133612, 1, -100989, 2.45469629903300E-04
27.21222081500, -2.26689449562, 13.39098472780, 2, -176450, 1.28545337997778E-03
1095.17502233364, 0.24710055226, 43.47957729342, 3, 221741, 1.11386097667308E-04
346.61621461696, -0.48708750304, -2.02819369548, 4, -72132, 6.76207417772825E-04
173.30810730848, -1.82457129412, 0.88844753716, 5, -164311, 1.11111547537411E-03
13.63341568476, 0.11256551105, -5.81034509030, 6, -12, 1.27519604246483E-01
13.66083077700, -0.24758142574, 6.42509619401, 7, -178, 3.15871939013506E-01
13.60611040750, 5.24729789108, 6.54842290019, 8, 54645, 9.58491200982993E-03
27.55454988600, -11.29185537740, 6.89209769666, 9, -13287, 8.56318638745967E-02
13.77727494300, -0.13035522164, -7.56259874066, 10, -1073, 1.33918833558891E-02
9.18484996200, 0.73395546342, -7.95812726464, 11, 31558, 2.31839986620299E-03
-411.77898284155, -1.85341313369, -2.62811756496, 12, -905236, 2.04766297227512E-04
27.09267692660, -0.29911847723, -27.87442532392, 13, -6281, 4.83927513690709E-03
-205.88949142077, -4.91234274322, 3.14541777530, 14, -714462, 6.87654380550233E-04
13.69115772864, 0.40680752259, 8.09594126967, 15, 13413, 3.01043583430323E-03
9.10846048884, -0.34835352761, 1.77486254421, 16, -12151, 2.89054775186580E-03
27.44323926226, 0.66627834776, 8.64947651345, 17, 14571, 4.54141318361147E-03
27.66676714572, 0.47543495666, -0.81842117436, 18, 6439, 7.27116136581422E-03
2190.35004466729, -0.35901721425, -2.70545748506, 19, -65652, 5.47685143901565E-04
26.87829334283, -0.14033569845, -2.11492180810, 20, -16182, 8.72627621787433E-04
---- LTE ----
-0.01481311701 :trend:
0.00012832258 :accel:
0.65143385499 :K0:
28.58773051618 :level:
-0.73863631974, 0.12433814052, -1.38839929168 7
-0.09953911566, 1.20043537023, -0.33298232101 1
-16.02579762125, 0.12351786285, 2.19778748706 161
-24.88477891498, 0.22548001713, 2.77503206802 250
-22.49584013915, 0.31487345189, -0.05528844696 226
-29.86173469798, 0.46161303591, -0.69012824464 300
-11.64607653221, 0.24285926052, 2.33998849083 117
-28.16956973176, 0.31487879447, 1.93472188900 283
-15.22948469597, 0.09092641585, -0.56428908579 153
-17.41934524049, 0.23258994434, -0.73191378014 175
-19.11151020671, 0.24026291577, -0.74442508047 192
-9.35667687203, 0.31490519831, -0.52830027288 94
-27.47279592214, 0.26644651750, -1.73223032183 276
DTW 0.6041530471 0.7440587325 4 1
PS C:\Users\pp\scratch\anom\run> $env:NUMBER_OF_PROCESSORS="8"
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CCbaddlowC
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
CC 0.7000723999 0.7864511444 4 1
PS C:\Users\pp\scratch\anom\run> ..\backup bi_pdo_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc
DTW=2
![image](https://private-user-images.githubusercontent.com/2855758/344875228-bc894cbc-bf10-42aa-aabe-9ebdcb58e174.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNDkzODMsIm5iZiI6MTcyMTE0OTA4MywicGF0aCI6Ii8yODU1NzU4LzM0NDg3NTIyOC1iYzg5NGNiYy1iZjEwLTQyYWEtYWFiZS05ZWJkY2I1OGUxNzQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTZUMTY1ODAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NWYwMGExOGE1ZDIyYWUyYjE5ODA2OGY2YjdkYzkxOWU0ZWZjNjcyNTkxZDUxZmI5OTAyMDkzZTZhMzNjYWRhMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.bCNM6hTvBovY_OGAc_KdMzfmS6-wEMUrIvqp_CVfS9s)
CC 0.3449892362 0.6615500558 1 1
PS C:\Users\pp\scratch\anom\run> ..\backup bi_nino34_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc1925-1975
OOB fitting, overnight
![image](https://private-user-images.githubusercontent.com/2855758/345040868-be90052b-0372-4bac-a6f3-e7163b9aedcb.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjExNDkzODMsIm5iZiI6MTcyMTE0OTA4MywicGF0aCI6Ii8yODU1NzU4LzM0NTA0MDg2OC1iZTkwMDUyYi0wMzcyLTRiYWMtYTZmMy1lNzE2M2I5YWVkY2IucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDcxNiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA3MTZUMTY1ODAzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGRlYzcwYzgwN2ZiYjY1OWViNDdmODU5YzQ3YmNlYmYyOGNhOWNmNmYzZGJlNDA2M2U3M2Q4NmNmYjUyM2VhNSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.ir3opXhMu8Otiz2Qplc_dovl-uU9gewn6rtcpvC3cKY)
Catchup mode enabled:TRUE
DTW 0.3497708088 0.7833486274 7 1
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1925-1975dtwovernight
CC 0.3373306217 0.6696784523 2 1
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CC
CC 0.5237065149 0.7053132280 4 1
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CCb
Status: 6 2 0.72212 0.58436 # 420
CC 0.6223586070 0.7225484490 3 1
PS C:\Users\pp\scratch\anom\run> notepad .\enso_opt.exe.par
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CCbaddlow
Status: 1 2 0.74453 0.60310 # 5180
CC 0.6029037634 0.7445557778 1 1
PS C:\Users\pp\scratch\anom\run> notepad .\enso_opt.exe.resp
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CCbaddlowA
DTW 0.6127694706 0.7446280862 1 1
PS C:\Users\pp\scratch\anom\run> ./ev
Name Value
CLIMATE_INDEX .\soi_darwin_avg_1880.dat
DTW 2
FIX FALSE
LOCKT false
MODULATION true
NLOOPS 20
PART true
TIMEOUT 9999999.0
TRIGGER 0.65
PS C:\Users\pp\scratch\anom\run> ..\backup bi_darwin_overfit_harm721c-1920-1980excl-dtw1fixharm_mod-overnight4aWOW1dtwccDTW_noharm1hi1cc-1940-1945CCbaddlowB