# imports
%matplotlib inline
import matplotlib.pyplot as plt
import numpy as np
from __future__ import division
M2_amp_obs_SoG = 0.902
pha_diff = {'ene': 86,
'wHoll': 87,
'llap': 87,
'wslip': 87,
'TS4': 86,
'smooth': 58,
'downto2': 82,
'downto5': 83,
'weaklog': 89,
'd10': 85,
'u20': 86,
'topog1': 80,
'base': 91,
'stronglog': 101,
'secondlog': 96,
'sticky': 90,
'deep' : 55,
'deep_fric': 83,
'GmO': 75,
'GmO_TS5': 81,
'GmO_TS6': 81,
'GmO_TS7': 77,
'GmO_TS8': 74,
'GmO_TS9': 75,
'GmO_TS10': 76}
amp = {'ene': 0.25,
'wHoll': 0.255,
'llap': 0.29,
'wslip': 0.27,
'TS4': 0.26,
'smooth': 0.18,
'downto2': 0.24,
'downto5': 0.24,
'weaklog': 0.3,
'd10': 0.255,
'u20': 0.26,
'topog1': 0.28,
'base': 0.33,
'stronglog': 0.49,
'secondlog': 0.39,
'sticky': 0.40,
'deep': 0.19,
'deep_fric': 0.34,
'GmO': 0.36,
'GmO_TS5': 0.40,
'GmO_TS6': 0.40,
'GmO_TS7': 0.37,
'GmO_TS8': 0.34,
'GmO_TS9': 0.35,
'GmO_TS10': 0.36}
bathymetry2 = ('llap', 'downto5', 'downto2', 'stronglog', 'weaklog', 'wslip', 'secondlog', 'base')
count = 0
fig, ax = plt.subplots(1,1,figsize=(18, 4.5))
for key in pha_diff:
count += 1
if count <= 7:
symbol = 'o'
elif count <=14:
symbol = '^'
elif count <=21:
symbol = '>'
else:
symbol = '<'
ax.plot(pha_diff[key], amp[key], symbol, label=key)
ax.plot(75,0.37,'s',label='Obs')
ax.plot(92,0.33,'*',label='corr15')
ax.set_xlim((33,105))
ax.legend(loc='upper left')
ax.set_ylabel('Amplitude at Victoria (m)')
ax.set_xlabel('Phase difference Victoria to Pt Atkinson (deg)')
<matplotlib.text.Text at 0x7fd3748cf828>
print (pha_diff['GmO'] + pha_diff['downto2'] - pha_diff['TS4'], 75, pha_diff['GmO_TS6']
)
print (amp['GmO'] + amp['downto2'] - amp['TS4'], 0.37, amp['GmO_TS6']
)
71 75 81 0.33999999999999997 0.37 0.4
fig, ax = plt.subplots(1,1,figsize=(9,9))
for key in bathymetry2:
ax.plot(pha_diff[key], amp[key]/M2_amp_obs_SoG, symbol, label=key, markersize=10)
ax.plot(75,0.37/M2_amp_obs_SoG,'s',label='Obs', markersize=20)
ax.plot(92,0.33/M2_amp_obs_SoG,'o',label='Nowcast v1.0', markersize=15)
ax.set_xlim((55,105))
ax.tick_params(axis='x', labelsize=16)
ax.tick_params(axis='y', labelsize=16)
ax.legend(loc='upper left', fontsize=16)
ax.set_ylabel('Amplitude Ratio at Victoria to Pt Atkinson', fontsize=16)
ax.set_xlabel('Phase difference Victoria to Pt Atkinson (deg)', fontsize=16)
<matplotlib.text.Text at 0x7fe5c4e71160>
fig, ax = plt.subplots(1,1,figsize=(9,9))
for key in bathymetry2:
ax.plot(pha_diff[key], amp[key]/M2_amp_obs_SoG, '>b', markersize=10)
for key in ('smooth', 'sticky'):
ax.plot(pha_diff[key], amp[key]/M2_amp_obs_SoG, '>m', markersize=10)
for key in ('deep', 'deep_fric' ):
ax.plot(pha_diff[key], amp[key]/M2_amp_obs_SoG, '>y', markersize=10)
ax.plot(pha_diff['GmO'], amp["GmO"]/M2_amp_obs_SoG, 'ro', markersize=15, label = 'New Bathymetry')
ax.plot(75,0.37/M2_amp_obs_SoG,'sg',label='Obs', markersize=20)
#ax.plot(92,0.33/M2_amp_obs_SoG,'or',label='Nowcast v1.0', markersize=15)
ax.set_xlim((53,105))
ax.tick_params(axis='x', labelsize=16)
ax.tick_params(axis='y', labelsize=16)
ax.legend(loc='upper left', fontsize=16)
ax.set_ylabel('Amplitude Ratio at Victoria to Pt Atkinson', fontsize=16)
ax.set_xlabel('Phase difference Victoria to Pt Atkinson (deg)', fontsize=16)
<matplotlib.text.Text at 0x7fe5c4d2c048>