From faae7cf39a380608a03a8bc815c330f26626b24c Mon Sep 17 00:00:00 2001 From: Jack Loveless Date: Tue, 23 Jul 2024 12:09:48 -0400 Subject: [PATCH] Ribbon meshing filename cleanup --- data/command/japan_command_ribbonmesh.json | 4 +- .../japan_mesh_parameters_ribbonmesh.json | 4 +- ...justed_segment_ribbonmesh_ribbonmesh1.msh} | 0 ...justed_segment_ribbonmesh_ribbonmesh2.msh} | 0 notebooks/segment_meshing.ipynb | 37 +++++++++---------- 5 files changed, 22 insertions(+), 23 deletions(-) rename data/mesh/{japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh1.msh => japan_new380_adjusted_segment_ribbonmesh_ribbonmesh1.msh} (100%) rename data/mesh/{japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh2.msh => japan_new380_adjusted_segment_ribbonmesh_ribbonmesh2.msh} (100%) diff --git a/data/command/japan_command_ribbonmesh.json b/data/command/japan_command_ribbonmesh.json index c47d427..ed2da07 100644 --- a/data/command/japan_command_ribbonmesh.json +++ b/data/command/japan_command_ribbonmesh.json @@ -42,7 +42,7 @@ "mogi_file_name": "../data/mogi/japan_mogi.csv", "n_iterations": 1, "operators_folder": "../data/operators/", - "output_path": "../runs/0000000038", + "output_path": "../runs/0000000041", "pickle_save": 1, "plot_estimation_summary": 1, "plot_input_summary": 1, @@ -53,7 +53,7 @@ "reuse_elastic": 1, "reuse_elastic_file": "../data/operators/japan_elastic_operators.hdf5", "ridge_param": 0, - "run_name": "0000000038", + "run_name": "0000000041", "sar_file_name": "", "sar_ramp": 0, "sar_weight": 0, diff --git a/data/mesh/japan_mesh_parameters_ribbonmesh.json b/data/mesh/japan_mesh_parameters_ribbonmesh.json index 90c3913..ddaa007 100644 --- a/data/mesh/japan_mesh_parameters_ribbonmesh.json +++ b/data/mesh/japan_mesh_parameters_ribbonmesh.json @@ -28,7 +28,7 @@ "a_priori_slip_filename": "" }, { - "mesh_filename": "../data/mesh/ribbon_mesh1.msh", + "mesh_filename": "../data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh1.msh", "smoothing_weight": 1.0, "n_eigen": 10, "top_slip_rate_constraint": 0, @@ -48,7 +48,7 @@ "ds_slip_constraint_weight": [] }, { - "mesh_filename": "../data/mesh/ribbon_mesh2.msh", + "mesh_filename": "../data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh2.msh", "smoothing_weight": 1.0, "n_eigen": 10, "top_slip_rate_constraint": 0, diff --git a/data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh1.msh b/data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh1.msh similarity index 100% rename from data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh1.msh rename to data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh1.msh diff --git a/data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh2.msh b/data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh2.msh similarity index 100% rename from data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbon_mesh2.msh rename to data/mesh/japan_new380_adjusted_segment_ribbonmesh_ribbonmesh2.msh diff --git a/notebooks/segment_meshing.ipynb b/notebooks/segment_meshing.ipynb index 9b6aae4..d0537d9 100644 --- a/notebooks/segment_meshing.ipynb +++ b/notebooks/segment_meshing.ipynb @@ -13,7 +13,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": 2, "metadata": { "execution": { "iopub.execute_input": "2021-08-22T18:29:51.661926Z", @@ -57,7 +57,7 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": 3, "metadata": {}, "outputs": [], "source": [ @@ -69,7 +69,7 @@ }, { "cell_type": "code", - "execution_count": 5, + "execution_count": 4, "metadata": { "execution": { "iopub.execute_input": "2021-08-22T18:29:53.570589Z", @@ -85,22 +85,22 @@ "name": "stdout", "output_type": "stream", "text": [ - "\u001b[32m2024-07-23 11:53:10.990\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6343\u001b[0m - \u001b[1mRead: ../data/command/japan_command.json\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.991\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6344\u001b[0m - \u001b[1mRUN_NAME: 0000000038\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.991\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6345\u001b[0m - \u001b[1mWrite log file: ../runs/0000000038/0000000038.log\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.992\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m302\u001b[0m - \u001b[1mReading data files\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.996\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m306\u001b[0m - \u001b[32m\u001b[1mRead: ../data/segment/japan_new380_adjusted_segment_ribbonmesh.csv\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.997\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m311\u001b[0m - \u001b[32m\u001b[1mRead: ../data/block/japan_block.csv\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:10.998\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m318\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan_mesh_parameters.json\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.385\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6343\u001b[0m - \u001b[1mRead: ../data/command/japan_command.json\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.385\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6344\u001b[0m - \u001b[1mRUN_NAME: 0000000039\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.386\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mget_logger\u001b[0m:\u001b[36m6345\u001b[0m - \u001b[1mWrite log file: ../runs/0000000039/0000000039.log\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.386\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m302\u001b[0m - \u001b[1mReading data files\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.391\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m306\u001b[0m - \u001b[32m\u001b[1mRead: ../data/segment/japan_new380_adjusted_segment_ribbonmesh.csv\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.393\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m311\u001b[0m - \u001b[32m\u001b[1mRead: ../data/block/japan_block.csv\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.394\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m318\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan_mesh_parameters.json\u001b[0m\n", "\n", - "\u001b[32m2024-07-23 11:53:11.065\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/nankai.msh\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.466\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/nankai.msh\u001b[0m\n", "\n", - "\u001b[32m2024-07-23 11:53:11.093\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan.msh\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.494\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/japan.msh\u001b[0m\n", "\n", - "\u001b[32m2024-07-23 11:53:11.130\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/sagami.msh\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:11.134\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m500\u001b[0m - \u001b[32m\u001b[1mRead: ../data/station/japan_station.csv\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:11.135\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m519\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mogi/japan_mogi.csv\u001b[0m\n", - "\u001b[32m2024-07-23 11:53:11.136\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m537\u001b[0m - \u001b[1mNo sar_file_name\u001b[0m\n" + "\u001b[32m2024-07-23 12:03:25.529\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m464\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mesh/sagami.msh\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.533\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m500\u001b[0m - \u001b[32m\u001b[1mRead: ../data/station/japan_station.csv\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.535\u001b[0m | \u001b[32m\u001b[1mSUCCESS \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m519\u001b[0m - \u001b[32m\u001b[1mRead: ../data/mogi/japan_mogi.csv\u001b[0m\n", + "\u001b[32m2024-07-23 12:03:25.536\u001b[0m | \u001b[1mINFO \u001b[0m | \u001b[36mceleri.celeri\u001b[0m:\u001b[36mread_data\u001b[0m:\u001b[36m537\u001b[0m - \u001b[1mNo sar_file_name\u001b[0m\n" ] } ], @@ -132,7 +132,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 5, "metadata": {}, "outputs": [], "source": [ @@ -201,7 +201,6 @@ " # Use top and bottom coordinates to make a mesh\n", " filename = mesh_dir + '/' + seg_file_stem + '_ribbonmesh' + str(i+1)\n", " clen = 5\n", - " # ribbon_mesh(top_coords, np.flipud(bot_coords), 'ribbon_test.msh', 5)\n", " \n", " # Combined coordinates making a continuous perimeter loop\n", " all_coords = np.vstack((top_coords, np.flipud(bot_coords)))\n", @@ -308,7 +307,7 @@ "\n", "# Assign all parameters to newly created meshes\n", "for j in range(i+1):\n", - " filename = mesh_dir + '/ribbon_mesh' + str(j+1)\n", + " filename = mesh_dir + '/' + seg_file_stem + '_ribbonmesh' + str(j+1)\n", " new_entry = {'mesh_filename': filename + '.msh'}\n", " for key, value in mesh_default.items():\n", " new_entry[key] = value\n",