Merge remote-tracking branch 'sydney-tides/master'
commit
1aad09b27a
@ -0,0 +1,132 @@
|
|||||||
|
Noofjobs 1 &fd1985-2012
|
||||||
|
(I4,7X,24F5.2)
|
||||||
|
(1X///I3,I4,3X,24F5.2)
|
||||||
|
(2I5,12(F6.4,F5.2))
|
||||||
|
1.0 1
|
||||||
|
Port A0 .995year##vday%%%fstd%%%endd***doc112oth 0step 10 .9622 ?
|
||||||
|
AUSTRALIA, EAST COAST - SYDNEY (FORT DENISON) 4335115114 -1000 60370
|
||||||
|
1 0.0410686 0.0400 44.3373 sa
|
||||||
|
2 0.0821373 0.0233 140.8642 ssa
|
||||||
|
3 0.5443747 0.0022 163.3925 Mm
|
||||||
|
4 1.0158958 0.0019 73.4003 Msf
|
||||||
|
5 1.0980331 0.0025 203.8471 Mf
|
||||||
|
6 12.8542862 0.0036 9.8664 2Q1
|
||||||
|
7 12.9271398 0.0043 16.6066 SIGMA1
|
||||||
|
8 13.3986609 0.0230 52.3723 Q1
|
||||||
|
9 13.4715145 0.0043 55.9113 RHO1
|
||||||
|
10 13.9430356 0.0963 79.6431 O1
|
||||||
|
11 14.0251729 0.0010 45.9175 MP1
|
||||||
|
12 14.4920521 0.0044 99.5325 M1
|
||||||
|
13 14.5695476 0.0013 102.4847 CHI1
|
||||||
|
14 14.9178647 0.0028 125.9361 PI1
|
||||||
|
15 14.9589314 0.0439 115.4037 P1
|
||||||
|
16 15.0000000 0.0033 129.8967 S1
|
||||||
|
17 15.0410686 0.1480 119.6599 K1
|
||||||
|
18 15.0821353 0.0020 11.0025 PSI1
|
||||||
|
19 15.1232059 0.0015 103.8567 PHI1
|
||||||
|
20 15.5125897 0.0017 137.3796 THETA1
|
||||||
|
21 15.5854433 0.0096 142.7051 J1
|
||||||
|
22 16.0569644 0.0017 173.2765 SO1
|
||||||
|
23 16.1391017 0.0062 180.0375 OO1
|
||||||
|
24 27.3416964 0.0006 75.4143 OQ2
|
||||||
|
25 27.4238337 0.0061 193.1893 MNS2
|
||||||
|
26 27.8953548 0.0205 199.6233 2N2
|
||||||
|
27 27.9682084 0.0210 212.8684 MEU2
|
||||||
|
28 28.4397295 0.1127 223.5144 N2
|
||||||
|
29 28.5125831 0.0206 223.5377 NEU2
|
||||||
|
30 28.9019669 0.0024 128.4082 OP2
|
||||||
|
31 28.9841042 0.5022 237.0610 M2
|
||||||
|
32 29.0662415 0.0014 313.3572 MKS2
|
||||||
|
33 29.4556253 0.0058 224.4572 LAMDA2
|
||||||
|
34 29.5284789 0.0135 243.1576 L2
|
||||||
|
35 29.9589333 0.0073 281.2802 T2
|
||||||
|
36 30.0000000 0.1247 260.7625 S2
|
||||||
|
37 30.0410667 0.0022 206.1633 R2
|
||||||
|
38 30.0821373 0.0373 250.3219 K2
|
||||||
|
39 30.5443747 0.0016 124.3870 MSN2
|
||||||
|
40 30.6265120 0.0023 62.9849 KJ2
|
||||||
|
41 31.0158958 0.0019 145.4123 2SM2
|
||||||
|
42 42.9271398 0.0004 148.6540 MO3
|
||||||
|
43 43.4761563 0.0023 327.5370 M3
|
||||||
|
44 43.9430356 0.0002 307.6915 SO3
|
||||||
|
45 44.0251729 0.0005 248.2678 MK3
|
||||||
|
46 45.0410686 0.0016 113.2852 SK3
|
||||||
|
47 57.4238337 0.0010 90.6269 MN4
|
||||||
|
48 57.9682084 0.0031 114.2894 M4
|
||||||
|
49 58.4397295 0.0003 103.5135 SN4
|
||||||
|
50 58.9841042 0.0014 183.7788 MS4
|
||||||
|
51 59.0662415 0.0004 196.3685 MK4
|
||||||
|
52 60.0000000 0.0006 299.9646 S4
|
||||||
|
53 60.0821373 0.0002 45.1703 SK4
|
||||||
|
54 86.4079380 0.0009 6.8059 2MN6
|
||||||
|
55 86.9523127 0.0020 52.2368 M6
|
||||||
|
56 87.4238337 0.0007 64.4301 MSN6
|
||||||
|
57 87.9682084 0.0025 114.6867 2MS6
|
||||||
|
58 88.0503457 0.0007 131.3720 2MK6
|
||||||
|
59 88.9841042 0.0003 157.8974 2SM6
|
||||||
|
60 89.0662415 0.0003 204.7339 MSK6
|
||||||
|
61 26.4079379 0.0003 1.3443 2MN2S2
|
||||||
|
62 26.8701753 0.0005 3.6145 3M(SK)2
|
||||||
|
63 26.9523127 0.0008 78.7665 3M2S2
|
||||||
|
64 27.5059710 0.0001 225.5560 MNK2S2
|
||||||
|
65 28.3575922 0.0003 218.9001 SNK2
|
||||||
|
66 29.9178627 0.0011 321.0943 2SK2
|
||||||
|
68 42.3827651 0.0004 43.8537 MQ3
|
||||||
|
69 43.0092770 0.0001 134.0684 2MP3
|
||||||
|
70 44.5695475 0.0001 329.7593 2MQ3
|
||||||
|
71 56.8701754 0.0000 39.7310 3MK4
|
||||||
|
72 56.9523127 0.0001 97.9154 3MS4
|
||||||
|
73 57.8860711 0.0002 283.9222 2MSK4
|
||||||
|
74 71.9112441 0.0002 182.3575 3MK5
|
||||||
|
75 72.4602605 0.0000 24.2117 M5
|
||||||
|
76 73.0092771 0.0005 264.7303 3MO5
|
||||||
|
77 84.8476674 0.0000 129.7631 2(MN)S6
|
||||||
|
78 85.3920422 0.0001 260.1927 3MNS6
|
||||||
|
79 85.8542795 0.0001 332.2482 4MK6
|
||||||
|
80 85.9364168 0.0001 249.9087 4MS6
|
||||||
|
81 86.3258006 0.0000 280.3885 2MSNK6
|
||||||
|
82 86.4807915 0.0003 28.4884 2MNU6
|
||||||
|
83 86.8701754 0.0001 222.0912 3MSK6
|
||||||
|
84 87.4966873 0.0003 292.3403 4MN6
|
||||||
|
85 88.5125832 0.0006 338.3166 3MSN6
|
||||||
|
86 88.5947204 0.0001 176.1921 MKL6
|
||||||
|
87 114.8476674 0.0001 219.9735 2MN8
|
||||||
|
88 115.3920422 0.0002 245.3801 3MN8
|
||||||
|
89 115.9364168 0.0002 284.0175 M8
|
||||||
|
90 116.4079379 0.0002 203.8838 2MSN8
|
||||||
|
91 116.9523127 0.0001 280.4660 3MS8
|
||||||
|
92 117.0344500 0.0001 286.3325 3MK8
|
||||||
|
93 117.5059710 0.0000 219.0404 MSNK8
|
||||||
|
94 117.9682084 0.0002 188.3974 2MS8
|
||||||
|
95 118.0503457 0.0001 195.8549 2MSK8
|
||||||
|
96 145.9364168 0.0002 293.7057 4MS10
|
||||||
|
97 146.9523127 0.0002 307.5005 3M2S10
|
||||||
|
98 174.3761463 0.0001 110.9933 4MSN12
|
||||||
|
99 174.9205210 0.0000 180.6601 5MS12
|
||||||
|
100 175.9364168 0.0000 108.7910 4M2S12
|
||||||
|
101 44.9589314 0.0019 112.6443 SP3
|
||||||
|
102 45.0000000 0.0012 23.4633 S3
|
||||||
|
103 28.9430375 0.0039 117.2716 MA2
|
||||||
|
104 29.0251709 0.0027 150.6304 Ma2
|
||||||
|
105 30.4715211 0.0000 98.7180 MSV2
|
||||||
|
106 31.0980331 0.0008 156.4092 SKM2
|
||||||
|
107 56.4079380 0.0001 26.7109 2MNS4
|
||||||
|
108 57.4966873 0.0003 94.1175 MV4
|
||||||
|
109 58.5125832 0.0003 339.4208 3MN4
|
||||||
|
110 59.5284789 0.0001 264.4342 2MSN4
|
||||||
|
111 28.3986628 0.0004 16.9727 NA2
|
||||||
|
113 72.9271398 0.0001 247.7639 MSO5
|
||||||
|
114 74.0251729 0.0002 189.3859 MSK5
|
||||||
|
116 0.0000000 0.9952 0.0000 A0
|
||||||
|
FORT DENISON - 1985 TO 2012 ANALYSIS Time zone -1000
|
||||||
|
Hourly sea levels in metres from 1-Jan-1985 to 31-Dec-2012
|
||||||
|
There are 46 gaps of 24(9),11,8,22(3),95,1,1,23,49,4,7,48,27,38,13,21,48,
|
||||||
|
98,125,75,25,27,23,67,96,98,96,20,28,121,7,17,26,1047,25 and 51 hours
|
||||||
|
Analysis of 24-Jun-13 for 112 constituents on 10113 days of data
|
||||||
|
Sa and Ssa from a long period analysis (96.7 years) of Fort Denison (1914-2012)
|
||||||
|
(1985-2012 analysis gave Sa=0.0384/59.5695 and Ssa=0.0191/143.8045)
|
||||||
|
Sample Correlation Coefficient is 0.9767
|
||||||
|
Standard Devn of the Residuals is 0.0877
|
||||||
|
Zero Frequency Level is 0.9622m above TGZ, which is 6.647m below PM 101
|
||||||
|
For 2015 predictions use Zero Frequency Level plus 16.5 years x 2.0mm/year trend
|
||||||
|
Mean sea level is 0.995m above tide gauge zero for 2015 predictions
|
@ -0,0 +1,262 @@
|
|||||||
|
import datetime
|
||||||
|
import time
|
||||||
|
import math
|
||||||
|
|
||||||
|
# Brett Miller 9th October 2015.
|
||||||
|
# This program reads Harmonics for Fort Denison as provided by BOM on the 9th October 2015
|
||||||
|
#
|
||||||
|
# NOT FOR DISTRIBUTION
|
||||||
|
# the predictions from this code have been cross checked against some daily predictions but
|
||||||
|
# not against all.
|
||||||
|
# USE AT YOUR OWN CAUTION. NO GAURENTEE MADE THAT THESE PREDICTIONS ARE CORRECT.
|
||||||
|
#
|
||||||
|
# The x-tide method for calculating tides is:-
|
||||||
|
# z(t,y,site)= MWL(site) + sum[c=1,N](nodefactor(c,y).amp(c,site).cos( speed(c).t + eqarg(c,y) - kappa(c,site) ))
|
||||||
|
# where
|
||||||
|
# t is the time since the beginning of the year
|
||||||
|
# y is the year
|
||||||
|
# site is the site of interest
|
||||||
|
# N is the number of consituents being included
|
||||||
|
# nodefactor is an amplitude adjustment for each constituent for each year
|
||||||
|
# eqarg is a phase adjustment for each site for each year
|
||||||
|
# amp is the amplitude of each constituent for the site
|
||||||
|
# kappa is the phase adjustment for each constituent for the site
|
||||||
|
#
|
||||||
|
# the harmonics included below in the python code were provided directly to WRL from BOM.
|
||||||
|
|
||||||
|
START_TIME = '2020-01-01'
|
||||||
|
END_TIME = '2020-12-31'
|
||||||
|
OUTPUT_NAME = 'levels.csv'
|
||||||
|
MSL = 0.9952
|
||||||
|
|
||||||
|
harm = {}
|
||||||
|
speed = 0
|
||||||
|
amp = 1
|
||||||
|
lag = 2
|
||||||
|
|
||||||
|
|
||||||
|
def readlinenocomm(F):
|
||||||
|
l = F.readline()
|
||||||
|
while l[0] == '#':
|
||||||
|
l = F.readline()
|
||||||
|
return l
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
H = open("HARMONIC", "r")
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
numconstits = int(l)
|
||||||
|
|
||||||
|
print("Number of Constituents = ", numconstits)
|
||||||
|
|
||||||
|
# Read in the constituent speeds
|
||||||
|
|
||||||
|
constitspeed = {}
|
||||||
|
i = 0
|
||||||
|
while i < numconstits:
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
ll = l.split()
|
||||||
|
constitspeed[ll[0]] = float(ll[1])
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
sy = int(l)
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
numyears = int(l)
|
||||||
|
|
||||||
|
# Read in the equalibrium arguements
|
||||||
|
|
||||||
|
equalibrium_arg = {}
|
||||||
|
i = 0
|
||||||
|
while i < numconstits:
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
ll = l.split()
|
||||||
|
constit = ll[0]
|
||||||
|
v = []
|
||||||
|
j = 0
|
||||||
|
while j <= numyears / 10:
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
ll = l.split()
|
||||||
|
for lll in ll:
|
||||||
|
v.append(float(lll))
|
||||||
|
j = j + 1
|
||||||
|
equalibrium_arg[constit] = v
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
if l[0:5] != '*END*':
|
||||||
|
print("Error, expected end after eq args. Got: ", l)
|
||||||
|
|
||||||
|
# Read in the node factors
|
||||||
|
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
numyears = int(l)
|
||||||
|
|
||||||
|
node_factor = {}
|
||||||
|
i = 0
|
||||||
|
while i < numconstits:
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
ll = l.split()
|
||||||
|
constit = ll[0]
|
||||||
|
v = []
|
||||||
|
j = 0
|
||||||
|
while j <= numyears / 10:
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
ll = l.split()
|
||||||
|
for lll in ll:
|
||||||
|
v.append(float(lll))
|
||||||
|
j = j + 1
|
||||||
|
node_factor[constit] = v
|
||||||
|
i = i + 1
|
||||||
|
|
||||||
|
l = readlinenocomm(H)
|
||||||
|
if l[0:5] != '*END*':
|
||||||
|
print("Error, expected end after node factors. Got: ", l)
|
||||||
|
|
||||||
|
harm['sa'] = [0.0410686, 0.04, 44.3373]
|
||||||
|
harm['ssa'] = [0.0821373, 0.0233, 140.8642]
|
||||||
|
harm['Mm'] = [0.5443747, 0.0022, 163.3925]
|
||||||
|
harm['MSF'] = [1.0158958, 0.0019, 73.4003]
|
||||||
|
harm['MF'] = [1.0980331, 0.0025, 203.8471]
|
||||||
|
harm['2Q1'] = [12.8542862, 0.0036, 9.8664]
|
||||||
|
harm['SIGMA1'] = [12.9271398, 0.0043, 16.6066]
|
||||||
|
harm['Q1'] = [13.3986609, 0.023, 52.3723]
|
||||||
|
harm['RHO1'] = [13.4715145, 0.0043, 55.9113]
|
||||||
|
harm['O1'] = [13.9430356, 0.0963, 79.6431]
|
||||||
|
harm['MP1'] = [14.0251729, 0.001, 45.9175]
|
||||||
|
harm['M1'] = [14.4920521, 0.0044, 99.5325]
|
||||||
|
harm['CHI1'] = [14.5695476, 0.0013, 102.4847]
|
||||||
|
harm['PI1'] = [14.9178647, 0.0028, 125.9361]
|
||||||
|
harm['P1'] = [14.9589314, 0.0439, 115.4037]
|
||||||
|
harm['S1'] = [15, 0.0033, 129.8967]
|
||||||
|
harm['K1'] = [15.0410686, 0.148, 119.6599]
|
||||||
|
harm['PSI1'] = [15.0821353, 0.002, 11.0025]
|
||||||
|
harm['PHI1'] = [15.1232059, 0.0015, 103.8567]
|
||||||
|
harm['THETA1'] = [15.5125897, 0.0017, 137.3796]
|
||||||
|
harm['J1'] = [15.5854433, 0.0096, 142.7051]
|
||||||
|
harm['SO1'] = [16.0569644, 0.0017, 173.2765]
|
||||||
|
harm['OO1'] = [16.1391017, 0.0062, 180.0375]
|
||||||
|
harm['OQ2'] = [27.3416964, 0.0006, 75.4143]
|
||||||
|
harm['MNS2'] = [27.4238337, 0.0061, 193.1893]
|
||||||
|
harm['2N2'] = [27.8953548, 0.0205, 199.6233]
|
||||||
|
harm['MEU2'] = [27.9682084, 0.021, 212.8684]
|
||||||
|
harm['N2'] = [28.4397295, 0.1127, 223.5144]
|
||||||
|
harm['NEU2'] = [28.5125831, 0.0206, 223.5377]
|
||||||
|
harm['OP2'] = [28.9019669, 0.0024, 128.4082]
|
||||||
|
harm['M2'] = [28.9841042, 0.5022, 237.061]
|
||||||
|
harm['MKS2'] = [29.0662415, 0.0014, 313.3572]
|
||||||
|
harm['LAMDA2'] = [29.4556253, 0.0058, 224.4572]
|
||||||
|
harm['L2'] = [29.5284789, 0.0135, 243.1576]
|
||||||
|
harm['T2'] = [29.9589333, 0.0073, 281.2802]
|
||||||
|
harm['S2'] = [30, 0.1247, 260.7625]
|
||||||
|
harm['R2'] = [30.0410667, 0.0022, 206.1633]
|
||||||
|
harm['K2'] = [30.0821373, 0.0373, 250.3219]
|
||||||
|
harm['MSN2'] = [30.5443747, 0.0016, 124.387]
|
||||||
|
harm['KJ2'] = [30.626512, 0.0023, 62.9849]
|
||||||
|
harm['2SM2'] = [31.0158958, 0.0019, 145.4123]
|
||||||
|
harm['MO3'] = [42.9271398, 0.0004, 148.654]
|
||||||
|
harm['M3'] = [43.4761563, 0.0023, 327.537]
|
||||||
|
harm['SO3'] = [43.9430356, 0.0002, 307.6915]
|
||||||
|
harm['MK3'] = [44.0251729, 0.0005, 248.2678]
|
||||||
|
harm['SK3'] = [45.0410686, 0.0016, 113.2852]
|
||||||
|
harm['MN4'] = [57.4238337, 0.001, 90.6269]
|
||||||
|
harm['M4'] = [57.9682084, 0.0031, 114.2894]
|
||||||
|
harm['SN4'] = [58.4397295, 0.0003, 103.5135]
|
||||||
|
harm['MS4'] = [58.9841042, 0.0014, 183.7788]
|
||||||
|
harm['MK4'] = [59.0662415, 0.0004, 196.3685]
|
||||||
|
harm['S4'] = [60, 0.0006, 299.9646]
|
||||||
|
harm['SK4'] = [60.0821373, 0.0002, 45.1703]
|
||||||
|
harm['2MN6'] = [86.407938, 0.0009, 6.8059]
|
||||||
|
harm['M6'] = [86.9523127, 0.002, 52.2368]
|
||||||
|
harm['MSN6'] = [87.4238337, 0.0007, 64.4301]
|
||||||
|
harm['2MS6'] = [87.9682084, 0.0025, 114.6867]
|
||||||
|
harm['2MK6'] = [88.0503457, 0.0007, 131.372]
|
||||||
|
harm['2SM6'] = [88.9841042, 0.0003, 157.8974]
|
||||||
|
harm['MSK6'] = [89.0662415, 0.0003, 204.7339]
|
||||||
|
harm['2MN2S2'] = [26.4079379, 0.0003, 1.3443]
|
||||||
|
harm['3M(SK)2'] = [26.8701753, 0.0005, 3.6145]
|
||||||
|
harm['3M2S2'] = [26.9523127, 0.0008, 78.7665]
|
||||||
|
harm['MNK2S2'] = [27.505971, 0.0001, 225.556]
|
||||||
|
harm['SNK2'] = [28.3575922, 0.0003, 218.9001]
|
||||||
|
harm['2SK2'] = [29.9178627, 0.0011, 321.0943]
|
||||||
|
harm['MQ3'] = [42.3827651, 0.0004, 43.8537]
|
||||||
|
harm['2MP3'] = [43.009277, 0.0001, 134.0684]
|
||||||
|
harm['2MQ3'] = [44.5695475, 0.0001, 329.7593]
|
||||||
|
harm['3MK4'] = [56.8701754, 0, 39.731]
|
||||||
|
harm['3MS4'] = [56.9523127, 0.0001, 97.9154]
|
||||||
|
harm['2MSK4'] = [57.8860711, 0.0002, 283.9222]
|
||||||
|
harm['3MK5'] = [71.9112441, 0.0002, 182.3575]
|
||||||
|
harm['M5'] = [72.4602605, 0, 24.2117]
|
||||||
|
harm['3MO5'] = [73.0092771, 0.0005, 264.7303]
|
||||||
|
harm['2(MN)S6'] = [84.8476674, 0, 129.7631]
|
||||||
|
harm['3MNS6'] = [85.3920422, 0.0001, 260.1927]
|
||||||
|
harm['4MK6'] = [85.8542795, 0.0001, 332.2482]
|
||||||
|
harm['4MS6'] = [85.9364168, 0.0001, 249.9087]
|
||||||
|
harm['2MSNK6'] = [86.3258006, 0, 280.3885]
|
||||||
|
harm['2MNU6'] = [86.4807915, 0.0003, 28.4884]
|
||||||
|
harm['3MSK6'] = [86.8701754, 0.0001, 222.0912]
|
||||||
|
harm['4MN6'] = [87.4966873, 0.0003, 292.3403]
|
||||||
|
harm['3MSN6'] = [88.5125832, 0.0006, 338.3166]
|
||||||
|
harm['MKL6'] = [88.5947204, 0.0001, 176.1921]
|
||||||
|
harm['2MN8'] = [114.8476674, 0.0001, 219.9735]
|
||||||
|
harm['3MN8'] = [115.3920422, 0.0002, 245.3801]
|
||||||
|
harm['M8'] = [115.9364168, 0.0002, 284.0175]
|
||||||
|
harm['2MSN8'] = [116.4079379, 0.0002, 203.8838]
|
||||||
|
harm['3MS8'] = [116.9523127, 0.0001, 280.466]
|
||||||
|
harm['3MK8'] = [117.03445, 0.0001, 286.3325]
|
||||||
|
harm['MSNK8'] = [117.505971, 0, 219.0404]
|
||||||
|
harm['2MS8'] = [117.9682084, 0.0002, 188.3974]
|
||||||
|
harm['2MSK8'] = [118.0503457, 0.0001, 195.8549]
|
||||||
|
harm['4MS10'] = [145.9364168, 0.0002, 293.7057]
|
||||||
|
harm['3M2S10'] = [146.9523127, 0.0002, 307.5005]
|
||||||
|
harm['4MSN12'] = [174.3761463, 0.0001, 110.9933]
|
||||||
|
harm['5MS12'] = [174.920521, 0, 180.6601]
|
||||||
|
harm['4M2S12'] = [175.9364168, 0, 108.791]
|
||||||
|
harm['SP3'] = [44.9589314, 0.0019, 112.6443]
|
||||||
|
harm['S3'] = [45, 0.0012, 23.4633]
|
||||||
|
harm['MA2'] = [28.9430375, 0.0039, 117.2716]
|
||||||
|
harm['Ma2'] = [29.0251709, 0.0027, 150.6304]
|
||||||
|
harm['MSV2'] = [30.4715211, 0, 98.718]
|
||||||
|
harm['SKM2'] = [31.0980331, 0.0008, 156.4092]
|
||||||
|
harm['2MNS4'] = [56.407938, 0.0001, 26.7109]
|
||||||
|
harm['MV4'] = [57.4966873, 0.0003, 94.1175]
|
||||||
|
harm['3MN4'] = [58.5125832, 0.0003, 339.4208]
|
||||||
|
harm['2MSN4'] = [59.5284789, 0.0001, 264.4342]
|
||||||
|
harm['NA2'] = [28.3986628, 0.0004, 16.9727]
|
||||||
|
harm['MSO5'] = [72.9271398, 0.0001, 247.7639]
|
||||||
|
harm['MSK5'] = [74.0251729, 0.0002, 189.3859]
|
||||||
|
|
||||||
|
# Now do the maths
|
||||||
|
|
||||||
|
start_time = datetime.datetime.strptime(START_TIME, '%Y-%m-%d')
|
||||||
|
end_time = datetime.datetime.strptime(END_TIME, '%Y-%m-%d')
|
||||||
|
|
||||||
|
time_step = datetime.timedelta(minutes=15)
|
||||||
|
|
||||||
|
x = []
|
||||||
|
y = []
|
||||||
|
F = open(OUTPUT_NAME, "w")
|
||||||
|
t = start_time
|
||||||
|
while (t < end_time):
|
||||||
|
offset = t - datetime.datetime(t.year, 1, 1, 0, 0, 0)
|
||||||
|
year_idx = t.year - sy
|
||||||
|
t1 = (offset.days) * 24.0 + offset.seconds / 3600.0
|
||||||
|
z = MSL
|
||||||
|
for constit in harm.keys():
|
||||||
|
if constit in node_factor:
|
||||||
|
nf = node_factor[constit][year_idx]
|
||||||
|
ea = equalibrium_arg[constit][year_idx]
|
||||||
|
else:
|
||||||
|
nf = 1.0
|
||||||
|
ea = 0.0
|
||||||
|
z = z + nf * harm[constit][amp] * math.cos(
|
||||||
|
(harm[constit][speed] * t1 + ea - harm[constit][lag]) *
|
||||||
|
(2 * 3.1415927 / 360.0))
|
||||||
|
|
||||||
|
# print t,z
|
||||||
|
F.write("%s,%s\n" % (t, z))
|
||||||
|
x.append(t)
|
||||||
|
y.append(z)
|
||||||
|
t = t + time_step
|
||||||
|
|
||||||
|
F.close()
|
Loading…
Reference in New Issue