@ -12,8 +12,8 @@
"execution_count": 1,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T00:37:28.874517 Z",
"start_time": "2018-12-03T00:37:28.528594 Z"
"end_time": "2018-12-05T02:45:14.908283 Z",
"start_time": "2018-12-05T02:45:14.556163 Z"
}
},
"outputs": [],
@ -28,8 +28,8 @@
"execution_count": 2,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T00:37:30.229243 Z",
"start_time": "2018-12-03T00:37:28.875519 Z"
"end_time": "2018-12-05T02:45:34.323928 Z",
"start_time": "2018-12-05T02:45:14.911088 Z"
}
},
"outputs": [],
@ -58,11 +58,11 @@
},
{
"cell_type": "code",
"execution_count": 8 3,
"execution_count": 3,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T02:20:29.132099 Z",
"start_time": "2018-12-03T02:20:22.217681 Z"
"end_time": "2018-12-05T02:45:53.010702 Z",
"start_time": "2018-12-05T02:45:34.324930 Z"
}
},
"outputs": [
@ -77,7 +77,7 @@
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\z5189959\\AppData\\Local\\Continuum\\anaconda3\\lib\\site-packages\\numpy\\lib\\arraysetops.py:47 2: FutureWarning:\n",
"C:\\Users\\z5189959\\Desktop\\nsw-2016-storm-impact\\.venv\\lib\\site-packages\\numpy\\lib\\arraysetops.py:52 2: FutureWarning:\n",
"\n",
"elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison\n",
"\n"
@ -130,13 +130,21 @@
"Lets define a function to calculate the \"collision protection volume\" based on prestorm profiles."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Get berm feature functions\n",
"Define a couple of functions which are going to help us get features of our berms."
]
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 27 ,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T00:37:37.244970Z",
"start_time": "2018-12-03T00:37:36.924017Z"
"end_time": "2018-12-05T03:01:56.646213 Z",
"start_time": "2018-12-05T03:01:56.366466 Z"
},
"code_folding": []
},
@ -144,6 +152,7 @@
"source": [
"from shapely.geometry import Point, LineString, Polygon\n",
"\n",
"\n",
"def collision_protection_vol(x, z, d_low_x, d_low_z, lower_z, angle):\n",
" # First, get the bounding line strings of our protection volume\n",
" lower_line = LineString([Point(min(x), lower_z), Point(max(x), lower_z)])\n",
@ -169,9 +178,21 @@
" protection_area_vol = protection_area_poly.area\n",
" return protection_area_vol\n",
"\n",
"\n",
"def get_berm_width(z, d_low_x):\n",
" \"\"\"\n",
" Returns the width of the berm, defined by the distance between dune toe to z=0\n",
" \"\"\"\n",
" x_seaward_limit = z.dropna().tail(1).reset_index().x[0]\n",
" return x_seaward_limit - d_low_x\n",
"\n",
"\n",
"\n",
"\n",
"site_id = 'NARRA0018'\n",
"profile_type = 'prestorm'\n",
"query = \"site_id == '{}' and profile_type == '{}'\".format(site_id, profile_type)\n",
"query = \"site_id == '{}' and profile_type == '{}'\".format(\n",
" site_id, profile_type)\n",
"prestorm_profile = df_profiles.query(query)\n",
"profile_features = df_profile_features.query(query)\n",
"\n",
@ -182,16 +203,17 @@
"angle = 60 # degrees from the horizontal\n",
"lower_z = 0.5 # from mhw\n",
"\n",
"vol = collision_protection_vol(x,z, d_low_x, d_low_z, lower_z, angle)"
"vol = collision_protection_vol(x, z, d_low_x, d_low_z, lower_z, angle)\n",
"berm_width = get_berm_width(z, d_low_x)"
]
},
{
"cell_type": "code",
"execution_count": 58 ,
"execution_count": 5,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T01:24:18.270476 Z",
"start_time": "2018-12-03T01:24:18.119986 Z"
"end_time": "2018-12-05T02:45:54.224110 Z",
"start_time": "2018-12-05T02:45:54.030142 Z"
}
},
"outputs": [],
@ -242,39 +264,37 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": null,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-05T02:45:54.231129Z",
"start_time": "2018-12-05T02:45:54.225660Z"
}
},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 57,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T01:24:24.215223Z",
"start_time": "2018-12-03T01:24:24.210209Z"
"end_time": "2018-12-05T03:37:45.472885 Z",
"start_time": "2018-12-05T03:37:45.462857 Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"8554715.596323118"
"0.96 "
]
},
"execution_count": 59 ,
"execution_count": 57 ,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"wave_p"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T00:54:57.439956Z",
"start_time": "2018-12-03T00:54:57.425899Z"
}
},
"outputs": [],
"source": [
"def dune_toe_elevation_change(site_id, df_profile_features):\n",
" query = \"site_id == '{}'\".format(site_id)\n",
@ -283,16 +303,17 @@
" poststorm_dune_toe_z = profile_features.query(\"profile_type=='poststorm'\").dune_toe_z.tolist()[0]\n",
" return prestorm_dune_toe_z - poststorm_dune_toe_z\n",
"\n",
"toe_ele_change = dune_toe_elevation_change(\"NARRA0018\", df_profile_features)"
"toe_ele_change = dune_toe_elevation_change(\"MANNING0081\", df_profile_features)\n",
"toe_ele_change"
]
},
{
"cell_type": "code",
"execution_count": 9 2,
"execution_count": 6 2,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T03:07:48.328428 Z",
"start_time": "2018-12-03T03:06:54.182343 Z"
"end_time": "2018-12-05T03:45:45.203827 Z",
"start_time": "2018-12-05T03:45:13.608478 Z"
}
},
"outputs": [
@ -300,17 +321,12 @@
"name": "stdout",
"output_type": "stream",
"text": [
"0 of 204\n",
"20 of 204\n",
"40 of 204\n",
"60 of 204\n",
"80 of 204\n",
"100 of 204\n",
"120 of 204\n",
"140 of 204\n",
"160 of 204\n",
"180 of 204\n",
"200 of 204\n"
"0 of 816\n",
"20 of 816\n",
"40 of 816\n",
"60 of 816\n",
"80 of 816\n",
"100 of 816\n"
]
}
],
@ -319,14 +335,20 @@
"exposed_times = []\n",
"toe_ele_changes = []\n",
"wave_powers = []\n",
"berm_widths = []\n",
"swash_vol_changes = []\n",
"dune_face_vol_changes = []\n",
"site_ids_to_plot = []\n",
"\n",
"# Get site ids where we observed collision\n",
"observed_site_ids = impacts['observed'].query(\"storm_regime=='collision'\").index.get_level_values('site_id').unique()\n",
"\n",
"# Get site ids where we forecast swash\n",
"forecasted_site_ids = impacts['forecasted']['mean_slope_sto06'].query(\"storm_regime=='swash'\").index.get_level_values('site_id').unique()\n",
"# # Get site ids where we forecast swash\n",
"# forecasted_site_ids = impacts['forecasted']['mean_slope_sto06'].query(\"storm_regime=='swash'\").index.get_level_values('site_id').unique()\n",
"\n",
"# site_ids = set(observed_site_ids).intersection(set(forecasted_site_ids))\n",
"\n",
"site_ids = set(observed_site_ids).intersection(set(forecasted_site_ids))\n",
"site_ids = observed_site_ids\n",
"\n",
"# Calculate for each site\n",
"\n",
@ -351,12 +373,16 @@
" df_twl = twls['forecasted']['mean_slope_sto06']\n",
" df_twl_site = df_twl.query(\"site_id == '{}'\".format(site_id))\n",
" \n",
" berm_width = get_berm_width(z = prestorm_profile.z,\n",
" d_low_x = profile_features.dune_toe_x.tolist()[0]) \n",
" \n",
" exposed_time = wl_time(t = df_twl_site.index.get_level_values('datetime'),\n",
" wl = df_twl_site.R2.tolist(),\n",
" z_lower = profile_features.dune_toe_z.tolist()[0] -2,\n",
" z_upper = profile_features.dune_toe_z.tolist()[0],\n",
" )\n",
"\n",
" swash_vol_change = impacts['observed'].query(\"site_id == '{}'\".format(site_id)).swash_vol_change.tolist()[0]\n",
" dune_face_vol_change = impacts['observed'].query(\"site_id == '{}'\".format(site_id)).dune_face_vol_change.tolist()[0]\n",
" \n",
" power = wave_power(t = df_twl_site.index.get_level_values('datetime'),\n",
" wl = df_twl_site.R2.tolist(),\n",
@ -369,12 +395,18 @@
" except:\n",
" continue\n",
" \n",
"# print(site_id, toe_ele_change)\n",
" vols.append(vol)\n",
" exposed_times.append(exposed_time)\n",
" toe_ele_changes.append(toe_ele_change)\n",
" wave_powers.append(power)\n",
"# if n>100:\n",
"# break\n",
" berm_widths.append(berm_width)\n",
" swash_vol_changes.append(swash_vol_change)\n",
" dune_face_vol_changes.append(dune_face_vol_change)\n",
" site_ids_to_plot.append(site_id)\n",
" \n",
" if n>100:\n",
" break\n",
"\n",
" \n",
"\n"
@ -382,562 +414,38 @@
},
{
"cell_type": "code",
"execution_count": 95 ,
"execution_count": null ,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T03:12:11.598150Z",
"start_time": "2018-12-03T03:12:11.590128Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"[0.0,\n",
" 62.0,\n",
" 35.0,\n",
" 53.0,\n",
" 4.0,\n",
" 41.0,\n",
" 31.0,\n",
" 98.0,\n",
" 17.0,\n",
" 103.0,\n",
" 81.0,\n",
" 1.0,\n",
" 31.0,\n",
" 0.0,\n",
" 24.0,\n",
" 35.0,\n",
" 67.0,\n",
" 53.0,\n",
" 77.0,\n",
" 130.0,\n",
" 66.0,\n",
" 89.0,\n",
" 31.0,\n",
" 13.0,\n",
" 41.0,\n",
" 118.0,\n",
" 0.0,\n",
" 29.0,\n",
" 82.0,\n",
" 52.0,\n",
" 84.0,\n",
" 31.0,\n",
" 2.0,\n",
" 43.0,\n",
" 84.0,\n",
" 421.0,\n",
" 29.0,\n",
" 22.0,\n",
" 54.0,\n",
" 150.0,\n",
" 115.0,\n",
" 46.0,\n",
" 29.0,\n",
" 86.0,\n",
" 103.0,\n",
" 82.0,\n",
" 77.0,\n",
" 50.0,\n",
" 104.0,\n",
" 81.0,\n",
" 67.0,\n",
" 81.0,\n",
" 141.0,\n",
" 64.0,\n",
" 17.0,\n",
" 95.0,\n",
" 46.0,\n",
" 80.0,\n",
" 77.0,\n",
" 4.0,\n",
" 159.0,\n",
" 115.0,\n",
" 33.0,\n",
" 13.0,\n",
" 46.0,\n",
" 110.0,\n",
" 162.0,\n",
" 16.0,\n",
" 77.0,\n",
" 77.0,\n",
" 86.0,\n",
" 46.0,\n",
" 6.0,\n",
" 42.0,\n",
" 77.0,\n",
" 89.0,\n",
" 29.0,\n",
" 172.0,\n",
" 68.0,\n",
" 204.0,\n",
" 8.0,\n",
" 13.0,\n",
" 78.0,\n",
" 0.0,\n",
" 81.0,\n",
" 156.0,\n",
" 57.0,\n",
" 0.0,\n",
" 62.0,\n",
" 46.0,\n",
" 37.0,\n",
" 52.0,\n",
" 310.0,\n",
" 287.0,\n",
" 4.0,\n",
" 89.0,\n",
" 2.0,\n",
" 22.0,\n",
" 31.0,\n",
" 20.0,\n",
" 45.0,\n",
" 54.0,\n",
" 46.0,\n",
" 43.0,\n",
" 0.0,\n",
" 89.0,\n",
" 122.0,\n",
" 5.0,\n",
" 46.0,\n",
" 24.0,\n",
" 0.0,\n",
" 77.0,\n",
" 51.0,\n",
" 0.0,\n",
" 43.0,\n",
" 53.0,\n",
" 151.0,\n",
" 52.0,\n",
" 29.0,\n",
" 103.0,\n",
" 35.0,\n",
" 68.0,\n",
" 17.0,\n",
" 29.0,\n",
" 34.0,\n",
" 211.0,\n",
" 55.0,\n",
" 85.0,\n",
" 21.0,\n",
" 14.0,\n",
" 103.0,\n",
" 227.0,\n",
" 208.0,\n",
" 78.0,\n",
" 43.0,\n",
" 17.0,\n",
" 104.0,\n",
" 50.0,\n",
" 37.0,\n",
" 54.0,\n",
" 78.0,\n",
" 349.0,\n",
" 80.0,\n",
" 49.0,\n",
" 29.0,\n",
" 17.0,\n",
" 82.0,\n",
" 91.0,\n",
" 1.0,\n",
" 75.0,\n",
" 46.0,\n",
" 210.0,\n",
" 205.0,\n",
" 16.0,\n",
" 35.0,\n",
" 82.0,\n",
" 49.0,\n",
" 0.0,\n",
" 29.0,\n",
" 58.0,\n",
" 57.0,\n",
" 103.0,\n",
" 29.0,\n",
" 0.0,\n",
" 46.0,\n",
" 48.0,\n",
" 1.0,\n",
" 17.0,\n",
" 48.0,\n",
" 29.0,\n",
" 17.0,\n",
" 165.0,\n",
" 45.0,\n",
" 17.0,\n",
" 426.0,\n",
" 30.0]"
]
},
"execution_count": 95,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 104 ,
"execution_count": 72,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-03T03:31:19.534072 Z",
"start_time": "2018-12-03T03:31:19.439822 Z"
"end_time": "2018-12-05T05:03:39.147413Z",
"start_time": "2018-12-05T05:03:39.070207Z"
}
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "01b5e4786fd44414a38db9266df25a12 ",
"model_id": "225855bac0d0464d9be74917812c19ac",
"version_major": 2,
"version_minor": 0
},
"text/html": [
"<p>Failed to display Jupyter Widget of type <code>FigureWidget</code>.</p>\n",
"<p>\n",
" If you're reading this message in the Jupyter Notebook or JupyterLab Notebook, it may mean\n",
" that the widgets JavaScript is still loading. If this message persists, it\n",
" likely means that the widgets JavaScript library is either not installed or\n",
" not enabled. See the <a href=\"https://ipywidgets.readthedocs.io/en/stable/user_install.html\">Jupyter\n",
" Widgets Documentation</a> for setup instructions.\n",
"</p>\n",
"<p>\n",
" If you're reading this message in another frontend (for example, a static\n",
" rendering on GitHub or <a href=\"https://nbviewer.jupyter.org/\">NBViewer</a>),\n",
" it may mean that your frontend doesn't currently support widgets.\n",
"</p>\n"
],
"text/plain": [
"FigureWidget({\n",
" 'data': [{'marker': {'color': [0.6740000000000004, -0.262, 0.5449999999999999,\n",
" 0.35399999999999965, 0.3929999999999998,\n",
" 0.35399999999999965, 0.6699999999999999,\n",
" -0.22799999999999976, 1.0739999999999998,\n",
" -0.125, 0.35199999999999987, 0.5299999999999998,\n",
" 0.4109999999999996, -0.1120000000000001,\n",
" 0.9180000000000001, 0.621, -0.3579999999999992,\n",
" -0.20699999999999985, -0.48400000000000043,\n",
" 0.5430000000000001, -0.09600000000000053,\n",
" -0.41700000000000026, 0.4340000000000006,\n",
" 0.7559999999999998, 0.8720000000000003,\n",
" -0.5759999999999996, 0.5119999999999996,\n",
" 0.6440000000000001, 0.395, 0.09300000000000042,\n",
" 0.923, 0.4339999999999997, 0.5429999999999993,\n",
" -0.09699999999999998, -0.20899999999999963,\n",
" -0.8130000000000002, 0.706, 0.36399999999999944,\n",
" 0.34099999999999975, -0.08499999999999996,\n",
" 0.21799999999999953, 0.6240000000000006,\n",
" -0.16700000000000026, -0.278,\n",
" -0.5110000000000001, 0.726,\n",
" -0.35199999999999987, 0.13100000000000023,\n",
" -0.3440000000000003, 0.6760000000000002,\n",
" -0.5719999999999996, -0.4980000000000002,\n",
" -0.2020000000000004, 0.34199999999999964,\n",
" 0.41999999999999993, 0.5800000000000001,\n",
" 0.7200000000000002, 0.6230000000000002,\n",
" -0.49100000000000055, 0.11499999999999977,\n",
" -0.242, -0.6240000000000006, 0.9500000000000002,\n",
" 1.2479999999999998, 1.2889999999999997,\n",
" 0.021999999999999797, -0.3200000000000003,\n",
" 0.7829999999999999, -0.32899999999999974,\n",
" 0.3389999999999995, -0.01599999999999957,\n",
" 0.38399999999999945, -0.04599999999999982,\n",
" 0.4849999999999999, 0.02499999999999991,\n",
" -0.7749999999999999, 0.617,\n",
" -0.06500000000000039, 0.5589999999999997,\n",
" -0.1299999999999999, -0.0040000000000000036,\n",
" 1.298, 0.05500000000000016, 0.9689999999999999,\n",
" -0.28800000000000026, -0.09700000000000042,\n",
" -0.03100000000000014, 0.7960000000000003,\n",
" 0.33599999999999985, 0.28900000000000015, 0.798,\n",
" -0.05900000000000016, -0.0029999999999996696,\n",
" -0.15399999999999991, 0.31999999999999984,\n",
" -0.613, 0.2650000000000001, 0.258, 1.513,\n",
" 0.36199999999999966, 0.7849999999999997,\n",
" -0.28900000000000015, 1.0290000000000004,\n",
" 0.8260000000000005, -0.03799999999999981,\n",
" -0.21300000000000008, -0.492,\n",
" 1.6029999999999998, 0.5699999999999998,\n",
" 0.9300000000000002, 0.0389999999999997,\n",
" -0.3110000000000004, 1.0070000000000001,\n",
" 0.11500000000000021, 0.7269999999999999,\n",
" 0.30100000000000016, -0.5180000000000002,\n",
" 0.40600000000000014, 0.1389999999999998,\n",
" -0.08299999999999974, 1.174,\n",
" -0.29300000000000015, 0.036000000000000476,\n",
" 0.702, 0.49099999999999966, 0.27400000000000047,\n",
" 0.6890000000000005, 0.46199999999999974,\n",
" 0.7839999999999998, 0.2939999999999996,\n",
" 0.013000000000000345, -0.09400000000000075,\n",
" 0.022999999999999687, -0.6230000000000002,\n",
" 0.9040000000000004, 0.027000000000000135,\n",
" -0.1280000000000001, 0.25, 0.488,\n",
" -0.1200000000000001, 0.43599999999999994,\n",
" 0.04999999999999982, 0.11599999999999966,\n",
" 1.5290000000000001, 1.0189999999999997,\n",
" 0.5780000000000003, -0.4969999999999999,\n",
" -0.39800000000000013, 0.6430000000000002,\n",
" -0.04500000000000037, -0.40700000000000003,\n",
" 0.07000000000000028, -0.18599999999999994,\n",
" 1.4900000000000002, 0.2889999999999997,\n",
" -0.3719999999999999, 0.1519999999999997,\n",
" 0.10899999999999999, -0.3700000000000001,\n",
" 0.7320000000000002, -0.238,\n",
" -0.08900000000000041, 0.20699999999999985,\n",
" 0.9870000000000001, 1.9829999999999997,\n",
" 0.6460000000000004, 0.06100000000000039,\n",
" 0.06300000000000017, -0.03500000000000014,\n",
" 0.5730000000000004, 0.7640000000000002,\n",
" -0.7690000000000006, 0.5750000000000002,\n",
" 1.4529999999999998, 0.07500000000000018, 0.649],\n",
" 'colorscale': 'Viridis',\n",
" 'showscale': True,\n",
" 'size': 4},\n",
" 'data': [{'marker': {'size': 4},\n",
" 'mode': 'markers',\n",
" 'text': [0.6740000000000004<br>STOCS0025, -0.262<br>NINEMn0049,\n",
" 0.5449999999999999<br>NINEMn0043,\n",
" 0.35399999999999965<br>LHOUSEn0056,\n",
" 0.3929999999999998<br>CRESn0120,\n",
" 0.35399999999999965<br>BOOM0008,\n",
" 0.6699999999999999<br>NINEMn0028,\n",
" -0.22799999999999976<br>DIAMONDn0028,\n",
" 1.0739999999999998<br>NINEMs0019, -0.125<br>DUNBn0032,\n",
" 0.35199999999999987<br>DUNBn0048,\n",
" 0.5299999999999998<br>MANNING0076,\n",
" 0.4109999999999996<br>DIAMONDn0014,\n",
" -0.1120000000000001<br>NARRA0008,\n",
" 0.9180000000000001<br>NINEMn0036, 0.621<br>BILG0005,\n",
" -0.3579999999999992<br>CRESn0085,\n",
" -0.20699999999999985<br>SWRO0009,\n",
" -0.48400000000000043<br>NINEMs0027,\n",
" 0.5430000000000001<br>NINEMs0012,\n",
" -0.09600000000000053<br>ONEMILE0006,\n",
" -0.41700000000000026<br>CRESn0066,\n",
" 0.4340000000000006<br>NINEMn0018,\n",
" 0.7559999999999998<br>DUNBn0033,\n",
" 0.8720000000000003<br>NINEMs0036,\n",
" -0.5759999999999996<br>ENTRA0074,\n",
" 0.5119999999999996<br>NINEMn0037,\n",
" 0.6440000000000001<br>DUNBn0035, 0.395<br>CRESn0103,\n",
" 0.09300000000000042<br>NINEMs0038, 0.923<br>MONA0011,\n",
" 0.4339999999999997<br>STUART0041,\n",
" 0.5429999999999993<br>NAMB0070,\n",
" -0.09699999999999998<br>NINEMs0013,\n",
" -0.20899999999999963<br>NINEMs0047,\n",
" -0.8130000000000002<br>NINEMs0057, 0.706<br>NINEMn0053,\n",
" 0.36399999999999944<br>NINEMn0052,\n",
" 0.34099999999999975<br>ENTRA0067,\n",
" -0.08499999999999996<br>NINEMs0014,\n",
" 0.21799999999999953<br>STOCNn0047,\n",
" 0.6240000000000006<br>ENTRA0073,\n",
" -0.16700000000000026<br>NINEMs0001, -0.278<br>NINEMn0042,\n",
" -0.5110000000000001<br>ONEMILE0003, 0.726<br>GRANTSs0002,\n",
" -0.35199999999999987<br>NSHORE_n0021,\n",
" 0.13100000000000023<br>AVOCAn0008,\n",
" -0.3440000000000003<br>ENTRA0069,\n",
" 0.6760000000000002<br>NINEMs0032,\n",
" -0.5719999999999996<br>NINEMs0048,\n",
" -0.4980000000000002<br>CRESn0105,\n",
" -0.2020000000000004<br>NINEMs0031,\n",
" 0.34199999999999964<br>DUNBn0047,\n",
" 0.41999999999999993<br>STUART0050,\n",
" 0.5800000000000001<br>BLUEYS0004,\n",
" 0.7200000000000002<br>SWRO0006,\n",
" 0.6230000000000002<br>NINEMs0044,\n",
" -0.49100000000000055<br>NINEMs0020,\n",
" 0.11499999999999977<br>NINEMs0039, -0.242<br>SWRO0010,\n",
" -0.6240000000000006<br>NINEMn0047,\n",
" 0.9500000000000002<br>NAMB0068,\n",
" 1.2479999999999998<br>OLDBAR0025,\n",
" 1.2889999999999997<br>MANNING0094,\n",
" 0.021999999999999797<br>NINEMs0005,\n",
" -0.3200000000000003<br>ONEMILE0010,\n",
" 0.7829999999999999<br>GRANTSn0018,\n",
" -0.32899999999999974<br>NINEMs0028,\n",
" 0.3389999999999995<br>NSHORE_n0031,\n",
" -0.01599999999999957<br>WAMBE0012,\n",
" 0.38399999999999945<br>NARRA0024,\n",
" -0.04599999999999982<br>ONEMILE0002,\n",
" 0.4849999999999999<br>LHOUSE0006,\n",
" 0.02499999999999991<br>WAMBE0014,\n",
" -0.7749999999999999<br>DIAMONDn0013, 0.617<br>DIAMONDn0034,\n",
" -0.06500000000000039<br>ELIZA0005,\n",
" 0.5589999999999997<br>OLDBAR0023,\n",
" -0.1299999999999999<br>ENTRA0046,\n",
" -0.0040000000000000036<br>DIAMONDn0039, 1.298<br>NINEMs0040,\n",
" 0.05500000000000016<br>NINEMs0017,\n",
" 0.9689999999999999<br>NINEMn0051,\n",
" -0.28800000000000026<br>CATHIE0012,\n",
" -0.09700000000000042<br>NAMB0059,\n",
" -0.03100000000000014<br>CRESn0112,\n",
" 0.7960000000000003<br>STOCS0015,\n",
" 0.33599999999999985<br>LHOUSEn0028,\n",
" 0.28900000000000015<br>NINEMs0003, 0.798<br>STUART0045,\n",
" -0.05900000000000016<br>WAMBE0013,\n",
" -0.0029999999999996696<br>NINEMs0018,\n",
" -0.15399999999999991<br>BLUEYS0002,\n",
" 0.31999999999999984<br>NINEMs0011, -0.613<br>STUART0036,\n",
" 0.2650000000000001<br>ELIZA0003, 0.258<br>NARRA0020,\n",
" 1.513<br>NSHORE_n0028, 0.36199999999999966<br>ELIZA0007,\n",
" 0.7849999999999997<br>STOCNn0010,\n",
" -0.28900000000000015<br>STUART0058,\n",
" 1.0290000000000004<br>STOCNn0008,\n",
" 0.8260000000000005<br>STOCS0002,\n",
" -0.03799999999999981<br>NINEMs0026,\n",
" -0.21300000000000008<br>WAMBE0009, -0.492<br>MONA0009,\n",
" 1.6029999999999998<br>NARRA0022,\n",
" 0.5699999999999998<br>OLDBAR0021,\n",
" 0.9300000000000002<br>NSHORE_n0029,\n",
" 0.0389999999999997<br>ONEMILE0008,\n",
" -0.3110000000000004<br>LHOUSEn0042,\n",
" 1.0070000000000001<br>NARRA0021,\n",
" 0.11500000000000021<br>STOCS0029,\n",
" 0.7269999999999999<br>BLUEYS0001,\n",
" 0.30100000000000016<br>BOOM0009,\n",
" -0.5180000000000002<br>MANNING0042,\n",
" 0.40600000000000014<br>NINEMn0046,\n",
" 0.1389999999999998<br>LHOUSEn0069,\n",
" -0.08299999999999974<br>STOCNs0192, 1.174<br>ENTRA0065,\n",
" -0.29300000000000015<br>LHOUSEn0025,\n",
" 0.036000000000000476<br>NINEMs0007, 0.702<br>GRANTSn0013,\n",
" 0.49099999999999966<br>MANNING0095,\n",
" 0.27400000000000047<br>NINEMs0043,\n",
" 0.6890000000000005<br>ENTRA0070,\n",
" 0.46199999999999974<br>LHOUSEn0059,\n",
" 0.7839999999999998<br>LHOUSEn0057,\n",
" 0.2939999999999996<br>NINEMs0029,\n",
" 0.013000000000000345<br>LHOUSEn0030,\n",
" -0.09400000000000075<br>NINEMs0008,\n",
" 0.022999999999999687<br>MANNING0092,\n",
" -0.6230000000000002<br>MONA0012,\n",
" 0.9040000000000004<br>NSHORE_n0026,\n",
" 0.027000000000000135<br>DIAMONDn0030,\n",
" -0.1280000000000001<br>MANNING0091, 0.25<br>STUART0043,\n",
" 0.488<br>NSHORE_n0020, -0.1200000000000001<br>ELIZA0004,\n",
" 0.43599999999999994<br>SWRO0005,\n",
" 0.04999999999999982<br>HARR0050,\n",
" 0.11599999999999966<br>FOST0001,\n",
" 1.5290000000000001<br>STOCS0008,\n",
" 1.0189999999999997<br>NARRA0009,\n",
" 0.5780000000000003<br>STUART0037,\n",
" -0.4969999999999999<br>STUART0033,\n",
" -0.39800000000000013<br>STUART0046,\n",
" 0.6430000000000002<br>FOST0004,\n",
" -0.04500000000000037<br>SWRO0001,\n",
" -0.40700000000000003<br>NINEMn0054,\n",
" 0.07000000000000028<br>STOCNs0069,\n",
" -0.18599999999999994<br>STOCNn0004,\n",
" 1.4900000000000002<br>MANNING0084,\n",
" 0.2889999999999997<br>STUART0040,\n",
" -0.3719999999999999<br>NAMB0048,\n",
" 0.1519999999999997<br>BOOM0007,\n",
" 0.10899999999999999<br>NINEMn0034,\n",
" -0.3700000000000001<br>ONEMILE0001,\n",
" 0.7320000000000002<br>ENTRA0075, -0.238<br>STOCNn0011,\n",
" -0.08900000000000041<br>DIAMONDn0021,\n",
" 0.20699999999999985<br>LHOUSEn0060,\n",
" 0.9870000000000001<br>CRESn0064,\n",
" 1.9829999999999997<br>NARRA0007,\n",
" 0.6460000000000004<br>MANNING0073,\n",
" 0.06100000000000039<br>ONEMILE0005,\n",
" 0.06300000000000017<br>NINEMs0037,\n",
" -0.03500000000000014<br>LHOUSEn0061,\n",
" 0.5730000000000004<br>NINEMn0040,\n",
" 0.7640000000000002<br>AVOCAn0005,\n",
" -0.7690000000000006<br>STOCNn0041,\n",
" 0.5750000000000002<br>ELIZA0006,\n",
" 1.4529999999999998<br>ENTRA0072,\n",
" 0.07500000000000018<br>MANNING0082, 0.649<br>LHOUSEn0029],\n",
" 'type': 'scatter',\n",
" 'uid': 'bdcb15ca-50ce-42b2-8441-134aec09d1a6',\n",
" 'x': [0.0, 62.0, 35.0, 53.0, 4.0, 41.0, 31.0, 98.0, 17.0, 103.0,\n",
" 81.0, 1.0, 31.0, 0.0, 24.0, 35.0, 67.0, 53.0, 77.0, 130.0,\n",
" 66.0, 89.0, 31.0, 13.0, 41.0, 118.0, 0.0, 29.0, 82.0, 52.0,\n",
" 84.0, 31.0, 2.0, 43.0, 84.0, 421.0, 29.0, 22.0, 54.0, 150.0,\n",
" 115.0, 46.0, 29.0, 86.0, 103.0, 82.0, 77.0, 50.0, 104.0, 81.0,\n",
" 67.0, 81.0, 141.0, 64.0, 17.0, 95.0, 46.0, 80.0, 77.0, 4.0,\n",
" 159.0, 115.0, 33.0, 13.0, 46.0, 110.0, 162.0, 16.0, 77.0, 77.0,\n",
" 86.0, 46.0, 6.0, 42.0, 77.0, 89.0, 29.0, 172.0, 68.0, 204.0,\n",
" 8.0, 13.0, 78.0, 0.0, 81.0, 156.0, 57.0, 0.0, 62.0, 46.0, 37.0,\n",
" 52.0, 310.0, 287.0, 4.0, 89.0, 2.0, 22.0, 31.0, 20.0, 45.0,\n",
" 54.0, 46.0, 43.0, 0.0, 89.0, 122.0, 5.0, 46.0, 24.0, 0.0, 77.0,\n",
" 51.0, 0.0, 43.0, 53.0, 151.0, 52.0, 29.0, 103.0, 35.0, 68.0,\n",
" 17.0, 29.0, 34.0, 211.0, 55.0, 85.0, 21.0, 14.0, 103.0, 227.0,\n",
" 208.0, 78.0, 43.0, 17.0, 104.0, 50.0, 37.0, 54.0, 78.0, 349.0,\n",
" 80.0, 49.0, 29.0, 17.0, 82.0, 91.0, 1.0, 75.0, 46.0, 210.0,\n",
" 205.0, 16.0, 35.0, 82.0, 49.0, 0.0, 29.0, 58.0, 57.0, 103.0,\n",
" 29.0, 0.0, 46.0, 48.0, 1.0, 17.0, 48.0, 29.0, 17.0, 165.0,\n",
" 45.0, 17.0, 426.0, 30.0],\n",
" 'y': [15.057260981886461, 50.48600703337221, 52.22661963845738,\n",
" 49.87527193413516, 60.378091629296, 44.69467666268621,\n",
" 33.08824662372501, 69.24966143957133, 46.3983426493909,\n",
" 55.66269386408765, 50.5038685904488, 38.24722379458162,\n",
" 48.77392309821484, 34.42678889134076, 32.339772440128606,\n",
" 28.13518326624829, 54.01652317900755, 51.57523510716254,\n",
" 59.03553546603745, 52.45400614301138, 62.599820358965985,\n",
" 70.4542638944535, 24.852993645288876, 38.001197477131235,\n",
" 31.316631841848864, 64.57753852853112, 17.65164087230827,\n",
" 27.89358334754175, 61.85947610858759, 63.58558665629535,\n",
" 52.707965993289484, 54.59027355785616, 53.4369169941986,\n",
" 36.53074365372308, 60.662690901453374, 93.01545825805395,\n",
" 21.321395510574977, 47.03420447676251, 44.784472634287866,\n",
" 67.77932649819007, 77.67132854981324, 49.702151674694086,\n",
" 57.01843446390366, 57.55836238002917, 60.0758110522641,\n",
" 32.33715180121005, 57.2927341040066, 53.685587497734865,\n",
" 77.02236536546766, 46.43886428194846, 74.93504091748079,\n",
" 60.06724901876906, 77.03905086279573, 30.912726190943072,\n",
" 54.53170249189508, 53.70339057156003, 22.441638077872113,\n",
" 54.791537795661974, 62.13997820476877, 29.40727911432272,\n",
" 82.18692443832771, 61.97015902384305, 42.77787059874549,\n",
" 47.91815920377601, 52.11069344547651, 49.79396221773086,\n",
" 73.9414412498821, 37.876215036107936, 57.13461030091145,\n",
" 37.3514512031067, 59.923715953669195, 25.866493800185477,\n",
" 45.53280065268179, 27.02215306756141, 81.15248906718988,\n",
" 71.51536479781095, 45.97756678228884, 69.86050918469093,\n",
" 49.48043946500161, 57.899970620410635, 37.74710860574265,\n",
" 34.57820959659622, 55.62901703497036, 31.875858999358044,\n",
" 62.34650424255848, 73.60708709493487, 50.53187039062722,\n",
" 19.918164614381215, 41.9039188222106, 74.10573605782186,\n",
" 42.98820404001569, 70.89929008060581, 91.11150252345915,\n",
" 103.92435818263927, 25.781875086423824, 65.08855861060485,\n",
" 32.16685072172824, 26.3774436608266, 49.37115355443433,\n",
" 19.700396999896146, 45.0105834352614, 46.43117556836857,\n",
" 25.19648137654068, 58.46871157481417, 16.8505048443866,\n",
" 75.37390874203606, 68.1773833511795, 14.320950372734673,\n",
" 46.84538149567382, 51.48000161377281, 53.437015226686775,\n",
" 45.40805859249032, 40.76201971776089, 50.89636554048608,\n",
" 57.403293218019435, 54.46366012058966, 64.73300675848911,\n",
" 55.16180585094216, 41.57191993591717, 63.75449963841763,\n",
" 35.469027712428435, 56.59236212355033, 31.326546007774674,\n",
" 37.03650824212717, 31.520950268291358, 58.44841826927378,\n",
" 46.28021033720412, 54.90788208817708, 29.509983621209795,\n",
" 34.0063988459262, 64.86742099649922, 59.221944976590606,\n",
" 74.9874011223268, 55.207330372211956, 26.000385560413722,\n",
" 39.945013530743594, 37.27891136273222, 59.478825901465555,\n",
" 57.3560107484194, 57.08482809741879, 24.933290176259288,\n",
" 88.35412756202288, 42.25595601431678, 56.81861249472931,\n",
" 32.63000580753741, 36.79710517558988, 58.3621888814069,\n",
" 70.12310930216574, 34.01482594371291, 58.839577879424155,\n",
" 55.252330933788805, 78.22085308306589, 59.782634298874065,\n",
" 28.36317684006946, 43.8967970926609, 47.27816880026671,\n",
" 21.722947051488013, 19.58764895174499, 38.591489138007844,\n",
" 50.57685864743641, 63.74425935533099, 82.20046361640517,\n",
" 44.20822435998208, 26.438775903302503, 50.05321159752885,\n",
" 54.12827133882625, 24.70991457046442, 60.9358370882951,\n",
" 54.14071472699229, 27.848684395204568, 52.36273443570386,\n",
" 71.01829280596758, 46.862832006518445, 15.790885970513834,\n",
" 89.42388399872287, 53.47096959758166]}],\n",
" 'layout': {'title': 'Dune Collision Protection',\n",
" 'xaxis': {'autorange': True, 'showgrid': True, 'showline': True, 'title': 'Exposed time', 'zeroline': True},\n",
" 'yaxis': {'autorange': True,\n",
" 'showgrid': True,\n",
" 'showline': True,\n",
" 'title': 'Collision protection volume',\n",
" 'zeroline': True}}\n",
"})"
" 'text': [-0…"
]
},
"metadata": {},
@ -946,18 +454,18 @@
],
"source": [
"trace1 = go.Scatter(\n",
" x=[x.total_seconds() / 60 / 60 for x in exposed_times] ,\n",
" y=vols,\n",
" text = ['{}<br>{}'.format(ele, site_id) for ele,site_id in zip(toe_ele_changes,site_ids)],\n",
" x=berm_widths ,\n",
" y=dune_face_ vol_change s,\n",
" text = ['{}<br>{}'.format(ele, site_id) for ele,site_id in zip(toe_ele_changes,site_ids_to_plot )],\n",
" mode='markers',\n",
" marker=dict(\n",
" size=4,\n",
"# color = [-1 if x<0 else 1 for x in toe_ele_changes],\n",
" color = toe_ele_changes,\n",
"# color = wave_power s,\n",
"# color = toe_ele_changes,\n",
"# color = dune_face_vol_change s,\n",
"# color = [x.total_seconds() / 60 / 60 for x in exposed_times],\n",
" colorscale='Viridis',\n",
" showscale=True\n",
"# colorscale='Viridis',\n",
"# showscale=True\n",
" ))\n",
"\n",
"layout = go.Layout(\n",
@ -966,14 +474,14 @@
"# legend=dict(font={'size': 10}),\n",
"# margin=dict(t=50, b=50, l=50, r=20),\n",
" xaxis=dict(\n",
" title='Exposed time ',\n",
" title='Berm width ',\n",
" autorange=True,\n",
" showgrid=True,\n",
" zeroline=True,\n",
" showline=True,\n",
" ),\n",
" yaxis=dict(\n",
" title='Collision protection volum e',\n",
" title='Dune face vol chang e',\n",
" autorange=True,\n",
" showgrid=True,\n",
" zeroline=True,\n",
@ -983,6 +491,74 @@
"g_plot = go.FigureWidget(data=[trace1], layout=layout)\n",
"g_plot"
]
},
{
"cell_type": "code",
"execution_count": 51,
"metadata": {
"ExecuteTime": {
"end_time": "2018-12-05T03:15:46.517975Z",
"start_time": "2018-12-05T03:15:46.512936Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"[64.5799,\n",
" 21.0163,\n",
" 38.106,\n",
" 28.101,\n",
" 58.7247,\n",
" 33.5534,\n",
" 71.1675,\n",
" 52.6043,\n",
" 50.5765,\n",
" 39.9074,\n",
" 67.8385,\n",
" 43.9043,\n",
" 39.8181,\n",
" 37.7153,\n",
" 20.4454,\n",
" 39.7757,\n",
" 42.1843,\n",
" 33.6152,\n",
" 42.9587,\n",
" 39.9773,\n",
" 35.7835,\n",
" 31.2884,\n",
" -0.4618,\n",
" 31.0094,\n",
" 33.3479,\n",
" 47.8394,\n",
" 32.3566,\n",
" 36.5205,\n",
" 45.7109,\n",
" 16.0687,\n",
" 35.4375,\n",
" 43.327,\n",
" 53.5016,\n",
" 31.0357,\n",
" 47.6528,\n",
" 25.5658,\n",
" 41.0514,\n",
" 28.1645,\n",
" 44.5443,\n",
" 42.925,\n",
" 33.9535,\n",
" 36.2626,\n",
" 35.2536]"
]
},
"execution_count": 51,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# impacts['observed']\n",
"swash_vol_changes"
]
}
],
"metadata": {
@ -1001,7 +577,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.4 "
"version": "3.6.7 "
},
"toc": {
"base_numbering": 1,
@ -1014,7 +590,7 @@
"toc_cell": false,
"toc_position": {},
"toc_section_display": true,
"toc_window_display": fals e
"toc_window_display": tru e
},
"varInspector": {
"cols": {