name=['Neah Bay','Port Renfrew','Port Angeles', 'Victoria Harbour','Port Townsend', 'Bangor','Seattle',
'Tacoma', 'Cherry Point', 'Friday Harbor', 'Hanbury Point', 'Sidney', 'Fulford Harbour',
'Patos Island', 'Tsawwassen', 'Point Atkinson', 'Winchelsea Islands', 'Little River',
'Twin Islets', 'Campbell River', 'Seymour Narrows', 'Owen Bay', 'Big Bay', 'Chatham Point',
'Yorke Island', 'Alert Bay', 'Port Hardy', 'Montagu Point', 'Siwash Bay', 'Winter Harbour',
'Bella Bella', 'Tofino']
lons=np.zeros(nstn); lats=np.zeros(nstn)
K1amp = np.zeros(nstn); Q1amp = np.zeros(nstn); O1amp = np.zeros(nstn); P1amp = np.zeros(nstn)
K1phase = np.zeros(nstn); Q1phase = np.zeros(nstn); O1phase = np.zeros(nstn); P1phase = np.zeros(nstn)
M2amp = np.zeros(nstn); N2amp = np.zeros(nstn); S2amp = np.zeros(nstn); K2amp = np.zeros(nstn)
M2phase = np.zeros(nstn); N2phase = np.zeros(nstn); S2phase = np.zeros(nstn); K2phase = np.zeros(nstn)
for i in range(nstn):
#Details
line = fp.readline()
lons[i] = round(float(line[1:10])-360,3)
lats[i] = round(float(line[11:18]),3)
#Diurnals
line = fp.readline()
values = line.split(' ')
diurnals = [round(float(e),2) for e in values if (e != '' and e != '\n')]
K1amp[i] = diurnals[6]
Q1amp[i] = diurnals[0]
O1amp[i] = diurnals[2]
P1amp[i] = diurnals[4]
K1phase[i] = diurnals[7]
Q1phase[i] = diurnals[1]
O1phase[i] = diurnals[3]
P1phase[i] = diurnals[5]
#Semi-diurnals
line = fp.readline()
values = line.split(' ')
semis = [float(e) for e in values if (e != '' and e != '\n')]
M2amp[i] = semis[2]
N2amp[i] = semis[0]
S2amp[i] = semis[4]
K2amp[i] = semis[6]
M2phase[i] = semis[3]
N2phase[i] = semis[1]
S2phase[i] = semis[5]
K2phase[i] = semis[7]