Created
May 5, 2017 04:51
-
-
Save anonymous/7a88c907486d459eed0b746cba273599 to your computer and use it in GitHub Desktop.
GEOHAB/FVCOM_bedload.ipynb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "# Compute bedload transport from FVCOM \n" | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "Demonstration using the NetCDF4-Python library to compute bedload transport and bottom velocity (1 meter above bottom) from a triangular grid ocean model (FVCOM) via OPeNDAP. The results are stored in a new NetCDF4 file. \n\nNECOFS (Northeastern Coastal Ocean Forecast System) is run by groups at the University of Massachusetts Dartmouth and the Woods Hole Oceanographic Institution, led by Drs. C. Chen, R. C. Beardsley, G. Cowles and B. Rothschild. Funding is provided to run the model by the NOAA-led Integrated Ocean Observing System and the State of Massachusetts.\n\nNECOFS is a coupled numerical model that uses nested weather models, a coastal ocean circulation model, and a wave model. The ocean model is a volume-mesh model with horizontal resolution that is finer in complicated regions. It is layered (not depth-averaged) and includes the effects of tides, winds, and varying water densities caused by temperature and salinity changes.\n\n* Model description: \n\n http://fvcom.smast.umassd.edu/research_projects/NECOFS/model_system.html\n \n \n* THREDDS server with other forecast and archive products: \n\n http://www.smast.umassd.edu:8080/thredds/catalog.html\n\n**Note:**\nThe notebook here calculates the **instantaneous bedload transport**, to determine \nThe **net transport** is given by averaging the results over a tidal cycle (average over an exact number of tidal cycles to don't get some fraction of a remaining tidal cycle affecting the mean)\n\n**Author:** Rich Signell (USGS), Massimo Di Stefano (CCOM)" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:34.089982Z", | |
"start_time": "2017-04-27T22:11:33.930503Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "import numpy as np\nimport netCDF4\nimport datetime as dt", | |
"execution_count": 1, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* Input FVCOM Dataset: DAP Data URL" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:34.258286Z", | |
"start_time": "2017-04-27T22:11:34.092626Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "THREDDS='http://www.smast.umassd.edu:8080/thredds'\nurl = THREDDS+'/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_FVCOM_OCEAN_MASSBAY_FORECAST.nc'\nurl = THREDDS+'/dodsC/FVCOM/NECOFS/Forecasts/NECOFS_GOM3_FORECAST.nc'\nurl = THREDDS+'/dodsC/fvcom/archives/necofs_mb'\nurl = THREDDS+'/dodsC/fvcom/hindcasts/30yr_gom3'", | |
"execution_count": 2, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* Open DAP" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "nci = netCDF4.Dataset(url)", | |
"execution_count": 3, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* Specific Times\n\n**Note:**\n149 hours is nearly exactly 12 semidiurnal tidal cycles, since the dominant M2 tidal amplitude period is 12.42 hours." | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "start = dt.datetime(2014,7,1,10,0,0) \nend = start + dt.timedelta(hours=148) # 12.42*12 = 149.04", | |
"execution_count": 4, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Drag Coefficient **CD**\n\n* Compute the `drag coefficient` $CD$ based on \n\n * `roughness height` $z_0$ \n * `distance above bottom` $z_r$\n\n$$\\Large k=0.4$$\n\n$$\\Large cd = (\\frac{k \\cdot z_r}{\\log{\\frac{z_r}{z_0}}})^2$$" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:34.374920Z", | |
"start_time": "2017-04-27T22:11:34.261887Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def z0tocd(z0=3.3546e-04, zr=1.0):\n \"\"\" \n Compute the drag coefficient CD based on \n roughness height z0 and \n distance above bottom zr\n \"\"\"\n \n kappa = 0.4\n cd=(kappa * np.ones_like(zr) / np.log(zr/z0))**2\n return cd", | |
"execution_count": 5, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Roughness Height **$Z_0$**\n\n* Compute the `roughness height` $z_0$ based on \n\n * `drag coefficient` $CD$ \n * `distance above bottom` $z_r$\n\n$$\\Large k=0.4$$\n\n$$\\Large z_0 = \\frac{z_r}{e^{\\frac{k \\cdot cd}{\\sqrt{cd}}}}$$" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:34.467583Z", | |
"start_time": "2017-04-27T22:11:34.378433Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def cdtoz0(cd=2.5e-3, zr=1.0):\n \"\"\" \n Compute the roughness height z0 based on \n drag coefficient CD and \n distance above bottom zr\n \"\"\"\n \n kappa = 0.4\n z0 = zr / (np.exp(kappa * np.ones_like(cd) / np.sqrt(cd)))\n return z0", | |
"execution_count": 6, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Bed Velocity\n\n* Compute the velocity 1 meter above bottom and friction velocity from velocity measured at height $z_r$ above bottom\n\n Inputs:\n \n * $w$ : east velocity component + j*north velocity component $[ms^{-1}]$ [complex]\n * $z_0$ : roughness height = $kb/30$ $[m]$\n * $z_r$ : height above bottom for input velocity \"$w$\" $[m]$\n \n Returns:\n \n * $u'$ : friction velocity $[ms^{-1}]$ [complex]\n * $w$ : velocity 1 mab $[ms^{-1}]$ [complex]\n \n \n\n$$\\Large u'=\\sqrt{CD} \\cdot w$$\n\n$$\\Large ur = \\frac{|u'|}{ k \\log{\\frac{zr}{z0}}}$$\n\n$$\\Large w_{bottom} = w \\frac{ur}{(|w|+1e-16)}$$" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:34.570928Z", | |
"start_time": "2017-04-27T22:11:34.471243Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def w100(w=0.1+0j, z0=3.35e-04, zr=1):\n \"\"\" \n Compute the velocity 1 meter above bottom and friction velocity\n from velocity measured at height zr above bottom.\n\n Keyword arguments\n -----------------\n w : east velocity component+j*north velocity component (m/s) [complex]\n z0 : roughness height = kb/30 (m) \n zr : height above bottom for input velocity \"w\" (m)\n\n Returns\n -------\n ustar : friction velocity (m/s) [complex]\n w : velocity 1 mab (m/s) [complex]\n \n \"\"\"\n \n cd = z0tocd(z0, zr)\n ustar = np.sqrt(cd)*w\n kappa = 0.4\n ur = abs(ustar)/kappa*np.log(np.ones_like(zr)/z0)\n wbot = w*ur/(np.abs(w)+1e-16)\n return ustar, wbot", | |
"execution_count": 7, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:35.863505Z", | |
"start_time": "2017-04-27T22:11:34.574154Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "time_var = nci['time']\nistart = netCDF4.date2index(start, time_var, select='nearest')\niend = netCDF4.date2index(end, time_var, select='nearest')\njd = netCDF4.num2date(time_var[istart:iend+1], time_var.units)", | |
"execution_count": 8, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:35.872015Z", | |
"start_time": "2017-04-27T22:11:35.867236Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "itimes = range(istart, iend+1)", | |
"execution_count": 9, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.042848Z", | |
"start_time": "2017-04-27T22:11:35.875945Z" | |
}, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "len(itimes)", | |
"execution_count": 10, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": "149" | |
}, | |
"execution_count": 10, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* **Read connectivity array:**" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.357300Z", | |
"start_time": "2017-04-27T22:11:36.045480Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "nv = nci['nv'][:].T - 1", | |
"execution_count": 11, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* **Print info on velocity variable:**" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.368238Z", | |
"start_time": "2017-04-27T22:11:36.360413Z" | |
}, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "print(nci['u'])\nnode = len(nci['h'])\nnt, nsig, nele = np.shape(nci['u'])", | |
"execution_count": 12, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "<class 'netCDF4._netCDF4.Variable'>\nfloat32 u(time, siglay, nele)\n long_name: Eastward Water Velocity\n units: meters s-1\n type: data\n standard_name: eastward_sea_water_velocity\n coordinates: time siglay latc lonc\n mesh: fvcom_mesh\n location: face\nunlimited dimensions: \ncurrent shape = (333552, 45, 90415)\nfilling off\n\n" | |
} | |
] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "**OUTPUT:** \n\nCreate NetCDF4 file with deflation on variables\n \n**Dimensions:**\n\n* nele\n* node\n* three\n* time\n \n \n**Variables:**\n\n* time\n* h\n* nv\n* lonc\n* latc\n* lon\n* lat\n* ubot\n* vbot\n* ubedload\n* vbedload" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "url_out = '/home/epinux/gom3_bedload.nc'", | |
"execution_count": 13, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.744822Z", | |
"start_time": "2017-04-27T22:11:36.371388Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "nco = netCDF4.Dataset(url_out, 'w', clobber=True)\n\n# create dimensions\nnco.createDimension('nele', nele)\nnco.createDimension('node', node)\nnco.createDimension('three', 3)\nnco.createDimension('time', None)\n\n# create variables\ntimeo = nco.createVariable('time', 'f4', ('time'))\nho = nco.createVariable('h', 'f4', ('node'))\nnvo = nco.createVariable('nv', 'i4', ('three', 'nele'))\nlonco = nco.createVariable('lonc', 'f4', ( 'nele'))\nlatco = nco.createVariable('latc', 'f4', ( 'nele'))\nlono = nco.createVariable('lon', 'f4', ( 'node'))\nlato = nco.createVariable('lat', 'f4', ( 'node'))\n\nubot = nco.createVariable('ubot', 'f4', ('time', 'nele'))\nvbot = nco.createVariable('vbot', 'f4', ('time', 'nele'))\nubedload = nco.createVariable('ubedload', 'f4', ('time', 'nele'))\nvbedload = nco.createVariable('vbedload', 'f4', ('time', 'nele'))\n\n# write variable attributes\ntimeo.units=nci['time'].units\nho.units=nci['h'].units\nlono.units=nci['lon'].units\nlato.units=nci['lat'].units\nlonco.units=nci['lonc'].units\nlatco.units=nci['latc'].units\nubot.units=nci['u'].units\nvbot.units=nci['v'].units\nubot.standard_name = 'eastward_component_of_bottom_velocity'\nvbot.standard_name = 'northward_component_of_bottom_velocity'\n\nubedload.units='kg m-1 s-1'\nvbedload.units='kg m-1 s-1'\nubedload.standard_name = 'eastward_component_of_bedload_transport'\nvbedload.standard_name = 'northward_component_of_bedload_transport'\n# write data with no time dimension\nlonco[:]=nci['lonc'][:]\nlatco[:]=nci['latc'][:]\nlono[:]=nci['lon'][:]\nlato[:]=nci['lat'][:]\nnvo[:]=nci['nv'][:]\nho[:]=nci['h'][:]\n", | |
"execution_count": 14, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* **specify bottom layer, but handle case where there is just 1 layer in input file**" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.754842Z", | |
"start_time": "2017-04-27T22:11:36.748574Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "\nif np.shape(nci['siglay'])[0]==1:\n ilayer = 0\nelse:\n ilayer = -1", | |
"execution_count": 15, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* Use canonical bottom roughness\n\n$kb=0.5 \\quad [cm]$" | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* **neither $z_0$ or $cd$ is saved in this FVCOM output, so just use canonical bottom roughness $kb=0.5 \\quad cm$**\n" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "kb=0.005\nz0=kb/30.", | |
"execution_count": 16, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* **density plays a small role in stress, so just specify as constant here**" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.867405Z", | |
"start_time": "2017-04-27T22:11:36.758221Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "rho = 1025.", | |
"execution_count": 17, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Bedload transport\n\n* bedload transport routine we use in ROMS Meyer-Peter Mueller\n\n Search for \"meyer\" in the [ROMS sediment paper to find the description](http://www.ccpo.odu.edu/~klinck/Reprints/PDF/warnerCompGeo08.pdf)\n * implementation in the ROMS code:\n\nhttps://github.com/dcherian/ROMS/blob/master/ROMS/Nonlinear/Sediment/sed_bedload.F#L500-L510\n\n---\n\n**Constants:**\n\n`gravity`: $g = 9.81$ \n\n`shields parameter`: $\\theta_c = 0.047$ \n\n**Variables:**\n\n$u': \\text{ bottom friction velocity}$\n\n$w_{bottom}:\\text{ velocity at 1 mab (meters above bed)}$\n\n$cd:\\text{ drag coefficient}$\n\n---\n\n * Compute bottom friction velocity and velocity at 1 mab\n\n $u', w_{bottom} = w_{100}[w, z_0, z_r]$\n\n\n * Compute bottom stress from friction velocity\n \n $cd = z_0tocd[z0,zr]$\n\n $$\\Large b_{stress} = cd \\cdot \\rho \\cdot u' \\cdot |u'|$$\n\n--- \n\n $$\\Large\\theta_{sf} = \\frac{ |b_{stress}| }{ ((s - 1.0) \\cdot g \\cdot d_{50}) }$$\n\n $$\\Large \\theta = \\theta_{sf} - \\theta_c$$\n\n $$\\Large \\phi = 8.0 \\cdot \\sqrt{\\theta^3}$$\n\n $$\\Large q = \\phi \\cdot \\sqrt{ (s-1.0) \\cdot g \\cdot d_{50}^3 } \\cdot \\rho_s$$" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:36.959089Z", | |
"start_time": "2017-04-27T22:11:36.870667Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "def mpm_bedload(w, z0, zr, d50, rho, rho_s):\n g = 9.81 # gravity\n theta_c = 0.047 # shields parameter\n\n # compute bottom friction velocity and velocity at 1 mab\n ustar, wbot = w100(w, z0, zr) \n\n # compute bottom stress from friction velocity\n cd = z0tocd(z0,zr)\n\n bstr = cd * rho * ustar * np.abs(ustar) \n\n theta_sf = np.abs(bstr) / ((s - 1.0) * g * d50)\n\n theta = (theta_sf - theta_c)\n theta[theta<0.0] = 0.0\n phi = 8.0*(theta**1.5)\n\n q = phi * np.sqrt((s-1.0) * g * d50**3)*rho_s\n\n return q, wbot", | |
"execution_count": 18, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* Pick a sand grain size for bedload transport calculation\n \n * *grain size* \n\n$d_{50} = 200.0 \\cdot 10^{-6}$ ( 200 $\\mu$, sand )\n\n * *sediment density*\n\n$\\rho_s = 2650$ \n\n\n$s = \\frac{\\rho_s}{\\rho}$\n\n * define constats: $\\overrightarrow{g}, \\theta_c$\n\n$g = 9.81$\n\n$\\theta_c = 0.047$\n\n" | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "# Simulation" | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:37.074213Z", | |
"start_time": "2017-04-27T22:11:36.962336Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "d50 = 200.0e-06 # 200 micron sand\nrho_s = 2650. # density of sediment \ns = rho_s/rho\ng = 9.81\ntheta_c = 0.047", | |
"execution_count": 19, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:11:37.171597Z", | |
"start_time": "2017-04-27T22:11:37.077472Z" | |
}, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# test\nw = np.array([0, 0.5]) + 1j*np.array([.5, .5])\nzr = 1.0\nq, wbot = mpm_bedload(w, z0, zr, d50, rho, rho_s)\nprint(q, wbot)", | |
"execution_count": 20, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "[ 0.043049 0.13536468] [ 0.0+0.5j 0.5+0.5j]\n" | |
} | |
] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "* specify bottom layer, but handle case where there is just 1 layer in input file:" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "if np.shape(nci['siglay'])[0]==1:\n ilayer = 0\nelse:\n ilayer = -1", | |
"execution_count": 21, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "**Loop through time, writing each 2D or 3D field to output file**" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "# notebook widget borrowed from:\n# https://github.com/alexanderkuk/log-progress\nfrom progressbar import log_progress", | |
"execution_count": 22, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:12:32.422878Z", | |
"start_time": "2017-04-27T22:11:37.175021Z" | |
}, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "k=0\nfor itime in log_progress(itimes, every=1):\n zr = 0.5*(nci['siglay'][-2,:]-nci['siglay'][-1,:]) * \\\n (nci['h'][:]+nci['zeta'][itime,:])\n u = nci['u'][itime, ilayer, :]\n v = nci['v'][itime, ilayer, :]\n\n # average nodes to get bottom layer thicknesses at faces \n # (velocity points)\n zr_face = np.mean(zr[nv],axis=1)\n \n # create complex velocity from components\n w = u + 1j*v\n \n q, wbot = mpm_bedload(w, z0, zr_face, d50, rho, rho_s)\n\n # write bottom velocity and stress components to output file\n ubot[k,:]=wbot.real \n vbot[k,:]=wbot.imag \n ubedload[k,:] = q * np.real(w) / np.abs(w) # bedload in x direction\n vbedload[k,:] = q * np.imag(w) / np.abs(w) # bedload in y direction\n timeo[k] = nci['time'][itime]\n k += 1", | |
"execution_count": 23, | |
"outputs": [ | |
{ | |
"data": { | |
"application/vnd.jupyter.widget-view+json": { | |
"model_id": "7dca5358f28540ee89236c809f931a63" | |
} | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
] | |
}, | |
{ | |
"metadata": { | |
"ExecuteTime": { | |
"end_time": "2017-04-27T22:12:32.453788Z", | |
"start_time": "2017-04-27T22:12:32.425969Z" | |
}, | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "nci.close()\nnco.close()", | |
"execution_count": 24, | |
"outputs": [] | |
}, | |
{ | |
"metadata": {}, | |
"cell_type": "markdown", | |
"source": "## Net bed-load transport\n\nThe notebook here calculates the **instantaneous bedload transport**, to determine \nThe **net transport** is given by averaging the results over a tidal cycle (average over an exact number of tidal cycles to don't get some fraction of a remaining tidal cycle affecting the mean)" | |
}, | |
{ | |
"metadata": { | |
"collapsed": true, | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "!ncra -O /home/epinux/gom3_bedload.nc /home/epinux/gom3_bedload_mean.nc", | |
"execution_count": 25, | |
"outputs": [] | |
}, | |
{ | |
"metadata": { | |
"collapsed": true | |
}, | |
"cell_type": "markdown", | |
"source": "## Results\n\n* [gom3_bedload_mean.nc](http://epinux.com/epi/gom3_bedload_mean.nc)\n\n* http://epinux.com/epi/gom3_bedload_mean.nc" | |
}, | |
{ | |
"metadata": { | |
"trusted": true | |
}, | |
"cell_type": "code", | |
"source": "!gist FVCOM_bedload.ipynb", | |
"execution_count": 26, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": "https://gist.github.com/a5aa34b8a143b65323dc796c74b2dcfd\r\n" | |
} | |
] | |
} | |
], | |
"metadata": { | |
"_draft": { | |
"nbviewer_url": "https://gist.github.com/314d5d26221328b7d280e3ee545f05a2" | |
}, | |
"gist": { | |
"id": "314d5d26221328b7d280e3ee545f05a2", | |
"data": { | |
"description": "GEOHAB/FVCOM_bedload.ipynb", | |
"public": true | |
} | |
}, | |
"gist_id": "98028ea5da5930fa4b2033408e280e34", | |
"hide_input": false, | |
"kernelspec": { | |
"name": "python3", | |
"display_name": "Python 3", | |
"language": "python" | |
}, | |
"language_info": { | |
"name": "python", | |
"version": "3.6.0", | |
"mimetype": "text/x-python", | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"pygments_lexer": "ipython3", | |
"nbconvert_exporter": "python", | |
"file_extension": ".py" | |
}, | |
"latex_envs": { | |
"bibliofile": "biblio.bib", | |
"cite_by": "apalike", | |
"current_citInitial": 1, | |
"eqLabelWithNumbers": true, | |
"eqNumInitial": 0 | |
}, | |
"toc": { | |
"toc_cell": false, | |
"toc_number_sections": true, | |
"toc_threshold": 6, | |
"toc_window_display": true | |
}, | |
"toc_position": { | |
"height": "377px", | |
"left": "1630px", | |
"right": "26px", | |
"top": "119px", | |
"width": "264px" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 1 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment