From 1693da85c82700cad1081ba5b6b6734ef7acba32 Mon Sep 17 00:00:00 2001 From: Andy Aschwanden Date: Mon, 10 Jun 2024 17:36:37 -0800 Subject: [PATCH] fixed joblib error --- .pylintrc | 2 +- notebooks/dem_smoothing.ipynb | 65 +++++++++++++++++++++++++++++++++-- profiles/compute_profiles.py | 1 + 3 files changed, 64 insertions(+), 4 deletions(-) diff --git a/.pylintrc b/.pylintrc index 09ec29f..adabccf 100644 --- a/.pylintrc +++ b/.pylintrc @@ -3,4 +3,4 @@ jobs=4 #number of processes to use [BASIC] good-names=nameOfYourProject #names to be considered ok [pre-commit-hook] -disable=bare-except, import-outside-toplevel, too-many-return-statements, line-too-long, invalid-name, too-many-arguments, dangerous-default-value, too-many-locals, duplicate-code, too-many-statements +disable=bare-except, import-outside-toplevel, too-many-return-statements, line-too-long, invalid-name, too-many-arguments, dangerous-default-value, too-many-locals, duplicate-code, too-many-statements, redefined-builtin diff --git a/notebooks/dem_smoothing.ipynb b/notebooks/dem_smoothing.ipynb index b66b3c3..b4c5851 100644 --- a/notebooks/dem_smoothing.ipynb +++ b/notebooks/dem_smoothing.ipynb @@ -629,7 +629,9 @@ "id": "624e6cb3-5752-4513-92c4-649cb195f4c2", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "import numpy as np" + ] }, { "cell_type": "code", @@ -637,12 +639,69 @@ "id": "a0d0802b-22f4-40db-bb09-f5d443ccd645", "metadata": {}, "outputs": [], - "source": [] + "source": [ + "np.sin(np.deg2rad(2)) " + ] + }, + { + "cell_type": "markdown", + "id": "20f1c2a5-059d-4c83-9947-5c51a1cec455", + "metadata": {}, + "source": [ + "$$ \\rho g z = L$$" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "cdec1397-7332-4007-b097-645172f23c38", + "metadata": {}, + "outputs": [], + "source": [ + "v = 20\n", + "alpha = 2\n", + "L = 5e3\n", + "B = 5e3\n", + "H = 1e3\n", + "rho = 910\n", + "g = 9.81\n", + "L = 3.3e5" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7b8639cf-daf4-4ef7-8015-daae72d50858", + "metadata": {}, + "outputs": [], + "source": [ + "V = B * L * H" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "5025ca0f-4df7-496c-b416-d485705e6f62", + "metadata": {}, + "outputs": [], + "source": [ + "m = rho * V" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "29e22cdb-5e8d-4489-a601-39add76f4b63", + "metadata": {}, + "outputs": [], + "source": [ + "m * g * np.sin(np.deg2rad(2)) / L" + ] }, { "cell_type": "code", "execution_count": null, - "id": "dc007bbe-44d6-4d4d-aef7-3cacf88405ba", + "id": "48c5f570-63e0-464c-92b7-17b56f6c30af", "metadata": {}, "outputs": [], "source": [] diff --git a/profiles/compute_profiles.py b/profiles/compute_profiles.py index accebea..8cce269 100644 --- a/profiles/compute_profiles.py +++ b/profiles/compute_profiles.py @@ -88,6 +88,7 @@ def __call__(self, parser, namespace, values, option_string=None): if __name__ == "__main__": + __spec__ = None # set up the option parser profiles_parser = ArgumentParser(formatter_class=ArgumentDefaultsHelpFormatter)