Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into develop
  • Loading branch information
ssolson committed Nov 5, 2024
2 parents 0f420fc + c5b698f commit a20759d
Show file tree
Hide file tree
Showing 30 changed files with 3,523 additions and 480 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/generate_notebook_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
"cdip_example.ipynb": 420,
"Delft3D_example.ipynb": 180,
"directional_waves.ipynb": 180,
"environmental_contours_example.ipynb": 360,
"extreme_response_contour_example.ipynb": 360,
"extreme_response_full_sea_state_example.ipynb": 360,
"extreme_response_MLER_example.ipynb": 360,
"environmental_contours_example.ipynb": 240,
"extreme_response_contour_example.ipynb": 240,
"extreme_response_full_sea_state_example.ipynb": 240,
"extreme_response_MLER_example.ipynb": 240,
"loads_example.ipynb": 180,
"metocean_example.ipynb": 180,
"mooring_example.ipynb": 240,
"PacWave_resource_characterization_example.ipynb": 780,
"PacWave_resource_characterization_example.ipynb": 240,
"power_example.ipynb": 180,
"qc_example.ipynb": 180,
"river_example.ipynb": 180,
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/pylint.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pylint Loads
name: Pylint

on: [push, pull_request]

Expand Down Expand Up @@ -28,3 +28,7 @@ jobs:
- name: Run Pylint on mhkit/power/
run: |
pylint mhkit/power/

- name: Run Pylint on mhkit/acoustics/
run: |
pylint mhkit/acoustics/
13 changes: 10 additions & 3 deletions examples/PacWave_resource_characterization_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1119,12 +1119,19 @@
"\n",
" Tz_list.append(resource.average_zero_crossing_period(year_data.T))\n",
"\n",
"# Concatenate list of Series into a single DataFrame\n",
"# Concatenate each list of Series into a single Series\n",
"Te = pd.concat(Te_list, axis=0)\n",
"Tp = pd.concat(Tp_list, axis=0)\n",
"Hm0 = pd.concat(Hm0_list, axis=0)\n",
"J = pd.concat(J_list, axis=0)\n",
"Tz = pd.concat(Tz_list, axis=0)\n",
"\n",
"# Name each Series and concat into a dataFrame\n",
"Te.name = 'Te'\n",
"Tp.name = 'Tp'\n",
"Hm0.name = 'Hm0'\n",
"J.name = 'J'\n",
"Tz.name = 'Tz'\n",
"data = pd.concat([Hm0, Te, Tp, J, Tz], axis=1)\n",
"\n",
"# Calculate wave steepness\n",
Expand Down Expand Up @@ -1590,7 +1597,7 @@
" J = []\n",
" for i in range(len(result)):\n",
" b = resource.jonswap_spectrum(f, result.Tp[i], result.Hm0[i])\n",
" J.extend([resource.energy_flux(b, h=399.0).values[0][0]])\n",
" J.extend([resource.energy_flux(b, h=399.0).item()])\n",
"\n",
" result[\"J\"] = J\n",
" results[N] = result\n",
Expand Down Expand Up @@ -1622,7 +1629,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit a20759d

Please sign in to comment.