Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Include Page
TOOLS:Header, DesignTOOLS:
Header, Design
scrollbar
Table of Contents
indent10px
styledisc

...

The the tool of choice for implementing readers is LEX; contrary to existing reader implementations, with LEX we can define readers in a language independent, reusable industry standard notation.
A C# version of LEX is found in the free product GPLEX. Some first test in DS development environment were successfull.
ANTLR might be an alternative to GPLEX. ANTLR offers both a lexical and syntatical analyzer where GPLEX can only build a lexical analyzer.

TODO

  • choose between GPLEX and ANTLR:
    ANTLR is a more complex environment. It is able to generate both lexical and syntatical automatons; we only need the lexer. At this early stage gplex seems more lightweight and does not carry in any redundant component, does what we want from it, is fitted into the dev and build environment.

The approach is to start with implementing a full Sobek 2.11 MDB import in a time period of 20 days (40 fpe). After this period the experience will be applied to estimate the remainder of this sub project.

...

No Format
net-file (cross section layer)
This file contains the definitions of the cross-section locations.
If the file version is 1.1 or higher (CR_1.1 in the first line), also records indicating the nodes with storage are written to the file.
The cross-sections are defined using the CRSN record.
CRSN id 'c1' nm 'crossdef1' ci 10 lc 250.6 crsn  Note: Fixed order
Where:
id = id of cross-section location
nm = name of cross-section definition
ci = carrier id (branch id)
lc = distance from the beginning of the branch
The storage nodes is defined using STON record.
STON id '2' ci '1' lc 0 st 'Normal' ston
Where:
id = node id
ci = dummy
lc = dummy
st = dummy
Only the node id is used, but all record keywords must be present and have a (dummy) value.
If no STON record is written for the node, then the storage as defined in the file nodes.dat should be skipped.
In the old definition of the file (version 1.0) all storage data on nodes is always used, although the actual node type in the User Interface does not suggest this functionality.

PROFILE.DAT

No Format

Dat-file (cross section layer)

This file contains a reference to the cross-section definition and information about the relative height of the cross-section.
 
CRSN id 'crossloc1' di 'crossdef1' rl -0.5 ll -0.4 rs 0.9 ls 0.9 crsn Note: Fixed order

Items in one record; ll, rs and ls optional, separated by 1 or more blanks

Where:
id = id of cross-section location
di = id of cross-section definition
rl = reference level 1 (SOBEK Rivers/Rural: level at the cross-section; SOBEK Urban/Rural: level at the end of the pipe)
ll = reference level 2 (SOBEK Urban/Rural: level at the beginning of the pipe)
us = upstream slope (not in SOBEK Urban/Rural)
ds = Downstream slope (not in SOBEK Urban/Rural)
rs = Surface level right (same units as rl) 
ls = Surface level left (same units as rl) 
 
In SOBEK-Rivers a bed-level (code bl) was already given for the cross-section descriptions (except for the tables, here it is given in the table itself). In addition, a local reference level rl at the cross-section needs to be given.
 
In SOBEK Urban/Rural however, it is not possible to give a bed level for every cross-section description. In this case, the bed level is given when placing the cross-section on a reach (pipe) by means of the keywords rl and ll. These keywords give the bed levels of the bottom of the pipe at the end and the beginning of the pipe, so that the slope is determined by the length of the pipe and the difference in height rl-ll.
 
In SOBEK-Rivers, rl stands for the reference level at the location of the cross-section, while the slopes on the left and right side can differ. In the case of more cross-sections on one branch, the bed level slope between the cross-sections is assumed to be constant (based on the bed levels at the cross-sections corrected for local reference levels). For interpolation of the cross-sections both the up- and the downstream slopes are used. 
 
In SOBEK-Rural for open water, only rl is used and interpreted the same way as in SOBEK-Rivers.

PROFILE.DEF (currently we only import tabulated cross section ie tabulated and yz table )

No Format

def-file (cross section layer)

This file contains the descriptions of the cross sections. SOBEK River distinguishes 3 sections while SOBEK Urban/Rural only distinguishes 1 section.
 
The following types of cross sections are considered:
 
0. tabulated
1. trapezoidal
2. open circle
3. sedredge (2D morfology)
4. closed circle
5. 
6. egg shaped (width)
7. egg shaped 2 (radius) not implemented
8. closed rectangular not implemented
9. 
10. yz table 
11. asymmetrical trapeziodal
 
 
 
0. Tabulated cross section
 
CRDS id 'Crdef1' nm 'Tabel1' ty 0 wm 86.23 w1 0 w2 0 sw 0 lt lw
TBLE
-2.55 16.80 16.80 <
-1.00 30.13 30.13 <
-0.65 30.13 30.13 <
 0.00 86.23 86.23 <
tble
dk 0 dc 99999. db 99999. df 99999. dt 99999.
gl 0.5 gu 0
crds
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type cross section (0=table)
wm  = width main channel
w1  = width floodplain 1 (used in River profile only, else value = 0)
w2  = width floodplain 2 (used in River profile only, else value = 0)
sw  = sediment transport width (not in SOBEK Urban/Rural) 
Default 0. Only important for module sediment/morfology 
lt lw  = table for table profile between keywords TBLE and tble; the table contains height, total width en flowing width.
dk  = summer dike (1 = active, 0 = not active) (in River profile only)
dc  = dike crest level in River profile only()
db  = floodplain base level behind dike (in River profile only)
df  = flow area behind dike (in River profile only)
dt  = total area behind dike (in River profile only)
gl    = ground layer depth (meter relative to bed level)
gu   = ground layer to be used within hydraulics calculation (1) or not (0).
 
 
 
1. Trapezoidal cross section
 
