Description
In case you have results from a very large model and want to use the bathymetry in part of this domain for further simulations, you can extract the local information from the dfsu result file and create a mesh.
To produce a mesh for a local area follow these three (or four) steps.
#01 – Open result file in Data Extraction FM to extract results from subdomain
#02 – Use Mesh Converter from MIKE Zero toolbox to create the mesh
#03 – Open mesh file in Data Viewer and modify boundary code values
#04 – If required, use Data Viewer to reproject the mesh
An example is given below. Although this involves a simple mesh we shall use results from the MIKE 21 SW North Sea example as input. The aim is to create a mesh bathymetry file for the inner Danish waters that are defined in UTM-33.
#01 – Open result file in Data Extraction FM to extract results from subdomain
Open the dfsu result file in Data Extraction FM. Select the first item and the first time step from the result, and define the local output area to extract, see Fig. 1.
Then create the new file. The result is shown in Fig. 2.
Fig. 1 – Data Extraction – defining local output area
Fig. 2 – Data Extraction – Resulting subdomain file
#02 – Use Mesh Converter from MIKE Zero toolbox to create the mesh
Open MIKE Zero toolbox and select the Mesh Converter tool.Create a new setup, select the file format ‘Dfsu result file’ and load the newly created dfsu file. Finally, define the name of the output mesh and execute the model. See Fig. 3.
The bathymetry values are derived from the static item in the dfsu file and saved in the mesh. The resulting mesh is shown in Fig. 4.
Fig. 3 – Mesh Converter – Left: select tool in MIKE Zero toolbox, Right: Define input format as dfsu file
#03 – Open mesh file in Data Viewer and modify boundary code values
Before the new mesh can be used in a simulation, the nodes on the boundary that were originally internal water nodes need to be modified. Open the mesh in Data Viewer and select to show ‘Code value’, see Fig. 5.
Fig. 5 – Data Viewer – Showing code values
Before selecting the new boundary nodes, disable the default setting in Item Selection Filters such that node points with code value 0 can be selected, see Fig. 6.
Fig. 6 – Disable default Item Selection Filter in Data Viewer
Now select the nodes that is to become the new boundary and modify the value. In this case the boundary is defined as an open boundary with code value 2, see Fig. 7.
Fig. 7 – Selecting and modifying code values in Data Viewer
You can save the mesh under a new name. The resulting mesh codes is shown in Fig. 8. The mesh is now ready to be used in a new simulation.
Fig. 8 – Resulting mesh in Data Viewer
#04 – Use Data Viewer to reproject the mesh
In this case the original dfsu data file is saved in UTM-32, but the new mesh should be defined in UTM-33.
To change the projection, open the mesh in Data Viewer and select ‘Reproject mesh to’ from the Data menu. Specify the new map projection and press OK, see Fig. 9.
Fig. 9 – Reprojecting mesh in Data Viewer
The resulting mesh in the new map projection is shown in Fig. 10.
Fig. 10 – Mesh in original map projection (left)
vs. mesh in new map projection (right).
Tips: It is recommended to show the mesh along with background tiles in Data Viewer in order to validate the location of the new mesh.