You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

XBeach is a two-dimensional model for wave propagation, long waves and mean flow, sediment transport and morphological changes of the nearshore area, beaches, dunes and backbarrier during storms.

Example FEWS general adapter run config

<?xml version="1.0" encoding="UTF-8"?>
<generalAdapterRun xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/generalAdapterRun.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews">
	<general>
		<piVersion>1.8</piVersion>
		<rootDir>rootDir</rootDir>
		<workDir>workDir</workDir>
		<exportDir>exportDir</exportDir>
		<importDir>importDir</importDir>
		<dumpFileDir>dumpFileDir</dumpFileDir>
		<dumpDir>dumpDir</dumpDir>
		<diagnosticFile>pi_diag.xml</diagnosticFile>
	</general>
	<activities>
		<exportActivities>
			<exportNetcdfActivity>
				<exportFile>swanxbinput.nc</exportFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Run_XBeach</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>EnDens</parameterId>
						<domainParameterId>AFREQ</domainParameterId>
						<domainParameterId>NDIR</domainParameterId>
						<locationId>Dummy</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="hour"/>
						<relativeViewPeriod unit="hour" start="-24" end="0"/>
						<readWriteMode>add originals</readWriteMode>
						<synchLevel>1</synchLevel>
					</timeSeriesSet>
				</timeSeriesSets>
			</exportNetcdfActivity>
			<exportNetcdfActivity>
				<exportFile>1xbinput.nc</exportFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Run_XBeach</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H_mean</parameterId>
						<locationId>Dummy</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="minute" multiplier="10"/>
						<relativeViewPeriod unit="hour" start="-24" end="0"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</timeSeriesSets>
			</exportNetcdfActivity>
			<exportRunFileActivity>
				<description>This pi run file is passes as argument to XBeachPreAdapter</description>
				<exportFile>pi_run\pi-run.xml</exportFile>
				<properties>
					<description>Specific configuration required for MyPreAdapter and MyPostAdapter</description>
					<string key="TIDE_VARIABLE" value="H_mean"/>
					<string key="TIME_VARIABLE" value="time"/>
					<string key="PARAM_TUNITS" value="seconds since 2001-01-01"/>
					<string key="PARAM_OUTPUTFORMAT" value="netcdf"/>
					<string key="PARAM_TSTOP" value="36000"/>
				</properties>
			</exportRunFileActivity>
		</exportActivities>
		<executeActivities>
			<executeActivity>
				<command>
					<className>com.deltares.fews.xbeachadapters.preadapter.XBeachPreAdapter</className>
					<binDir>adapter\bin</binDir>
				</command>
				<arguments>
					<argument>pi_run\pi-run.xml</argument>
				</arguments>
				<timeOut>99999999</timeOut>
			</executeActivity>
			<executeActivity>
				<command>
					<executable>runxb.bat</executable>
				</command>
				<timeOut>99999999</timeOut>
			</executeActivity>
		</executeActivities>
		<importActivities>
			<importPiNetcdfActivity>
				<importFile>xboutput.nc</importFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Run_XBeach</moduleInstanceId>
						<valueType>grid</valueType>
						<parameterId>H_max</parameterId>
						<locationId>Dummy</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="hour"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</timeSeriesSets>
			</importPiNetcdfActivity>
		</importActivities>
	</activities>
</generalAdapterRun>

The first steps in the general adapter run are the netcdf and run file export activities, the exported files will be a netcdf file (swanxbinput.nc) containing Swan golf spectra over time and a netcdf file (1xbinput.nc) containing water level over time. The exported run file will contain properties that can be used by the pre adapter. For example:

  • TIDE_VARIABLE: name of netcdf variable containing water level
  • PARAM_TUNITS: meaning of the time values in XBeach input and output files. For example "seconds since 2001-01-01"
  • PARAM_OUTPUTFORMAT: XBeach parameter specifying the output format. Has to be "netcdf" for FEWS to import
  • PARAM_TSTOP: XBeach parameter specifying end of XBeach run: for example "36000" which in this case means after 10 hours

Properties starting with "PARAM_" will be passed literally to XBeach without "PARAM_"

		<exportActivities>
			<exportNetcdfActivity>
				<exportFile>swanxbinput.nc</exportFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Run_XBeach</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>EnDens</parameterId>
						<domainParameterId>AFREQ</domainParameterId>
						<domainParameterId>NDIR</domainParameterId>
						<locationId>Dummy</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="hour"/>
						<relativeViewPeriod unit="hour" start="-24" end="0"/>
						<readWriteMode>add originals</readWriteMode>
						<synchLevel>1</synchLevel>
					</timeSeriesSet>
				</timeSeriesSets>
			</exportNetcdfActivity>
			<exportNetcdfActivity>
				<exportFile>1xbinput.nc</exportFile>
				<timeSeriesSets>
					<timeSeriesSet>
						<moduleInstanceId>Run_XBeach</moduleInstanceId>
						<valueType>scalar</valueType>
						<parameterId>H_mean</parameterId>
						<locationId>Dummy</locationId>
						<timeSeriesType>external historical</timeSeriesType>
						<timeStep unit="minute" multiplier="10"/>
						<relativeViewPeriod unit="hour" start="-24" end="0"/>
						<readWriteMode>add originals</readWriteMode>
					</timeSeriesSet>
				</timeSeriesSets>
			</exportNetcdfActivity>
			<exportRunFileActivity>
				<description>This pi run file is passes as argument to XBeachPreAdapter</description>
				<exportFile>pi_run\pi-run.xml</exportFile>
				<properties>
					<description>Specific configuration required for MyPreAdapter and MyPostAdapter</description>
					<string key="TIDE_VARIABLE" value="H_mean"/>
					<string key="TIME_VARIABLE" value="time"/>
					<string key="PARAM_TUNITS" value="seconds since 2001-01-01"/>
					<string key="PARAM_OUTPUTFORMAT" value="netcdf"/>
					<string key="PARAM_TSTOP" value="36000"/>
				</properties>
			</exportRunFileActivity>
		</exportActivities>

