Loading point data

In [1]:
from __future__ import print_function
from matplotlib import pyplot as plt
import netCDF4
%matplotlib inline

Open the netCDF file

In [2]:
D = netCDF4.Dataset('aggregated.nc', 'r')
In [3]:
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    ')))
ATTRIBUTES
  author
    J.M. Damen

  description
    Data points as used in: 
    Spatially varying environmental properties controlling observed sand wave morphology
    J. M. Damen, T. A. G. P. van Dijk and S. J. M. H. Hulscher
    Journal of Geophysical Research: Earth Surface

  contact
    mail@johndamen.nl

  publicationDOI
    doi: 10.1002/2017JF004322

  history
    Created 2017/04/10
    Modified 2018/01/31

VARIABLES
  x (m)
    horizontal position in wgs 84 / utm zone 31n

  y (m)
    vertical position in wgs 84 / utm zone 31n

  height (m)
    significant sand wave height

  length (m)
    mean sand wave length

  spatial_frequency (m^-1)
    mean spatial frequency of sand waves (1/L)

  asymmetry (-)
    mean sand wave asymmetry

  depth (m (-LAT))
    water depth

  grainsize (m 1e-6)
    median grain size

  M2_amplitude (m/s)
    tidal M2 amplitude from ZUNO velocity data decomposed using ttide

  peak_velocity_difference (-)
    difference between max ebb and flood velocity from ZUNO velocity data

  surface_wave_height (m)
    99th percentile of significant surface wave heights for a year

  Rouse (-)
    Rouse numbers

  shields_tide (-)
    Shields parameter based on the tidal flow velocity

  shields_surface_waves (-)
    Shields parameter based on the surface wave height and linear wave theory

  scaled_transport (-)
    Residual sediment transport perpendicular to the sand waves, normalized using the tidal velocity amplitude

Load the variables

In [4]:
x = D.variables['x']
y = D.variables['y']
h = D.variables['height']
s = D.variables['spatial_frequency']

Plot the sand wave height

In [5]:
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))
Out[5]:
<matplotlib.text.Text at 0x10d1f52e8>

Plot the sand wave height and frequency

In [6]:
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))
Out[6]:
<matplotlib.text.Text at 0x1108656d8>
In [7]:
D.close()

Open the points file

In [8]:
import pandas as pd
In [9]:
data = pd.read_csv('points.csv', delimiter=',')
In [10]:
data.head()
Out[10]:
x y height length asymmetry depth leeslope
0 440011.56 5705233.20 0.89 94.99 -1.10 -42.85 2.15
1 440063.49 5705292.81 0.86 213.73 0.69 -42.67 0.69
2 440290.44 5705577.40 1.13 474.95 2.20 -42.25 1.37
3 440332.76 5705613.94 0.96 522.44 2.30 -41.94 1.16
4 440384.69 5705673.55 0.97 569.94 1.95 -41.72 0.78
In [11]:
data.describe()
Out[11]:
x y height length asymmetry depth leeslope
count 1.571129e+06 1.571129e+06 1.571124e+06 1.571129e+06 1.571129e+06 1.571129e+06 1.571124e+06
mean 5.243819e+05 5.787959e+06 2.972618e+00 3.157009e+02 4.685818e-01 -3.098313e+01 2.211624e+00
std 3.429223e+04 4.909510e+04 1.540324e+00 2.309650e+02 8.515546e-01 5.768340e+00 2.163119e+01
min 4.400038e+05 5.700002e+06 8.000000e-01 3.310000e+00 -5.890000e+00 -1.687900e+02 -2.072150e+04
25% 5.015780e+05 5.749064e+06 1.820000e+00 1.829600e+02 0.000000e+00 -3.480000e+01 1.410000e+00
50% 5.211321e+05 5.781690e+06 2.650000e+00 2.558400e+02 5.600000e-01 -3.102000e+01 2.130000e+00
75% 5.449360e+05 5.821686e+06 3.800000e+00 3.646500e+02 1.030000e+00 -2.748000e+01 2.830000e+00
max 6.999765e+05 5.950000e+06 1.407100e+02 1.999940e+03 5.780000e+00 -1.000000e+01 6.259110e+03

Depth

Water depth (m +LAT)

In [12]:
plt.figure()
plt.scatter(data.x, data.y, c=data.depth, s=1, vmin=-50, vmax=0)
plt.axis('equal')
Out[12]:
(427005.1118572281, 712975.11814277188, 5687501.7629705658, 5962499.8870294327)

Height

Sand wave height (m)

In [13]:
plt.figure()
plt.scatter(data.x, data.y, c=data.height, s=1, vmin=0, vmax=10)
plt.axis('equal')
Out[13]:
(427005.1118572281, 712975.11814277188, 5687501.7629705658, 5962499.8870294327)

Length

Sand wave length (m)

In [14]:
plt.figure()
plt.scatter(data.x, data.y, c=data.length, s=1, vmin=100, vmax=1000)
plt.axis('equal')
Out[14]:
(427005.1118572281, 712975.11814277188, 5687501.7629705658, 5962499.8870294327)

Asymmetry

Sand wave asymmetry (see paper for definition)

In [15]:
plt.figure()
plt.scatter(data.x, data.y, c=data.asymmetry, s=1, vmin=-2, vmax=2)
plt.axis('equal')
Out[15]:
(427005.1118572281, 712975.11814277188, 5687501.7629705658, 5962499.8870294327)

Lee slope

Slope of the lee side of sand waves (deg from horizontal)

In [16]:
plt.figure()
plt.scatter(data.x, data.y, c=data.leeslope, s=1, vmin=0, vmax=4)
plt.axis('equal')
Out[16]:
(427005.1118572281, 712975.11814277188, 5687501.7629705658, 5962499.8870294327)
In [ ]: