from __future__ import print_function
from matplotlib import pyplot as plt
import netCDF4
%matplotlib inline
D = netCDF4.Dataset('aggregated.nc', 'r')
print('ATTRIBUTES')
for k, v in vars(D).items():
print(' {}'.format(k))
print(' {}\n'.format(v.replace('\n', '\n ')))
print('VARIABLES')
for k, v in D.variables.items():
print(' {} ({})'.format(k, v.unit))
print(' {}\n'.format(v.description.replace('\n', '\n ')))
x = D.variables['x']
y = D.variables['y']
h = D.variables['height']
s = D.variables['spatial_frequency']
plt.figure()
plt.scatter(x[:]*.001, y[:]*.001, c=h[:], lw=0, s=5, cmap='viridis')
plt.axis('equal')
plt.xlabel('{} (k{})'.format(x.name, x.unit))
plt.ylabel('{} (k{})'.format(y.name, y.unit))
plt.figure()
plt.scatter(h, s, s=1, alpha=.3, color='k')
plt.xlabel('{} ({})'.format(h.name, h.unit))
plt.ylabel('{} ({})'.format(s.name, s.unit))
D.close()
import pandas as pd
data = pd.read_csv('points.csv', delimiter=',')
data.head()
data.describe()
Water depth (m +LAT)
plt.figure()
plt.scatter(data.x, data.y, c=data.depth, s=1, vmin=-50, vmax=0)
plt.axis('equal')
Sand wave height (m)
plt.figure()
plt.scatter(data.x, data.y, c=data.height, s=1, vmin=0, vmax=10)
plt.axis('equal')
Sand wave length (m)
plt.figure()
plt.scatter(data.x, data.y, c=data.length, s=1, vmin=100, vmax=1000)
plt.axis('equal')
Sand wave asymmetry (see paper for definition)
plt.figure()
plt.scatter(data.x, data.y, c=data.asymmetry, s=1, vmin=-2, vmax=2)
plt.axis('equal')
Slope of the lee side of sand waves (deg from horizontal)
plt.figure()
plt.scatter(data.x, data.y, c=data.leeslope, s=1, vmin=0, vmax=4)
plt.axis('equal')