Skip to content

Commit

Permalink
rendering figures in notebook mode and adding yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
tompc35 committed Jan 24, 2020
1 parent 046f382 commit 1db0f95
Show file tree
Hide file tree
Showing 12 changed files with 22,610 additions and 497 deletions.
10,373 changes: 10,229 additions & 144 deletions ADCP_spectrum_complexpca.ipynb

Large diffs are not rendered by default.

19 changes: 16 additions & 3 deletions ADCP_utide_analysis.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## UTide analysis of ADCP data"
]
},
{
"cell_type": "code",
"execution_count": 1,
Expand Down Expand Up @@ -138,7 +145,9 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dstide = xr.Dataset({'Lsmaj': (('height', 'constituent'), Lsmaj),\n",
Expand All @@ -158,7 +167,9 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dstide.attrs['reftime']= coef['aux']['reftime']"
Expand All @@ -167,7 +178,9 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dstide.to_netcdf('data/utide_results.nc')"
Expand Down
59 changes: 48 additions & 11 deletions ADCP_utide_results_theory_K1.ipynb
Original file line number Diff line number Diff line change
@@ -1,9 +1,20 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Compare K1 tidal velocities with theory\n",
"\n",
"Compare vertical structure of K1 tidal velocities calculated from harmonic analysis (UTide) with the tidal bottom boundary layer model of Soulsby (1983)."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"%matplotlib ipympl\n",
Expand All @@ -16,10 +27,19 @@
"import lmfit"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Load UTide results"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dstide = xr.open_dataset('data/utide_results.nc')"
Expand All @@ -28,7 +48,9 @@
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"i = 1j\n",
Expand All @@ -43,7 +65,9 @@
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"dims = ('height', 'constituent')\n",
Expand Down Expand Up @@ -83,7 +107,9 @@
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"zi = np.arange(0,len(dstide['height'])-7)\n",
Expand All @@ -100,7 +126,9 @@
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def planetary_bbl_structure(ustar,zo,z,f):\n",
Expand Down Expand Up @@ -180,7 +208,9 @@
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"Rpinf = np.array(ap[zi[-1],ci])\n",
Expand Down Expand Up @@ -214,7 +244,9 @@
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"def fit_function(params, z=None, dat_ccw=None, dat_cw=None):\n",
Expand Down Expand Up @@ -334,7 +366,9 @@
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
"phip = np.angle(Rp)\n",
Expand All @@ -355,7 +389,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "622bf8eac217402b90e1731f5a67cab4",
"model_id": "bc1982a4fb454101b61e0b12624a93b0",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -416,12 +450,15 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"metadata": {
"collapsed": true
},
"outputs": [],
"source": []
}
],
"metadata": {
"anaconda-cloud": {},
"kernelspec": {
"display_name": "Python [conda env:py37]",
"language": "python",
Expand Down
Loading

0 comments on commit 1db0f95

Please sign in to comment.