Skip to content

Commit

Permalink
Clarify the grid file.
Browse files Browse the repository at this point in the history
  • Loading branch information
alarshi committed Jan 23, 2025
1 parent 294d9d7 commit cbc1d6f
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions contrib/creating-world-notebook/GWB_module.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 1,
"metadata": {
"executionInfo": {
"elapsed": 155,
Expand Down Expand Up @@ -108,15 +108,14 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# The `.wb` file follows a json schema describing the global parameters and the model features.\n",
"# The schema can be used to investigate the available model features how to describe them \n",
"# in GWB.\n",
"\n",
"#TODO: Change the path below \n",
"schema_file = open('../../doc/world_builder_declarations.schema.json')\n",
"gwb_schema = json.load(schema_file)"
]
Expand All @@ -132,7 +131,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -148,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -186,7 +185,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -223,7 +222,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -238,7 +237,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 7,
"metadata": {},
"outputs": [
{
Expand All @@ -254,14 +253,17 @@
"CompletedProcess(args='../../build/bin/gwb-grid my_world_builder.wb cartesian_surface.grid', returncode=0)"
]
},
"execution_count": 10,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"# STEP 4: Run the GWB using the .wb file generated above using the\n",
"# accompanying .grid file\n",
"# accompanying .grid file, 'cartesian_surface.grid'\n",
"# This .grid file is a simple text file that contains the extent and\n",
"# the discretization of the grid. We need to make sure that the extent \n",
"# of the grid is big enough to include all the plates.\n",
"\n",
"gwb_grid_location = \"../../build/bin/gwb-grid \"\n",
"grid_file_name = \" cartesian_surface.grid\"\n",
Expand All @@ -284,7 +286,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 8,
"metadata": {
"id": "RqKJjV7K6w8H"
},
Expand Down Expand Up @@ -318,7 +320,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 9,
"metadata": {
"executionInfo": {
"elapsed": 145,
Expand All @@ -340,7 +342,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 10,
"metadata": {},
"outputs": [],
"source": [
Expand Down Expand Up @@ -378,8 +380,7 @@
" center=dict(x=0, y=0, z=0))\n",
"\n",
"fig.update_scenes(aspectmode='data')\n",
"fig.update_layout(scene_camera=camera, title=\"GWB Output\")\n",
"#fig.show()"
"fig.update_layout(scene_camera=camera, title=\"GWB Output\")"
]
},
{
Expand Down Expand Up @@ -410,7 +411,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "base",
"language": "python",
"name": "python3"
},
Expand Down

0 comments on commit cbc1d6f

Please sign in to comment.