You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

462 lines
215 KiB
Plaintext

{
"metadata": {
"name": "WAFO Chapter 1"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
"cell_type": "heading",
"level": 1,
"metadata": {},
"source": [
"CHAPTER 1 demonstrates some applications of WAFO"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"CHAPTER1 gives an overview through examples some of the capabilities of WAFO. WAFO is a toolbox of Matlab routines for statistical analysis and simulation of random waves and loads. The commands are edited for fast computation.\n"
]
},
{
"cell_type": "heading",
"level": 2,
"metadata": {},
"source": [
"Section 1.4 Some applications of WAFO"
]
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Section 1.4.1 Simulation from spectrum, estimation of spectrum "
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Simulation of the sea surface from spectrum. The following code generates 200 seconds of data sampled with 10Hz from the Torsethaugen spectrum."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import wafo.spectrum.models as wsm\n",
"S = wsm.Torsethaugen(Hm0=6, Tp=8);\n",
"S1 = S.tospecdata()\n",
"S1.plot()\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEXCAYAAABPkyhHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVNX/P/DXsLiwI7KJG4rihoKiiKGMW+5iWeaO28/6\nttr3U330W5ZtWi750ZZPWaaWn8xsMXMhNEVNS0MxNUshRUHccGMRWWbO74/7YRyUZWZg7hmY1/Px\n4AEzc+fOe444L845956rEUIIEBGRXXOQXQAREcnHMCAiIoYBERExDIiICAwDIiICw4CIiMAwICvS\narVYuXKl7DLsUlJSEpo1a2by9mr8W7m7uyM9Pd2qr0GWYxjUEW5ubnB3d4e7uzscHBzg4uJiuL1u\n3Tq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//PADAgMD0bZtWyQlJZnclu7u7li+fDnGjBmDRo0aYd26\ndYiLi7vnfZXHx8cHGzZswOzZs9G4cWOkpaUhJibG8Hh12i85ORk9e/aEu7s74uLisHz5csO5BcbP\nmz59Ok6cOAFvb288+OCDhvvj4+Nx/PhxDhFJoBGm9CuJbJher0ezZs3wxRdfIDY2VtXXdnBwQFpa\nmtnj/1S+jIwMtGvXDpcuXYKbm5vscuyK1DOMWrZsaRiKcHZ2NnSTiaqSmJiIHj16oGHDhli0aBEA\nVHtOgOTS6/VYsmQJxo0bxyCQQGoYaDQaJCUloVGjRjLLoFrol19+wfjx41FUVISOHTti48aNhmEi\nNfEs4JqRn58Pf39/BAcHIyEh
}
],
"prompt_number": 5
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"import wafo.objects as wo\n",
"xs = S1.sim(ns=2000, dt=0.1)\n",
"ts = wo.mat2timeseries(xs)\n",
"ts.plot_wave('-')\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAD9CAYAAABHnDf0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzsnXlYVdX6x78HxcwhzQlRVJwQEARE0RzymPM8VWqZpt5b\n3ZvVtTKzfsXhdh26Nlyzm02m3TTLMpwlNdlqDjkAoqDgAAqI84gTAuv3x9vmDOxzzp7OAKzP8/jI\n2WefvddZZ+/vftf7vutdBsYYA4fD4XAqFD6ebgCHw+Fw9IeLO4fD4VRAuLhzOBxOBYSLO4fD4VRA\nuLhzOBxOBYSLO4fD4VRAdBH34uJiREVFYdiwYXocjsPhcDga0UXcFyxYgNDQUBgMBj0Ox+FwOByN\naBb33NxcbNy4EX/5y1/A50NxOByOd6BZ3KdPn4758+fDx4e77zkcDsdbqKrlw+vXr0ejRo0QFRUF\nQRAk9+GuGg6Hw1GHFm+IJnN79+7dWLt2LVq2bInx48dj27ZtmDhxomQD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6Oh2vZk3r7UFB\n2sR940Zg9GjrbfXqUUVLPcVCiv/9D3jnHWDKFFrMwB624g6YH0BK8JQlmppKBaNGjKCYxl/+Qt9d\nCSdO0G8idc35+FB2iB6TdgRBwOjRJkRFmTB7dhxMJnWjDK1tUIKYuWZLSAjdf3fu6NIsWfz4IzBu\nnP33q1Qhd2p5cCt6lbhnZNCQZ+hQ6+316tEKSSdP6nOeoiIgPx9o2tTxfi1a6Ge5S+XNAtrE/eJF\n8tlLBeKaN9fm7nHGlSvA3r0U
}
],
"prompt_number": 6
},
{
"cell_type": "heading",
"level": 4,
"metadata": {},
"source": [
"Estimation of spectrum "
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"A common situation is that one wants to estimate the spectrum for wave measurements. The following code simulate 20 minutes signal sampled at 4Hz and compare the spectral estimate with the original Torsethaugen spectum.\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"clf()\n",
"Fs = 4; \n",
"xs = S1.sim(ns=fix(20 * 60 * Fs), dt=1. / Fs) \n",
"ts = wo.mat2timeseries(xs) \n",
"Sest = ts.tospecdata(L=400)\n",
"S1.plot()\n",
"Sest.plot('--')\n",
"axis([0, 3, 0, 5]) # This may depend on the simulation\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYMAAAEXCAYAAABPkyhHAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlcVPX6wPHPsMi+C8jmhoqiCLihhonlkhuWlqWWqNly\nb5t16/6y1ZbbZmVZN23V1Ba72mKWpi24ZqbiviGKyiIIiOzbzPn9MUEiKDPDcpiZ5/16zQs45zvn\nPMcj8/Bdj0ZRFAUhhBBWzUbtAIQQQqhPkoEQQghJBkIIISQZCCGEQJKBEEIIJBkIIYRAkoEQRpkx\nYwZPP/20QWVTU1OxsbFBp9M1WzyfffYZo0aNarbjC+shyUCoYuvWrQwePBhPT098fHyIjY1l165d\nzXrOjh078uuvvzbqGBqNBo1G00QRNd60adP46aefan62sbHh5MmTKkYkzJWd2gEI61NQUMC4ceN4\n//33mTx5MuXl5WzZsgUHB4dmPa9Go+Fqcyyrqqqws2v4V6K1z9Ns7fGJ1klqBqLFHT9+HI1Gw623\n3opGo8HR0ZERI0YQEREBwNKlS7nmmmt44IEH8PT0pEePHrX+or948SJ33nkngYGBBAcH8/TTT9dq\nivnwww8JDw/H3d2dnj17kpSUxB133MGZM2cYP348bm5uvP766zXNOJ988gkdOnRg+PDhANxyyy0E\nBATg6enJ0KFDOXz4sEHXpdPpePTRR/H19SU0NJQffvih1v6rxb106VJiY2N57LHH8Pb2pnPnzqxf\nv77mvUuXLiU0NBR3d3c6d+7M559/XrN9yJAhAFx77bUAREZG4u7uzldffUVERARr166tOU5lZSVt\n27Zl3759ht0sYT0UIVpYQUGB4uPjoyQkJCjr1q1T8vLyau1fsmSJYmdnp7z11ltKVVWVsnLlSsXD\nw0O5cOGCoiiKcuONNyr33nuvUlJSomRnZysDBgxQ3n//fUVRFOWrr75SgoKClF27dimKoignTpxQ\nTp8+rSiKonTs2FH55Zdfas5z6tQpRaPRKAkJCUpJSYlSVlZWc/6ioiKloqJCmTNnjhIVFVXznhkz\nZihPPfVUvde1aNEipXv37kpaWpqSl5enxMXFKTY2NopWq20w7iVLlij29vbKRx99pOh0OmXRokVK\nYGCgoiiKUlRUpLi7uyvHjx9XFEVRzp07pxw6dKjmfbGxsTUxaDQaJSUlpebn1157Tbn11ltrfv72\n22+V3r17G3CXhLWRZCBUceTIEWXGjBlKcHCwYmdnp8THxytZWVmKoug/4Ko/CKsNGDBAWb58uXLu\n3DnFwcFBKS0trdn3+eefK8OGDVMURVFGjhypLFy4sN5zXikZnDp16opxXrhwQdFoNEpBQYGiKFdP\nBsOGDav5cFcURdmwYYOi0WgUrVbbYNxLlixRunTpUrOvuLhY0Wg0SlZWllJUVKR4enoqq1evVkpK\nSmqds6FkkJ6erri6ui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6yPJwApcaY5BNV9ffcIQQlgvSQZWoKFmorZt4fz5lotHCNH6SDKwAg11IEvNQAghycAK\nSM1ACNEQSQZWoKEOZB8fuHABdLqWi0kI0bpIMrACDXUg29uDm5s+IQghrJMkAyvQUDMRSFORENZO\nkoGFU5SGm4lAOpGFsHaSDCxccbF+ZVInp6uXk5qBENZNkoGFM6RWAFIzEMLaSTKwcA11HleTmoEQ\n1k3VZKDVaomOjmb8+PFqhmHRDOk8BqkZCGHtVE0Gb7/9NuHh4Wg0GjXDsGjGNBNJzUAI66VaMkhL\nS+PHH39k9uzZKIqiVhgWT5qJhBCGsFPrxA8//DDz58+noKDgimXmzZtX831cXBxxcXHNH5iFkQ5k\nISxbYmIiiYmJjT6OKslg7dq1
}
],
"prompt_number": 7
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Section 1.4.2 Probability distributions of wave characteristics."
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Probability distribution of wave trough period: WAFO gives the possibility of computing the exact probability distributions for a number of characteristics given a spectral density. In the following example we study the trough period extracted from the time series and compared with the theoretical density computed with exact spectrum, S1, and the estimated spectrum, Sest.\n"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"clf()\n",
"import wafo.misc as wm\n",
"dtyex = S1.to_t_pdf(pdef='Tt', paramt=(0, 10, 51), nit=3)\n",
"dtyest = Sest.to_t_pdf(pdef='Tt', paramt=(0, 10, 51), nit=3)\n",
"\n",
"T, index = ts.wave_periods(vh=0, pdef='d2u')\n",
"bins = wm.good_bins(T, num_bins=25, odd=True)\n",
"wm.plot_histgrm(T, bins=bins, normed=True)\n",
"\n",
"dtyex.plot()\n",
"dtyest.plot('-.')\n",
"axis([0, 10, 0, 0.35])\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXsAAAEXCAYAAABMCOQqAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0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gpIsRdCCCsgxV4IIayAFHshhLACUuyFEMIKSLEX\nQggrIMVeCCGsgBR7IYSwAlLshRDCCkixF0IIKyDFXgghrIAUeyGEsAIPLfYRERH4+vrSqFEjZs+e\nXWD9pk2bCAwMJCgoiFatWrFr1y6j+wohhCgfGkVRlKJW6nQ6mjRpws6dO/Hw8KB169asXbsWPz8/\nfZuMjAzs7e0BOHbsGH369OHs2bNG9QXQaDQYiCDMkEYDpf0rM8UYQliz4tZOg3v20dHR+Pj44O3t\njVarZcCAAWzatClfm78LPcDt27epVauW0X2FEEKUDztDKxMTE/Hy8tK/9/T0ZP/+/QXabdy4kalT\np5KUlMT27duL1RdgxowZ+j+HhIQQEhJSnM8ghBAVXmRkJJGRkSXub7DYazQaowbp3bs3vXv3Zs+e\nPQwdOpRTp04VK8T9xV4IIURBD+4Iz5w5s1j9DR7G8fDwICEhQf8+ISEBT0/PItu3b9+enJwcbty4\ngaenZ7H6CiGEKDsGi31wcDBnzpwhPj6erKws1q9fT2hoaL42586d058kiImJAaBmzZpG9RVCCFE+\nDB7GsbOzY8GCBXTr1g2dTseoUaPw8/Nj8eLFAISHh7NhwwZWrlyJVqvFwcGBdevWGewrhBCi/Bmc\nelkuAWTqpcWRqZdCqM+kUy+F
}
],
"prompt_number": 8
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Section 1.4.3 Directional spectra"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Here are a few lines of code, which produce directional spectra with frequency independent and frequency dependent spreading."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"clf()\n",
"plotflag = 1\n",
"Nt = 101; # number of angles\n",
"th0 = pi / 2; # primary direction of waves\n",
"Sp = 15; # spreading parameter\n",
"\n",
"D1 = wsm.Spreading(type='cos', theta0=th0, method=None) # frequency independent\n",
"D12 = wsm.Spreading(type='cos', theta0=0, method='mitsuyasu') # frequency dependent\n",
"\n",
"SD1 = D1.tospecdata2d(S1)\n",
"SD12 = D12.tospecdata2d(S1)\n",
"SD1.plot()\n",
"SD12.plot()#linestyle='dashdot')\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAXwAAAEXCAYAAACu1P9TAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzs3Xd0VEX7wPHvbnbTe0IC6XQChN6lShMVVF5AkN5EBcGC\nBUUBRREpChYUX8QXFEX0JyCgIkoEFWkC0iGQ3kN62Wyb3x83LgmkLIGEkMznHI7sLTNzL8dnZ+fO\nfUYlhBBIkiRJtZ76djdAkiRJqh4y4EuSJNURMuBLkiTVETLgS5Ik1REy4EuSJNURMuBLkiTVETLg\nS1Xu8ccfZ/HixdVSV+vWrdm3b1+V1hEVFYVarcZsNldpPZJ0q8mAL92UkJAQHB0dcXV1xcPDg7vu\nuouPP/6Y4q93rFmzhvnz59/yuidNmsQrr7xSYtupU6fo3bv3La/rRvz+++/06NEDd3d3vLy86Nmz\nJ0eOHKnSOkNCQvj111+rtA7pzicDvnRTVCoVO3bsIDs7m5iYGF588UWWLl3K1KlTrTrfaDRWcQur\nV3Z2Nvfffz9z5swhIyOD+Ph4FixYgJ2dXZXWq1KpKO8dytp2n6VKEpJ0E0JCQsQvv/xSYtuhQ4eE\nWq0Wp0+fFkIIMXHiRDF//nwhhBB79+4V/v7+YunSpaJ+/fpiwoQJwmw2iyVLlojGjRsLLy8vMWrU\nKJGenm4pb//+/aJ79+7C3d1dBAYGis8++0ysXbtWaLVaYWtrK5ydncWwYcOEEEIEBweLPXv2CCGE\n0Ol0Ys6cOcLPz0/4+fmJp556ShQWFpZox4oVK4SPj49o0KCBWL9+vaXOHTt2iHbt2glXV1cRGBgo\nFi5caNkXGRkpVCqVMJlM192Pw4cPC3d39zLv1/r160WPHj3ErFmzhJubm2jRokWJ+5eZmSmmTJki\nGjRoIPz9/cX8+fNL1LN27VoRGhoqXFxcRMuWLcXff/8txo0bJ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i1fyp68k\nSVLllDZ4c9t6+Dqdjq5du9KuXTtatmzJvHnzSj3u3zncNfHPggULbnsbZBtl++6ENtb09tW2Npbl\ntvXw7e3t2bt3L46OjhiNRnr27Mnvv/9e4u1MSZIk6da5rWP4jo6OAOj1ekwmU5m5VyRJkqSbd1sD\nvtlspl27dvj6+tKvXz9atmx5O5tzw/r27Xu7m1Ah2cabV9PbBzW/jTW9fVA32lgjpmVmZWUxePBg\n3nrrrRIXpFKpWLBggeVz375974h/FEmSpOoUHh5OeHi45fOiRYtKHcuvEQEf4PXXX8fBwaHE4g0V\nLdsmSZIkXa+s2HnbhnTS0tIsq/wUFBTw888/0759+9vVHEmSpFrvts3SSUxMZOLEiZjNZsxmM+PH\nj6d///63qzmSJEm1Xo0Z0imNHNKRJEm6cTVuSEeSJEmqXjLgS5Ik1REy4EuSJNURMuBLkiTVETLg\nS5Ik1REy4EuSJNURMuBLkiTVETLgS5Ik1REy4EuSJNURMuBLkiTVETLgS5Ik1REy4EuSJNURMuBL\nkiTVETLgS5Ik1REy4EuSJNURMuBLkiTVETLgS5Ik1REy4EuSJNURMuBLkiTVEbdtEXOpdGaz4Oef\nLxETk4Wfnwt9+4bg5GR7u5slSVItIBcxryGEEHz//QXmzfsFBwcN7drVJyIindOnU5k1qzOzZ3fF\nw8PhdjdTkqQ7QFmxU/bwa4D4+GymTNlOQkIOb789gHvvbYpKpQLg7NlUVqw4QLNm77NkSX+mTm1v\n2SdJknQjZA//Ntu27RwzZuzgiSc689JLvdBoSn+scupUCmPH/h+hod6sX/8ADg7aam6pJEl3irJi\npwz4t0lGRgFz5/7Mr79GsmnT
}
],
"prompt_number": 9
},
{
"cell_type": "heading",
"level": 4,
"metadata": {},
"source": [
"3D Simulation of the sea surface "
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"The simulations show that frequency dependent spreading leads to much more irregular surface so the orientation of waves is less transparent compared to the frequency independent case."
]
},
{
"cell_type": "heading",
"level": 5,
"metadata": {},
"source": [
"Frequency independent spreading"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#plotflag = 1; iseed = 1;\n",
"#\n",
"#Nx = 2 ^ 8;Ny = Nx;Nt = 1;dx = 0.5; dy = dx; dt = 0.25; fftdim = 2;\n",
"#randn('state', iseed)\n",
"#Y1 = seasim(SD1, Nx, Ny, Nt, dx, dy, dt, fftdim, plotflag);\n",
"#wafostamp('', '(ER)')\n",
"#axis('fill')\n",
"#disp('Block = 6'), pause(pstate)"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 5,
"metadata": {},
"source": [
"Frequency dependent spreading"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#randn('state', iseed)\n",
"#Y12 = seasim(SD12, Nx, Ny, Nt, dx, dy, dt, fftdim, plotflag);\n",
"#wafostamp('', '(ER)')\n",
"#axis('fill')"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Estimation of directional spectrum"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"The figure is not shown in the Tutorial"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"# Nx = 3; Ny = 2; Nt = 2 ^ 12; dx = 10; dy = 10;dt = 0.5;\n",
"# F = seasim(SD12, Nx, Ny, Nt, dx, dy, dt, 1, 0); \n",
"# Z = permute(F.Z, [3 1 2]);\n",
"# [X, Y] = meshgrid(F.x, F.y);\n",
"# N = Nx * Ny;\n",
"# types = repmat(sensortypeid('n'), N, 1);\n",
"# bfs = ones(N, 1);\n",
"# pos = [X(:), Y(:), zeros(N, 1)];\n",
"# h = inf;\n",
"# nfft = 128;\n",
"# nt = 101;\n",
"# SDe = dat2dspec([F.t Z(:, :)], [pos types, bfs], h, nfft, nt);\n",
"#plotspec(SDe), hold on\n",
"#plotspec(SD12, '--'), hold off\n",
"#disp('Block = 8'), pause(pstate)\n"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Section 1.4.4 Fatigue, Load cycles and Markov models"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Switching Markow chain of turningpoints.\n",
"In fatigue applications the exact sample path is not important, but only the tops and bottoms of the load, called the sequence of turning points (TP). From the turning points one can extract load cycles, from which damage calculations and fatigue life predictions can be performed.\n",
"\n",
"The commands below computes the intensity of rainflowcycles for the Gaussian model with spectrum S1 using the Markov approximation. \n",
"The rainflow cycles found in the simulated load signal are shown in the figure."
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"#clf()\n",
"#paramu = [-6 6 61];\n",
"#frfc = spec2cmat(S1, [], 'rfc', [], paramu);\n",
"#pdfplot(frfc);\n",
"#hold on\n",
"#tp = dat2tp(xs);\n",
"#rfc = tp2rfc(tp);\n",
"#plot(rfc(:, 2), rfc(:, 1), '.')\n",
"#wafostamp('', '(ER)')\n",
"#hold off\n",
"#disp('Block = 9'), pause(pstate)"
],
"language": "python",
"metadata": {},
"outputs": []
},
{
"cell_type": "heading",
"level": 3,
"metadata": {},
"source": [
"Section 1.4.5 Extreme value statistics"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"clf()\n",
"import wafo.data as wd\n",
"xn = wd.yura87()\n",
"#xn = load('yura87.dat'); \n",
"subplot(211) \n",
"plot(xn[::30, 0] / 3600, xn[::30, 1], '.')\n",
"title('Water level')\n",
"ylabel('(m)')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "pyout",
"prompt_number": 10,
"text": [
"<matplotlib.text.Text at 0x730d070>"
]
},
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAACOCAYAAAA4ut97AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztXWuQVMd1/mZ2Zpdd9jX7ZplleT8WFtiEFRDxkg0UWiR2\nEVobFBsKZClxXCkpD4uyq2JUSkqvip0gxVaCIwjEUWK5bEWqRBAkGQQYq5AiEJaJjR6Mp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2K\nxMAgXcjqgTAA8Od//ud4+OGHM/XaawbGXRAMQYRrrpSr2QXUIN+Q1QNhnn76acTjcUyfPj3pvaoD\nYQrpKD3jLggGEq5+QMoVsJSB398ZZBaFNL7ThavmQJhPPvkEN9xwA5577jlUVlZizJgxeOWVV5Tb\nQes2NFq0yB64vb3X9sBVHRrid4Bc7QOJ6H/rLaC1FaisBBoagEQiPXXq6rJmVp2dxh2TTyik8Z0p\nBN5IU2QQJ06cENOmTRNCCHH06FHR0NAgRo8eLUaPHi0ikYhobW0Vp0+fdv1OR9aNNwoBCNHZKcTA\nQCYpz08sXGjVHxCit3fo9/nBHXdYz7vxRu8293ufH3D6qdTXp69OAwPWMwqRh/IZhT6+04GgIj1r\nCkDG6NGjRX9/v5ooTSWupoGbToFI8DtA0jmQcqF0iP6qKrseixc76xS0fXX3Z6KfDFLD1TS+8xV5\nowBWr14tRowYIYqLi0U8Hhdbt251fD9mzJjACuBqQjoFIsHvAFHdl6olz5XJunX6Z8TjttBOJFKr\nn0x/ImHXQ65T0PbV3Z+Jfspn
}
],
"prompt_number": 10
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Formation of 5 min maxima"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"yura = xn[:85500, 1]\n",
"yura = np.reshape(yura, (285, 300)).T\n",
"maxyura = yura.max(axis=0)\n",
"subplot(212)\n",
"plot(xn[299:85500:300, 0] / 3600, maxyura, '.')\n",
"xlabel('Time (h)')\n",
"ylabel('(m)')\n",
"title('Maximum 5 min water level')\n",
"show()"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYAAAACdCAYAAAC9+K9OAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJztnXt4TNf6x78TEpIjZIRcNCQIaUQQDUqFtCfq8qsm6EWU\nupXDaVWrF0dx0Bunl/MUrbZ64nrEQR3qlDgOklBtRRsV5bT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F\nY8eOHUPfvn3RrVs3PPjgg0I8OcMwDON+dDMAEydOxO7du62OPfHEE3jjjTdQVFSEESNG4M0339Qr\ne4ZhGMYOuhmAlJQUIYzNwg8//CCsmkxLS8PWrVv1yp5hGIaxQ2N3ZpaQkIBPPvkE6enp2LJlC378\n8UfZ63iSiGEYxjG0TOu6NQpo1apVWLFiBZKTk1FVVYWAgADFa+l/+7f4+t+CBQs8LoO3/HFdcF1w\nXdj+04pbRwBxcXFCOFpxcTF27tzpzuwZhmEYEW4dAViWj9fU1ODVV1/F9OnT3Zk9wzAMI0I3A5CZ\nmYl+/frh+++/R9u2bbFq1Sps3LgRcXFxiI+PR1RUFCZMmKBX9g0G8ZYAvg7XRS1cF7VwXTiOVy4E\nMxgMDvmzGKY+MHUqUFwMBAUB2dlASIinJWIaClp1J28FwTBuprgYyM8HcnLMxoBhPAUbAIZxM0FB\n5v+9egErV3pWFsa3YRcQw7iZS5fMPf+VK9n9w7gWrbqTDQDDMEwDwWvmAOQ2gysoKEDv3r2RlJSE\nXr164ciRI3pl73GmTgVSU4Fh
}
],
"prompt_number": 11
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"Estimation of GEV for yuramax"
]
},
{
"cell_type": "code",
"collapsed": false,
"input": [
"clf()\n",
"import wafo.stats as ws\n",
"phat = ws.genextreme.fit2(maxyura, method='ml')\n",
"phat.plotfitsummary()\n",
"show()\n",
"#disp('Block = 11, Last block')"
],
"language": "python",
"metadata": {},
"outputs": [
{
"output_type": "stream",
"stream": "stderr",
"text": [
"c:\\pab\\workspace\\pywafo_svn\\pywafo\\src\\wafo\\stats\\estimation.py:1080: UserWarning: P-value is on the conservative side (i.e. too large) due to ties in the data!\n",
" warnings.warn('P-value is on the conservative side (i.e. too large) due to ties in the data!')\n"
]
},
{
"output_type": "display_data",
"png": "iVBORw0KGgoAAAANSUhEUgAAAYoAAAEfCAYAAABf1YHgAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAI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