next up previous contents
Next: Program Descriptions Up: Preparation of model grid Previous: Checking and smoothing the

Placement of open boundaries - Trimming the model grid

There remains the need to trim off surplus parts of the model grid, or in other words, to create open boundaries at the desired locations. Load the SPLITTER program and enter the name of the current version of the model grid, mod1s.ngh . While it is possible to remove all three surplus areas, MNCB, PQED and RSAF in one session, it is better while learning TRIGRID to remove these one at a time. The procedure described below is then the same whether one is trimming off an unwanted section of a grid, or splitting a grid into two parts, both of which may be required for separate modelling projects or other purposes.

Suppose that in this SPLITTER session, the intention is to trim off the surplus portion PQED from mod1s.ngh . Window in until the display shows approximately the same part of the grid as appears in Figure 3.8, that is, area PQED surrounded by a generous margin. Return to the top window and pick SPLIT. You will then be prompted to design a so-called "splitting polygon". Where the required open boundary is a single straight line, as in this case, there is only one side of the splitting polygon whose positioning is critical, obviously line 1-2 in Figure 3.8.

Figure: Splitting polygon used at eastern boundary showing nodes moved to the polygon line before splitting.

In order to be able to compare your output with the corresponding file supplied, it will be necessary to place the open boundary in exactly the same position as was used when the demonstration case was prepared. Choose option 'K', which allows you to enter the coordinates of vertices of the splitting polygon, then enter the following pairs of coordinates in turn: (9.75,3.75), (8.75,6.75), (11.0,6.75), and (11.0,3.75) to obtain the polygon shown in Figure 3.8. (See the file polyeast.dat in the demodata directory). Note that the splitting operation reduces the original grid to two independent sub-grids, both in NEIGH format, one consisting of the part inside the splitting polygon, the other consisting of the part outside, therefore it does not matter whether the splitting polygon encloses the part to be removed or the part to be retained.

The next step is to designate which side of the splitting polygon to work on first. Only the side 1-2 cuts across the original grid in this case, so pick vertices 1 and 2 in turn with the cursor. It is clear that if the grid were split into two at this time, along line 1-2, the resulting sub-grids would have some non-triangular elements, since 1-2 bisects some of the existing triangles. To avoid this problem, a string of nearby nodes must be chosen and moved to lie exactly on line 1-2. Then all elements in both sub-grids will still be triangular after splitting takes place.

Nodes may be moved to the splitting line either semi- automatically or manually. Choose 'AUTO', then 'MOVE', and pick point A (Fig. 3.8) with the mouse. (Since this will be the first node picked in this SPLITTER session, there has been no chance for the program to adjust the cursor sensitivity: note the temporary white marker indicating which node has actually been picked: if the wrong node is selected, complete the move? (no quit?), then cancel it and pick again; the white marker should confirm that the correct node has been selected this time). Because A is a boundary node, its new location at the intersection of the splitting line and the existing boundary segment must be designated manually with the mouse, otherwise the new boundary will not coincide with the original one.

Then proceed along the splitting line moving the interior nodes shown in Figure 3.8 in turn to the line by picking 'M'. In 'AUTO' mode, interior nodes drop perpendicularly to the splitting line once designated with the cursor. Node B on the other hand, being a boundary node, like node A, must have its destination picked with the cursor. (Note that the final coordinates for nodes A and B may not correspond exactly to those given in the corresponding file supplied, because the locations of A and B are selected manually).

When all the nodes shown in Fig. 3.8 have been moved to the splitting line, pick option 'D' rather than 'M'. The program will now prompt for computational codes to be assigned to each of the nodes along the splitting line. The codes which have been used in this demonstration case are 6 for nodes A and B, where the new elevation-forced boundary meets land, and 5 for the other (previously interior) nodes on A-B, which now are nodes where forcing elevations will be supplied during a model run.

After the codes have been entered, the program asks if more sides of the polygon have to be treated. In the present case, since only one side of the splitting polygon polygon transects the grid, preparations for splitting are complete, so answer pick 'N'. The program will then enquire whether each of the two subgrids produced by splitting is to be saved. In this case, the subgrid inside the polygon need not be saved, since it comprises part PQED which is not required. However, save the subgrid lying outside the splitting polygon and compare it with the corresponding file mod1sa.ngh supplied.

