Detran
User Manual
Version 1.00
July 2010
An OpenEarth Product
Detran (DElft TRansport ANalyzer) is a matlab based computer program that calculates and shows sediment transport rates through arbitrary chosen transects on the basis of Delft3D model output. Detran can be used from the matlab command line as a toolbox (a collection of routines/functions) or as a stand-alone executable program with a graphical user interface (GUI).
The program is capable of the following:
present map transport fields (magnitude by colour and direction by vectors)
calculate and present transport rates through transects;
load data from Delft3D map (trim) and history (trih) output files;
load data from a single Delft3D simulation, from a simulation with multiple conditions or from a mormerge simulation;
present bed load, suspended load or total transport;
present transport on different time scales (from seconds to years and even a user defined time window);
if a Delft3D simulation was carried out with multiple sediment fractions, the user can choose which fraction (or all fractions together) to present;
load transects from a polygon (pol) file or create them by clicking within the graphical user interface of detran;
save your clicked transects to a file;
adjust plot settings, like colour scale, vector scale, vector thinning;
load and plot a landboundary;
export the results to a matlab figure, which can be customized and printed by the user
save the transport data to a matlab file (mat) for later use in detran or matlab.
For command-line use reference is made to Chapter 2.
Chapter
3 gives a description of the GUI.
For the use of the Detran toolbox routines in Matlab, it is required to have OpenEarth tools added to your Matlab path. This can be achieved by either downloading and installing the OpenEarth toolbox from the OpenEarth products site or by using to the OpenEarth Matlab repository which can be found here.
Follow this short step-by-step guide to use the OpenEarth repository in Matlab.
To check whether the DETRAN toolbox routines are in the Matlab path, type:
>> which(detran)
If the OpenEarth toolbox is installed correctly, this command should return the path to detran.m.
The toolbox consists of numerous Matlab functions, of which the most are the building blocks. In principle, the two main routines for the command-line use are:
- detran.m
- detran_plotTransportThroughTransect.m
Help on using these toolbox routines can be found by typing:
>> help detran
>> help detran_plotTransportThroughTransect
The help block of all routines in the toolbox can be found on www.openearth.nl. This information is constantly up to date (i.e. it is synchronized with the actual help blocks of the routines in the repository).
After installing DETRAN, start the program from the windows start menu. By default, a link is placed in the sub-menu Open Earth Software.
The first step before using detran is to have available sediment transport data. Currently only results from Delf3D simulations is supported. The resulting files (both trim and trih files) can be used as input for detran. Various types of Delft3D simulations are supported. This can be a single simulation (one condition), but also a simulation with multiple (parallel computed) conditions and even a mormerge simulation. In the latter case, the weight of each conditions is loaded automatically from the mormerge mm-file, otherwise the use can specify the weights of multiple conditions by a tekal-file. It is also possible to load data from a mat-file in which detran data was stored earlier.
After loading the data, the map transport field can be plotted. It is possible to plot bed load, suspended load or total transport at different time scales. The magnitude of the transport field will be represented by colours, while the direction and magnitude of the transport field is represented by vectors. Various options are available to customize the plotted transport field. Besides a map transport field, it is possible to plot transport rates through user-defined transects. These transects may be loaded from a polygon file or they can be generated interactively (by clicking) within detran.
On the basis of the figure below, showing a screen shot of the program, the available buttons will be explained.
Figure 3.1 Screenshot
of detran
Button |
Functionality |
Data input/output |
|
Import data |
Import data from a Delft3D output (trim or trih) file |
Load data |
Load a mat-file with saved detran data |
Save data |
Save data to a mat-file |
Export to lintfile |
Export transport data to a lint file (e.g. for use in Muppet) |
Transport settings |
|
1st popup menu |
Select which transport type to plot (total, bed or suspended) |
2nd popup menu |
Select time frame (e.g. per year or per second). In case of user defined, specify time window (in sec.) in adjacent input field |
3rd popup menu |
Select which sediment fraction to use |
Transect options |
|
Load transects |
Load transects from a polygon file |
Adjust transects |
Adjust a transects: first click an existing transect point, then click again to indicate the new position of that point |
Save transects |
Save transects to a polygon file |
Add transects |
Add a new transect by clicking the start and end point |
Map plot settings |
|
Plot map transport field |
Click to plot the map field (incl. vectors) |
Plot landboundary |
Click to plot a landboundary |
Load landboundary |
Load a landboundary file |
Colour scale |
Specify range scale of the map transport field (magnitudes) |
Map vector spacing |
Specify the vector spacing of the map transport field |
Spacing mode |
For a certain map vector spacing n, there are two options: uniform: a vector will be plotted at every nth grid point distance: the vector locations are spaced at least n m |
Map vector scaling |
This value controls the scaling of the map vectors |
Transect vector plot settings |
|
Plot transport through transects |
Click to plot the transport rates through transects |
Plot gross transports |
Click to also plot the gross transport rates |
Transport vector scaling |
This value controls the scaling of the transect vectors |
Multiply transport labels |
Multiply the plotted labels (e.g. to present thousands m3) |
Export2fig |
Copy the plotted items to a matlab figure |