Steps to get started with FEWS XBeach model adapter

Define a location with "WGS 1984" coordinates

locations.xml
<?xml version="1.0" encoding="UTF-8"?>
<locations version="1.1" xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews
http://fews.wldelft.nl/schemas/version1.0/locations.xsd">
	<geoDatum>WGS 1984</geoDatum>
	<location id="Dummy" name="Dummy">
		<x>4.601954</x>
		<y>52.619469</y>
		<z>0</z>
	</location>
</locations>

Define a grid

grids.xml
<?xml version="1.0" encoding="UTF-8"?>
<grids xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/grids.xsd">
	<irregular locationId="Dummy">
		<description>Dummy</description>
		<rows>71</rows>
		<columns>155</columns>
		<csvFile>
			<file>dummy_grid.csv</file>
			<geoDatum>Rijks Driehoekstelsel</geoDatum>
			<x>%X%</x>
			<y>%Y%</y>
		</csvFile>
	</irregular>
</grids>

Create .csv grid file

FEWS -F12 -S convert -netcdf file to cell centers csv file

Choose XBeach netcdf output file, a csv file with the same name will be created (place this in Config\MapLayerFiles\ directory) and example configuration will be added to the clipboard. Make sure the correct <geoDatum> is used, probably must be changed to "Rijks Driehoekstelsel".

Using Swan wave spectra in FEWS

Define parameters

"AFREQ" and "NDIR" are domain parameters needed for "EnDens"

example parameter configuration
	<parameterGroup id="Frequency">
		<parameterType>instantaneous</parameterType>
		<unit>1/s</unit>
		<parameter id="AFREQ">
			<shortName>AFREQ</shortName>
		</parameter>
	</parameterGroup>
	<parameterGroup id="Direction">
		<parameterType>instantaneous</parameterType>
		<unit>degrees</unit>
		<parameter id="NDIR">
			<shortName>NDIR</shortName>
		</parameter>
	</parameterGroup>
	<parameterGroup id="XBeach">
		<parameterType>instantaneous</parameterType>
		<unit>m</unit>
		<valueResolution>0.001</valueResolution>
		<usesDatum>true</usesDatum>
		<parameter id="EnDens" name="energy densities in J/m2/Hz/degr">
			<shortName>EnDens</shortName>
		</parameter>
		<parameter id="H_mean" name="Mean Water Level">
			<shortName>H_mean</shortName>
		</parameter>
		<parameter id="H_max" name="Max Water Level">
			<shortName>H_max</shortName>
		</parameter>
		<parameter id="H_min" name="Min Water Level">
			<shortName>H_min</shortName>
		</parameter>
    </parameterGroup>		
Importing Swan wave spectrum files

In order to retrieve the wave spectra from outside FEWS some example configuration is given below

Import_Swan.xml
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews
http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd">
	<import>
		<general>
			<importType>swan-spectrum</importType>
			<folder>$IMPORT_FOLDER$/swan</folder>
			<backupFolder>$BACKUP_FOLDER$/swan</backupFolder>
			<idMapId>IdSwanImport</idMapId>
			<missingValue>-999.0</missingValue>
			<geoDatum>WGS 1984</geoDatum>
			<expiryTime unit="day" multiplier="366"/>
		</general>
		<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" multiplier="1"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>
  • No labels