Next position open boundary M-N by feeding mod1sa.ngh to the Splitter as input and removing area MNCB by repeating the whole procedure described above. This time, use the polygon (3.0,1.0), (10.0,3.0), (11.0,1.0),and (3.0,0.0) (or read polysout.dat). The first 2 points are the endpoints of the polygon side which transects the grid (see Figure 3.9). Save grid and compare it to mod1sb.ngh. Use the output grid from this operation for input to a final Splitter session to remove area RSAF, this time using the polygon (0.5,12.75), (6.5,11.0), (6.5,14.0), and (0.5,14.0) (or read polynort.dat). The first 2 points are the endpoints of the line cutting the grid (see Figure 3.10). Compare the final output to file mod2.ngh supplied as part of the demonstration data (see Figure 3.11).

Figure: Splitting polygon used at southern boundary showing nodes moved to the polygon line before splitting.

Figure: Splitting polygon used at northern boundary showing nodes moved to the polygon line before splitting.

Figure: The model grid after use of the splitter to remove the three unwanted parts of the initial grid.

Further practice in use of the Splitter can be obtained by going back to mod1s.ngh as input and designing a splitting polygon enclosing part MNPQRS which is required as the final grid, and then removing the three unwanted portions MNCB, PQED, RSAF in one session. Preferably, define the three sides of the polygon which transect the grid using the same coordinates for the endpoints as are given above. In this case, when nodes have been moved to the first splitting line, answer 'M' to the prompt 'More sides?' and proceed to move nodes to the second splitting line and similarly the third. Save the grid inside the splitting polygon and compare it to the grid obtained earlier when MNCB, PQED, RSAF were removed in three separate operations. Slight differences in the final locations of the nodes at the ends of the three open boundaries are likely in view of the fact that these nodes are moved manually.

Other points to bear in mind when using the Splitter are as follows.

  1. A very important requirement in choosing which internal nodes to move to a splitting line is that each node moved should be a neighbour of the previous node moved to the line. For instance in Figure 3.8, if nodes ..a,e,c,.. were moved in that order to the splitting line instead of ..a,b,c,.. then the line b-d would be left intersecting the splitting line, causing errors in the resulting subgrids;
  2. It may be necessary to use the option 'W' to window in on a part of the splitting line to see which nodes to move, and then again to pan along the line to move more nodes. Remember to window out till the whole line is visible in the viewing window before picking 'D' to indicate the side is finished, otherwise not all the markers prompting for input of computational codes will all be visible;
  3. There is a 'quick and dirty' way of splitting a grid, which is sometimes useful when the position and shape of an open boundary is not of prime importance. For instance, if a model grid is split into two subgrids, and a corresponding depth grid is required for one subgrid, then the original depth grid can be split using this quick method, along a line placed a generous distance beyond the open boundary of the model subgrid. One follows the usual splitting procedure but simply omits moving nodes to the splitting line. On splitting, all node connections intersected by the splitting line are discarded, or in other words, all triangles crossed by the splitting line are eliminated, leaving two disjoint subgrids with irregular open boundaries on which the nodes retain their original computational codes; if necessary, boundary codes can be inserted later with the Editor.

Creating the open boundaries almost at the end of the process of developing the model grid has the advantage that these boundaries can easily be repositioned if subsequent modelling needs so dictate. Only the splitting stage has to be repeated.

After the surplus parts of the model grid have been trimmed off with the Splitter, the grid obtained should be loaded into the Editor and the integrity of the boundaries checked with the option {.TEST}CHECKNODES . A final smoothing is worthwhile, to improve triangle shape near the newly created open boundaries; do this by applying {.EDIT}RESHAPE while the whole grid is displayed in the viewing window. Save this file and compare it to mod3.ngh in the demonstration data.

A this point, a grid has been created that s suitable for model input. However, in all the grid manipulations and smoothing, depth has been linearly interpolated from grid to grid. Hence the depths may be inaccurate because of an accumulation of interpolation errors. Thus program REDEP is used to interpolate depth directly from the depth grid to the model grid.

Go to the TRIGRID menu and run program REDEP. After introductory messages, the user is prompted for the reference grid file. Enter dep.ngh. Next, the user is prompted for the model grid needing revision. Enter mod3.ngh. During the program execution, information and error messages are written to file redep.log with a summary displayed on the computer display. Finally, the user is prompted for the name of the revised output grid file. This file can be compared to mod4.ngh in the demonstration data.

Having finished the process of model grid generation, the grid may now be used with a model pre-processor, and finally with model calculations. After an examination of the model results, there is frequently a need for some grid modifications such as local refinement. This can be accomplished in the editor, with the grid then going directly back for model calculations.

next up previous contents
Next: Program Descriptions Up: Preparation of model grid Previous: Checking and smoothing the

Channel Consulting Ltd.