CRDS id 'Crdef2' nm 'Trapezium' ty 1 wm 86.0 w1 0 w2 0 sw 0 bw 10 bs 0.5 aw 100 gl 0.5 gu 0 crds 
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type cross section (1=trapezium)
bl  = bed level
wm  = width main channel
w1  = width floodplain 1 (in SOBEK Urban/Rural always 0)
w2  = width floodplain 2 (in SOBEK Urban/Rural always 0)
sw  = sediment transport width (not in SOBEK Urban/Rural) 
Only important for module sediment/morphology (River)
bw   = bottom width
bs   = bank slope (horizontal/vertical)
aw   = maximum flow width 
gl  = ground layer depth (meter relative to bed level)
gu  = ground layer to be used within hydraulics calculation (1) or not (0).
 
 
2. Open circle cross section:
 
CRDS id 'Crdef3' nm 'Opencirkel' ty 2 rd 5 gl 0.5 gu 0 crds
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type of cross section (2=open circle)
bl  = bed level
rd  = radius
gl  = ground layer depth (meter relative to bed level)
gu  = ground layer to be used within hydraulics calculation (1) or not (0).
 
 
Note: This profile cannot be used for sediment calculations (Rivers). A table should be used instead.
 
 
3. Sedredge cross section:
 
Only for 2D morphology calculations(SOBEK Rivers). 'left' means main channel, and 'right' is the floodplain.
 
CRDS id 'Crdef4' nm 'Sedredge' ty 3 ll 3 rl 2.5 lw 10 rw 5 crds
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type cross section (3=2D morphology sedredge profile)
ll  = left bed level
rl  = right bed level
lw  = left bed width
rw  = right bed width
 
 
4. Closed circle cross section: (only SOBEK Urban/Rural) 
 
CRDS id 'Crossdef5' nm 'Geslotencirkel' ty 4 rd 4 gl 0.5 gu 0 crds 
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type cross section (4=closed circle)
bl  = bed level
rd  = radius
gl  = ground layer depth (meter relative to bed level)
gu  = ground layer to be used within hydraulics calculation (1) or not (0).
 
 
 
6. Egg shaped cross section: (only SOBEK Urban/Rural) 
 
CRDS id 'Crossdef6' nm 'Ei' ty 6 bo 0.5 gl 0.5 gu 0 crds 
 
 
Where:
 
id  = cross section definition id
nm  = cross section definition name
ty  = type cross section (6=egg shaped)
bl  = bed level
bo  = bottom width profile; 
For this profile, the height is considered to be 1.5 * the width.
gl  = ground layer depth (meter relative to bed level)
gu  = ground layer to be used within hydraulics calculation (1) or not (0).
 
 
10. yz table cross section: (only SOBEK Urban/Rural) 
 
CRDS id 'Crdef' nm 'y-z table1' ty 10 st 0 lt sw  0 12.0 lt yz
TBLE
0.0  12.0   <
1.0   10.0   <
2.0   9.0     <
3.0   9.5     <
4.0   10.5   <
5.0   11.0   <
tble
gl  0.5
gu 0
crds
 
or
 
CRDS id 'Crdef' nm 'y-z table1' ty 10 st 0 lt sw 
TBLE
12.0  0 <
20.0  1 < 
tble
lt yz
TBLE
0.0  12.0   <
1.0   10.0   <
2.0   9.0     <
3.0   9.5     <
4.0   10.5   <
5.0   11.0   <
tble
gl  0.5
gu 0
crds
 
 
Where:
 
id = cross section (profile) definition identification 
nm = cross section (profile) definition name
ty = type of cross section (10 = yz table)
st = storage type 
0 = reservoir
1 = loss of water that is above surface level
lt sw 0 = storage width on surface in m
lt sw  = storage width on surface level as tabulated function of level above surface level in m (starting from zero).
lt yz = table for y-z values.  Y - horizontal distance increasing from the left to right , Z - vertical distance increasing from bottom to top in m. In other words, use a coordinate system to define the Y-Z profile.
gl = ground layer depth (meter relative to bed level)
gu = ground layer to be used within hydraulics calculation (1) or not (0).
 
11. Asymmetrical trapeziodal cross section: (only SOBEK Urban/Rural) 
 
CRDS id 'Crdef' nm 'Asymmetrical Trapezoidal1' ty 11 st 0 lt sw 0 12.0 lt yz
TBLE
0 .0  12.0   <
1.0   10.0   <
2.0   9.0     <
3.0   9.5     <
4.0   10.5   <
5.0   11.0   <
tble
gl  0.5
gu 0
crds

or
 
CRDS id 'Crdef' nm 'Asymmetrical Trapezoidal1' ty 11 st 0 lt sw 
TBLE
12.0  0 <
20.0  1 < 
tble
lt yz
TBLE
0 .0  12.0   <
1.0   10.0   <
2.0   9.0     <
3.0   9.5     <
4.0   10.5   <
5.0   11.0   <
tble
gl  0.5
gu 0
crds
 
 
Where:
id = cross section (profile) definition identification 
nm = cross section (profile) definition name
ty = type of cross section (11 = asymmetrical trapezoidal)
st = storage type 
0 = reservoir
1 = loss of water that is above surface level
lt sw 0 = storage width on surface in m
lt sw  = storage width on surface level as tabulated function of level above surface level in m (starting from zero).
lt yz = table for y-z values.  Y - horizontal distance increasing from the left to right , Z - vertical distance increasing from bottom to top in m. In other words, use a coordinate system to define the Y-Z profile.
gl = ground layer depth (meter relative to bed level)
gu = ground layer to be used within hydraulics calculation (1) or not (0).

Cross Section types in Sobek

...

After discussion with Edward: Initially

  • Tabulated/WH
  • YZ

friction

Friction data is contained in the file friction.dat

...