Skip to content

Commit 2d6ada5

Browse files
committed
reorganize and add more discriptions
1 parent 35f8d70 commit 2d6ada5

1 file changed

Lines changed: 56 additions & 33 deletions

File tree

examples/grid_convergence.ipynb

Lines changed: 56 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"id": "8a52864e",
66
"metadata": {},
77
"source": [
8-
"# Grid Convergence for the TRTS \n",
8+
"# Convergence for the TRTS \n",
99
"This is an example of a grid conergence study using a Delft3d case on the Tanana River Test Site (TRTS) located in Nenana, Alaska. In the figure shown bellow is the arial veiw of the test site with the river entering from the bottom of the image and exiting at the top. THe TRTS is used as a test deploment location for Current Energy Converters (CECs). The figure shows an example of a set of transects taken to survey the test site. This particular set of trasects was taken without a CEC in the water, however, a similar patern of trasects would be used if a CEC was operating. This experimental data is used as a comparison for the Delft3D model. Befor comparing to experimental data a grid convergence study is done on the DElft3D modle. The IEC 62600-301 specifies that the grid should be refined so the Grid convergence Idex (GCI) is less than 6% for water level and depth-averaged current speed. The TRTS Delft3D grid used a retagular grid squar grid cells. This example will plot the depth-averaged current speed and water level for the TRTS model with a 8m, 4m, 2m and 1m grid cell edge length.\n",
1010
"\n",
1111
"<img src=\"data/river/ADCP_transect/transects_w_labels.png\" /> \n",
@@ -33,45 +33,20 @@
3333
},
3434
{
3535
"cell_type": "markdown",
36-
"id": "2ab347c4",
36+
"id": "32f2da89",
3737
"metadata": {},
3838
"source": [
39-
"## Load data"
39+
"# Points for Convergence Comparisons "
4040
]
4141
},
4242
{
4343
"cell_type": "markdown",
44-
"id": "5a153432",
45-
"metadata": {},
46-
"source": [
47-
"### Load Delft3d Data\n",
48-
"\n",
49-
"Load the Delft3D model output for all the grid lenghs: 8m, 4m, 2m, and 1m. \n"
50-
]
51-
},
52-
{
53-
"cell_type": "code",
54-
"execution_count": 11,
55-
"id": "be06f1b2",
56-
"metadata": {},
57-
"outputs": [],
58-
"source": [
59-
"# Load the NetCDF file\n",
60-
"dataset_8m_raw = netCDF4.Dataset(\"data/river/d3d/convergence/grid/FlowFM_map_8m.nc\") #FlowFM_8m_map.nc # test was run on th HPC cluster\n",
61-
"## Test xarray input #dataset_8m_xr = xr.open_dataset('FlowFM_8m_map.nc')\n",
62-
"dataset_4m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_4m_map.nc')\n",
63-
"#dataset_2m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_map_2m.nc')\n",
64-
"dataset_1m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_1m_map.nc')"
65-
]
66-
},
67-
{
68-
"cell_type": "markdown",
69-
"id": "6f327230",
44+
"id": "bc08034f",
7045
"metadata": {},
7146
"source": [
7247
"### Load River Shape \n",
7348
"\n",
74-
"Load the shape of the river to calculate the centerline points. The shape of the river was found by doing a bathimetric survey. "
49+
"Load the shape of the river to calculate the centerline points. The shape of the river was found by doing a bathimetric survey."
7550
]
7651
},
7752
{
@@ -92,7 +67,7 @@
9267
"id": "688329f3",
9368
"metadata": {},
9469
"source": [
95-
"## Centerline Points \n",
70+
"#### Centerline Points \n",
9671
"Use pygeoops to find the centeline shape. Then the shape is used to find 100 points on the cneterline."
9772
]
9873
},
@@ -280,6 +255,41 @@
280255
"centerline_points"
281256
]
282257
},
258+
{
259+
"cell_type": "markdown",
260+
"id": "0a8028a1",
261+
"metadata": {},
262+
"source": [
263+
"# Grid Convergence \n",
264+
"\n",
265+
"The TRTS Delft3D grid used a rectangular grid square grid cells. This example will plot the depth-averaged current speed and water level for the TRTS model with a 8m, 4m, 2m and 1m grid cell edge length.\n"
266+
]
267+
},
268+
{
269+
"cell_type": "markdown",
270+
"id": "5a153432",
271+
"metadata": {},
272+
"source": [
273+
"### Load Delft3d Data\n",
274+
"\n",
275+
"Load the Delft3D model output for all the grid lenghs: 8m, 4m, 2m, and 1m. \n"
276+
]
277+
},
278+
{
279+
"cell_type": "code",
280+
"execution_count": 11,
281+
"id": "be06f1b2",
282+
"metadata": {},
283+
"outputs": [],
284+
"source": [
285+
"# Load the NetCDF file\n",
286+
"dataset_8m_raw = netCDF4.Dataset(\"data/river/d3d/convergence/grid/FlowFM_map_8m.nc\") #FlowFM_8m_map.nc # test was run on th HPC cluster\n",
287+
"## Test xarray input #dataset_8m_xr = xr.open_dataset('FlowFM_8m_map.nc')\n",
288+
"dataset_4m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_4m_map.nc')\n",
289+
"#dataset_2m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_map_2m.nc')\n",
290+
"dataset_1m_raw = netCDF4.Dataset('data/river/d3d/convergence/grid/FlowFM_1m_map.nc')"
291+
]
292+
},
283293
{
284294
"cell_type": "markdown",
285295
"id": "343f0251",
@@ -752,7 +762,8 @@
752762
"id": "3fc0429e",
753763
"metadata": {},
754764
"source": [
755-
"# Layer Convergence"
765+
"# Layer Convergence\n",
766+
"This Delft3D grid utalizes sigma layers that mantian a constant number of layers through the variable depths of the river [D3D tecnicl refence manual]. This convergence study will ensure that the water level and depth averaged velocity have a GCI less than 6%. THe number of layers tested are 5, 10, 15, and 20. "
756767
]
757768
},
758769
{
@@ -1013,7 +1024,11 @@
10131024
"id": "0ea7a1d4",
10141025
"metadata": {},
10151026
"source": [
1016-
"# Time Convergence "
1027+
"# Time Convergence \n",
1028+
"\n",
1029+
"The time convergence looks at the Courant-Friedrichs-Lewy number (CFL) to ensure that th model has ran long enough. THe CFL numder is a measure of the time step to grid size. CFL number 0.35, 0.7, 1.4, and 2.8 ar tested for confergence. \n",
1030+
"\n",
1031+
"$CFL= \\frac{u\\Delta t}{\\Delta x}$"
10171032
]
10181033
},
10191034
{
@@ -1038,6 +1053,14 @@
10381053
"dataset_CFL_28_raw = netCDF4.Dataset('data/river/d3d/convergence/time/FlowFM_CFL2.8_map.nc')"
10391054
]
10401055
},
1056+
{
1057+
"cell_type": "markdown",
1058+
"id": "76eca344",
1059+
"metadata": {},
1060+
"source": [
1061+
"## Depth Averaged Velocity "
1062+
]
1063+
},
10411064
{
10421065
"cell_type": "code",
10431066
"execution_count": 34,

0 commit comments

Comments
 (0)