The next steps are the execute activities. The first will be the pre adapter. This program will read the pi-run.xml input file and use the properties for instructions on which directory and files should be used to convert to the correct XBeach input format. In this example "swanxbinput.nc" will be used to write the golf spectra into the following format:

  • waves.txt referencing to golf spectrum files and a time of how long these should be used in each calculation step
FILELIST
  3600.0      1.0 egx.loct001.sp2
  3600.0      1.0 egx.loct002.sp2
  3600.0      1.0 egx.loct003.sp2
  3600.0      1.0 egx.loct004.sp2
  3600.0      1.0 egx.loct005.sp2
  3600.0      1.0 egx.loct006.sp2
  3600.0      1.0 egx.loct007.sp2
  3600.0      1.0 egx.loct008.sp2
  3600.0      1.0 egx.loct009.sp2
  3600.0      1.0 egx.loct010.sp2
  • egx.loct001.sp2 containing a golf spectrum
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.0727
    0.0824
    0.0933
    0.1057
    0.1198
    0.1357
    0.1538
    0.1742
    0.1974
    0.2236
    0.2533
    0.2870
    0.3252
    0.3684
    0.4174
    0.4729
    0.5357
    0.6070
    0.6877
    0.7791
    0.8827
    1.0000
NDIR                                    degrees
    36                                  number of directions
  265.0000
  255.0000
  245.0000
  235.0000
  225.0000
  215.0000
  205.0000
  195.0000
  185.0000
  175.0000
  165.0000
  155.0000
  145.0000
  135.0000
  125.0000
  115.0000
  105.0000
   95.0000
   85.0000
   75.0000
   65.0000
   55.0000
   45.0000
   35.0000
   25.0000
   15.0000
    5.0000
   -5.0000
  -15.0000
  -25.0000
  -35.0000
  -45.0000
  -55.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     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     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     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1
    40    27     9     3     3     3     2     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     2     9    28
   610   294    70    17    24    31    17     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     2     6    67   303   626
  4916  1621   268    57   119   193   145    23     0     1     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2    22     2   138  1780  5295  7229
 13782  3341   415    94   287   659   803   340     0     6     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     5   110     0  2483 14433 28039 27099
 14186  2446   257    68   290   982  1874  1407     5     3     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0    23   199    13 18569 52381 62127 39577
 10369  1638   231    37    90   431  1241  1598   227     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     0   134     0  6006 60920 99999 80353 37089
  8225  1923   361    54    17    70   324   770   448     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     0   243     0 19514 61735 77305 54223 24535
  6742  1962   381    88    21     6    30   143   211     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     5    11   135  1424 17649 39514 42814 28100 15442
  5744  2480   622   147    34     5     1     8    30     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     1     5    17    43   755  5862 14973 26004 27283 16631  9808
  4448  2618  1011   228    41     6     0     0     2     2     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     6    17    56   314  2681  7085 12219 16272 15103  9139  6001
  2853  2150   977   217    34     5     1     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     7    21    43   137  1166  4059  6894 10203 11026  8682  5250  3507
  1818  1588   752   160    20     4     1     0     0     0     2     0     0     0     0     0     0     0     0     0     0     0     1     7    22    47   115   452  2618  4596  7073  7853  7279  4838  2895  2116
  1064   927   597   168    23     3     0     0     0     0     2     0     0     0     0     0     0     0     0     0     0     2     6    17    43   115   351  1453  3434  4082  5334  4763  3704  2374  1383  1151
   517   534   423   142    23     2     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     5    14    31    94   320  1057  2305  2936  3430  3899  2690  1796  1182   789   561
   243   299   202    87    17     1     0     0     0     0     0     0     0     0     0     0     0     0     0     2     4    11    27    77   270   830  1571  1849  2237  2438  2162  1571  1097   756   329   262
   137   112    87    51    12     1     0     0     0     0     0     0     0     0     0     0     0     0     2     3     8    22    70   235   589   892  1188  1367  1479  1475  1019   704   581   243    98   120
    86    40    34    18     5     1     0     0     0     0     0     0     0     0     0     0     0     1     3     7    15    50   180   421   505   683   727   856   810   734   555   432   357   137   117   142
    55    21     8     4     2     0     0     0     0     0     0     0     0     0     0     0     0     2     4    12    37   110   230   324   413   458   450   519   430   319   252   282   190   137   123    87
    24    13     3     1     0     0     0     0     0     0     0     0     0     0     0     0     1     2     6    20    63   115   164   212   237   298   277   258   201   203   183   134   116    83    74    62
     6     7     1     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     7    25    58    92   117   144   148   157   162   149   131   123   112    98    80    58    27    16
     6     3     0     0     0     0     0     0     0     0     0     0     0     0     0     0     0     2     7    23    44    67    69    84    98    90    89    85    76    68    65    56    51    39    20    10

		<executeActivities>
			<executeActivity>
				<command>
					<className>com.deltares.fews.xbeachadapters.preadapter.XBeachPreAdapter</className>
					<binDir>adapter\bin</binDir>
				</command>
				<arguments>
					<argument>pi_run\pi-run.xml</argument>
				</arguments>
				<timeOut>99999999</timeOut>
			</executeActivity>
			<executeActivity>
				<command>
					<executable>runxb.bat</executable>
				</command>
				<timeOut>99999999</timeOut>
			</executeActivity>
		</executeActivities>
  • No labels