...
Code Block |
---|
| xml |
---|
| xml |
---|
title | execute activities |
---|
|
<executeActivities>
<executeActivity>
<command>
<className>com.deltares.fews.xbeachadapters.preadapter.XBeachPreAdapter</className>
<binDir>adapter\bin</binDir>
</command>
<arguments>
<argument>pi_run\pi-run.xml<<argument>run.nc</argument>
</arguments>
<timeOut>99999999</timeOut>
</executeActivity>
<executeActivity>
<command>
<executable>runxb<executable>xbeach.bat<exe</executable>
</command>
<timeOut>99999999</timeOut>
</executeActivity>
</executeActivities>
|
Golf spectrum conversion
In this example "swanxbinputbcfile.nc" will be used to write the golf spectra into the following format:
- wavesbcfile.txt referencing to golf spectrum files and a time of how long these should be used in each calculation step
Code Block |
---|
|
FILELIST
3600.0 1.0 egxbc.loct001time001.sp2
3600.0 1.0 egxbc.loct002time002.sp2
3600.0 1.0 egxbc.loct003time003.sp2
3600.0 1.0 egxbc.loct004time004.sp2
3600.0 1.0 egxbc.loct005time005.sp2
3600.0 1.0 egxbc.loct006time006.sp2
3600.0 1.0 egxbc.loct007time007.sp2
3600.0 1.0 egxbc.loct008time008.sp2
3600.0 1.0 egxbc.loct009time009.sp2
3600.0 1.0 egxbc.loct010time010.sp2
|
- egxbc.loct001time001.sp2 containing a golf spectrum
Code Block |
---|
| none |
---|
| none |
---|
title | egxbc.loct001time001.sp2 |
---|
|
SWAN 1 Swan standard spectral file, version
$ Data exported by FEWS for SWAN
$ Project: ; run number:
TIME time-dependent data
1 time coding option
LONLAT locations in spherical coordinates
1 number of locations
4.6019540 52.6194688
AFREQ 1/s
25 number of frequencies
0.0500
0.0566
0.0642
...
0.7791
0.8827
1.0000
NDIR degrees
36 number of directions
265.0000
255.0000
245.0000
...
-65.0000
-75.0000
-85.0000
QUANT
1 number of quantities in table
EnDens id
m unit
-0.9900E+02 exception value
20010101.000000 date and time
FACTOR
0.0011500214
0 0 0 0 0 0 0 0 0 0 ... 0 0 0
0 0 0 0 0 0 0 0 0 0 ... 0 0 0
0 0 0 0 0 0 0 0 0 0 ... 0 0 0
1 1 0 0 0 0 0 0 0 0 ... 0 0 1
40 27 9 3 3 3 2 0 0 0 ... 2 9 28
610 294 70 17 24 31 17 0 0 0 ... 67 303 626
4916 1621 268 57 119 193 145 23 0 1 ... 1780 5295 7229
13782 3341 415 94 287 659 803 340 0 6 ... 14433 28039 27099
14186 2446 257 68 290 982 1874 1407 5 3 ... 52381 62127 39577
10369 1638 231 37 90 431 1241 1598 227 0 ... 99999 80353 37089
8225 1923 361 54 17 70 324 770 448 0 ... 77305 54223 24535
6742 1962 381 88 21 6 30 143 211 0 ... 42814 28100 15442
5744 2480 622 147 34 5 1 8 30 0 ... 27283 16631 9808
4448 2618 1011 228 41 6 0 0 2 2 ... 15103 9139 6001
2853 2150 977 217 34 5 1 0 0 0 ... 8682 5250 3507
1818 1588 752 160 20 4 1 0 0 0 ... 4838 2895 2116
1064 927 597 168 23 3 0 0 0 0 ... 2374 1383 1151
517 534 423 142 23 2 0 0 0 0 ... 1182 789 561
243 299 202 87 17 1 0 0 0 0 ... 756 329 262
137 112 87 51 12 1 0 0 0 0 ... 243 98 120
86 40 34 18 5 1 0 0 0 0 ... 137 117 142
55 21 8 4 2 0 0 0 0 0 ... 137 123 87
24 13 3 1 0 0 0 0 0 0 ... 83 74 62
6 7 1 0 0 0 0 0 0 0 ... 58 27 16
6 3 0 0 0 0 0 0 0 0 ... 39 20 10
|
Water level conversion
In this example "1xbinputzs0file.nc" will be used to write the time dependent water levels to a file named "tidezs0file.txt". The first column specifies the time (meaning defined in "PARAM_TUNITS") and the second column water level. For now the adapter only supports the water level as a single boundary condition but XBeach has to possibility to also use 2 or 4 resulting in 1 or 3 extra columns.
Code Block |
---|
| none |
---|
| none |
---|
title | tidezs0file.txt |
---|
|
0.0000000e+000 -2.2000000e-002
6.0000000e+002 2.2000000e-002
1.2000000e+003 6.4999998e-002
1.8000000e+003 1.0800000e-001
2.4000000e+003 1.5200000e-001
3.0000000e+003 1.9400001e-001
3.6000000e+003 2.3700000e-001
4.2000000e+003 2.7900001e-001
4.8000000e+003 3.1999999e-001
5.4000000e+003 3.6100000e-001
6.0000000e+003 4.0099999e-001
6.6000000e+003 4.4100001e-001
7.2000000e+003 4.7900000e-001
7.8000000e+003 5.1700002e-001
8.4000000e+003 5.5400002e-001
9.0000000e+003 5.8999997e-001
9.6000000e+003 6.2400001e-001
1.0200000e+004 6.5700001e-001
1.0800000e+004 6.9000000e-001
1.1400000e+004 7.2000003e-001
1.2000000e+004 7.5000000e-001
1.2600000e+004 7.7800000e-001
1.3200000e+004 8.0500001e-001
1.3800000e+004 8.2999998e-001
1.4400000e+004 8.5299999e-001
1.5000000e+004 8.7500000e-001
1.5600000e+004 8.9499998e-001
1.6200000e+004 9.1399997e-001
1.6800000e+004 9.3000001e-001
1.7400000e+004 9.4599998e-001
1.8000000e+004 9.5899999e-001
|
...
The pre adapter will also convert all run file string properties starting with "PARAM_" to XBeach parameters in "params.txt". Example: params.txt.
It reads an existing "params.txt" and searches for a line starting with the specified parameter and replaces the whole line with "parameter = value" or adds a new line in the same format when the parameter was not present yet.
Code Block |
---|
| none |
---|
| none |
---|
title | sample of params.txt |
---|
|
----------------------------------------------------
Grid input
nx = 154
ny = 70
xfile = x.grd
yfile = y.grd
xori = 101627.84
yori = 513562.63
depfile = egmondxbeach.dep
----------------------------------------------------
Numerics input
CFL = 0.8
eps = 0.01
----------------------------------------------------
Time input
tstart = 0.
tstop = 36000
----------------------------------------------------
General constants
rho = 1025
g = 9.81
----------------------------------------------------
Boundary condition options
zs0file = tidezs0file.txt
tideloc = 1
----------------------------------------------------
Wave calculation options
bcfile = wavesbcfile.txt
----------------------------------------------------
Flow calculation options
nuh = 0.1
nuhfac = 1.0
----------------------------------------------------
Sediment transport calculation options
facua = 0.10
D50 = 0.0002
----------------------------------------------------
Morphological calculation options
morfac = 10
morstart = 3600
----------------------------------------------------
Output options
outputformat = netcdf
nglobalvar = 3
tunits = seconds since 2001-01-01
|
...
The next activity will be executing the XBeach model run. So far this This is done by a .bat file to be able to run the running xbeach.exe in a other directory the workdir containing the input files. It would be preferable to change this in such a way that the .bat file will not be neededmodel files.
Code Block |
---|
| xml |
---|
| xml |
---|
title | module run execute activity |
---|
|
<executeActivity>
<command>
<executable>runxb<executable>xbeach.bat<exe</executable>
</command>
<timeOut>99999999</timeOut>
</executeActivity>
|
...
The last part of the general adapter run is importing the XBeach output. In the case xboutput.nc contains all parameter, output and grid information of the run. This can be visualized in FEWS after defining the needed parameters, location and grid. How to do this can be found here: XBeach FEWS setup
...