Skip to content

Commit 2813474

Browse files
authored
Dolfyn general updates (#186)
* Initial push * Latest bugfixes * Remove phase-in text * Update docstrings * Readability, imports * Make functions public * Docstring updates * Fix test oversight * Fix docstring * Missing timestamp fix for classic Nortek * Docstring updates * Renaming functions per mhkit standards * Single array vs binned array functions * Reorganizing analysis code * Update invalid orientation matrix warning * Add config details to dataset attributes * dolfyn bugfixes * ADV updates : * Update compression option for netcdf4 * Remove compression options * Fix clean function * Set functions as private * Move stress functions to ADV dir * Add bottleneck to reqs * Minor changes * Remove old functions * Code simplification * Update examples * Make functions public * Add bottleneck to dependencies * Fix notebook * Bugfix for beam vars Co-authored-by: jmcvey3 <[email protected]>
1 parent 06a3cab commit 2813474

32 files changed

+385
-844
lines changed

examples/adcp_example.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
"outputs": [],
3636
"source": [
37-
"from mhkit import dolfyn as dlfn\n",
37+
"from mhkit import dolfyn\n",
3838
"from mhkit.dolfyn.adp import api"
3939
]
4040
},
@@ -77,7 +77,7 @@
7777
}
7878
],
7979
"source": [
80-
"ds = dlfn.read('data/dolfyn/Sig1000_tidal.ad2cp')"
80+
"ds = dolfyn.read('data/dolfyn/Sig1000_tidal.ad2cp')"
8181
]
8282
},
8383
{
@@ -1464,8 +1464,8 @@
14641464
}
14651465
],
14661466
"source": [
1467-
"dlfn.set_declination(ds, 15.8, inplace=True) # 15.8 deg East\n",
1468-
"dlfn.rotate2(ds, 'earth', inplace=True)"
1467+
"dolfyn.set_declination(ds, 15.8, inplace=True) # 15.8 deg East\n",
1468+
"dolfyn.rotate2(ds, 'earth', inplace=True)"
14691469
]
14701470
},
14711471
{
@@ -1481,8 +1481,8 @@
14811481
"metadata": {},
14821482
"outputs": [],
14831483
"source": [
1484-
"ds.attrs['principal_heading'] = dlfn.calc_principal_heading(ds['vel'].mean('range'))\n",
1485-
"ds_streamwise = dlfn.rotate2(ds, 'principal', inplace=False)"
1484+
"ds.attrs['principal_heading'] = dolfyn.calc_principal_heading(ds['vel'].mean('range'))\n",
1485+
"ds_streamwise = dolfyn.rotate2(ds, 'principal', inplace=False)"
14861486
]
14871487
},
14881488
{
@@ -3295,7 +3295,7 @@
32953295
"ds_avg['U_mag'] = ds_avg.velds.U_mag\n",
32963296
"\n",
32973297
"ds_avg['U_dir'] = ds_avg.velds.U_dir\n",
3298-
"ds_avg['U_dir'].values = dlfn.tools.misc.convert_degrees(ds_avg['U_dir'].values, tidal_mode=True)"
3298+
"ds_avg['U_dir'].values = dolfyn.tools.misc.convert_degrees(ds_avg['U_dir'].values, tidal_mode=True)"
32993299
]
33003300
},
33013301
{
@@ -3347,7 +3347,7 @@
33473347
"\n",
33483348
"ax = plt.figure(figsize=(12,8)).add_axes([.14, .14, .8, .74])\n",
33493349
"# Plot flow speed\n",
3350-
"t = dlfn.time.dt642date(ds_avg['time'])\n",
3350+
"t = dolfyn.time.dt642date(ds_avg['time'])\n",
33513351
"plt.pcolormesh(t, ds_avg['range'], ds_avg['U_mag'], cmap='Blues', shading='nearest')\n",
33523352
"# Plot the water surface\n",
33533353
"ax.plot(t, ds_avg['depth'])\n",
@@ -3414,8 +3414,8 @@
34143414
"outputs": [],
34153415
"source": [
34163416
"# Uncomment these lines to save and load to your current working directory\n",
3417-
"#dlfn.save(ds, 'your_data.nc')\n",
3418-
"#ds_saved = dlfn.load('your_data.nc')"
3417+
"#dolfyn.save(ds, 'your_data.nc')\n",
3418+
"#ds_saved = dolfyn.load('your_data.nc')"
34193419
]
34203420
}
34213421
],

examples/adv_example.ipynb

Lines changed: 77 additions & 157 deletions
Large diffs are not rendered by default.
-6.02 KB
Binary file not shown.
-175 Bytes
Binary file not shown.
2.41 KB
Binary file not shown.
2.1 KB
Binary file not shown.
-753 Bytes
Binary file not shown.
-2.11 KB
Binary file not shown.
6.03 KB
Binary file not shown.
-7.37 KB
Binary file not shown.

0 commit comments

Comments
 (0)