Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

How to import longitudinal time series from SOBEK-CF models

...

  • Keelung.ids: File with the branch information, generated by Netter
  • Calcdim.his and Calcdim.hia: File Files with static information from cross-sections that can be found in the SOBEK work folder. Information on bottom level and street level will be extracted from this file.
  • Reachdim.his and Reachdim.hia: File Files with static information from reaches that can be found in the SObEK work folder. Information on the length of the reaches will be extracted from this file.
  • Calcpnt.his: SOBEK File with computed water levels on all calculation nodes.
  • Reachseg.his: SOBEK File with computed discharges and velocities.

...

  1. Open the "FEWS Longitudinal profiles.xls" file in EXCEL, this file has 4 worksheets named;
    • Calcdim: information that will be copied from the Calcdim.his file.
    • Rechdim: information that will be copied from the Rechdim.his file.
    • Gridpoints: branch information for levels that will be computed within the EXCEL sheet.
    • Segments: branch information for flows that will be computed within the EXCEL sheet.
  2. Delete all information from these 4 worksheets.
  3. Open the "Calcdim.his" file in ODS_View.exe (this is a viewer for HIS files installed on all machines that have SOBEK installed). Make sure the corresponding "Calcdim.hia" file is in the same directory.
    • Select all data in ODS_View and export the data to a CSV file "Calcdim.csv" by pressing the "<Export data> button.
    • Open the "Calcdim.csv" file in EXCEL and convert the column with data from "data to columns", can be found under the "Data" menu item.
    • Copy the data for all cells to the Calcdim worksheet in the "FEWS Longitudinal profiles.xls" file.
  4. Open the "RechdimReachdim.his" file in ODS_View.exe (this is a viewer for HIS files installed on all machines that have SOBEK installed). Make sure the corresponding "Reachdim.hia" file is in the same directory.
    • Select all data in ODS_View and export the data to a CSV file "Rechdim.csv" by pressing the "<Export data> button.
    • Open the "Rechdim.csv" file in EXCEL and convert the column with data from "data to columns", can be found under the "Data" menu item.
    • Copy the data for all cells to the Rechdim worksheet in the "FEWS Longitudinal profiles.xls" file.
  5. Open the "Visual Basic Editor" in EXCEL by pressing ALT+F11. In the top part of the procedure you need to change the filename of the SOBEK Ids file (i.e. "d:\Test\Hsintien.ids").
  6. Then press F5 from the Visual Basic Editor. The procedure will now run and fill the Gridpoints and Segments worksheets.
  7. In XML-Spy you can now create two new branches with ids for the Level and Flow branches; "Hsientien_Level" and "Hsientien_Flow".
    • Copy the first 5 columns of the EXCEL sheet Gridpoints to the "Hsientien_Level" pt elements.

    • Enter also the startChainage and endChainage values in the corresponding elements.
    • Copy the first 2 columns of the EXCEL sheet Segments to the "Hsientien_Flow" pt elements.

    • Enter also the startChainage and endChainage values in the corresponding elements.

...

In FEWS the General Adapter is used to run external models. As mentioned before the "SbkBatch.exe" module is used as model adapter for SOBEK-CF and the "PostSobekModelAdapter" is used to import longitudinal time series. An example of a General Adapter configuration that runs the "PostSobekModelAdapter" is shown below.

Code Block
xml
xml

<?xml version="1.0" encoding="UTF-8"?>
<generalAdapterRun 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/generalAdapterRun.xsd">
	<!-- General information for General Adapter run -->
	<general>
		<description>SOBEK Model Forecast run for Tanshui with Keelung tunnel</description>
		<rootDir>%REGION_HOME%/Modules/TanshuiRRCFKT</rootDir>
		<workDir>%ROOT_DIR%</workDir>
		<exportDir>%ROOT_DIR%</exportDir>
		<exportIdMap>SobekTanshui_RR_CF_Export</exportIdMap>
		<importDir>%ROOT_DIR%/Update_output</importDir>
		<importIdMap>SobekTanshui_RR_CF_Import</importIdMap>
		<dumpFileDir>%REGION_HOME%/DumpFiles</dumpFileDir>
		<dumpDir>%ROOT_DIR%</dumpDir>
		<diagnosticFile>%ROOT_DIR%/diagnostics/postsobekmodeladapter.xml</diagnosticFile>
		<convertDatum>false</convertDatum>
		<timeZone>
			<timeZoneOffset>+00:00</timeZoneOffset>
		</timeZone>
		</general>
		<activities>
			<executeActivities>
				<!-- Longitudinal display Level -->
				<executeActivity>
					<command>
						<className>nl.wldelft.fews.adapter.sobek.PostSobekModelAdapter</className>
					</command>
					<arguments>
						<argument>%ROOT_DIR%</argument>
						<argument>Config/Level_Profile_Config.xml</argument>
					</arguments>
					<timeOut>800000</timeOut>
				</executeActivity>
				<!-- Longitudinal display flow -->
				<executeActivity>
					<command>
						<className>nl.wldelft.fews.adapter.sobek.PostSobekModelAdapter</className>
					</command>
					<arguments>
						<argument>%ROOT_DIR%</argument>
						<argument>Config/Flow_Profile_Config.xml</argument>
					</arguments>
					<timeOut>800000</timeOut>
				</executeActivity>
			</executeActivities>
			<importActivities>
				<!-- Import SBK results -->
				<importTimeSeriesActivity>
					<description>Import XML file</description>
					<importFile>Calcpnt.xml</importFile>
					<timeSeriesSets>
						<timeSeriesSet>
							<moduleInstanceId>Tanshui_Sobek_Profile_KeelungTunnel</moduleInstanceId>
							<valueType>longitudinalprofile</valueType>
							<parameterId>H.simulated</parameterId>
							<locationId>Keelung_Level</locationId>
							<timeSeriesType>simulated forecasting</timeSeriesType>
							<timeStep unit="minute" multiplier="15" />
							<readWriteMode>add originals</readWriteMode>
							<expiryTime unit="day" multiplier="2" />
						</timeSeriesSet>
					</timeSeriesSets>
				</importTimeSeriesActivity>
				<importTimeSeriesActivity>
					<description>Import XML file</description>
					<importFile>Reachseg.xml</importFile>
					<timeSeriesSets>
						<timeSeriesSet>
							<moduleInstanceId>Tanshui_Sobek_Profile_KeelungTunnel</moduleInstanceId>
							<valueType>longitudinalprofile</valueType>
							<parameterId>Q.simulated</parameterId>
							<locationId>Keelung_Flow</locationId>
							<timeSeriesType>simulated forecasting</timeSeriesType>
							<timeStep unit="minute" multiplier="15" />
							<readWriteMode>add originals</readWriteMode>
							<expiryTime unit="day" multiplier="2" />
						</timeSeriesSet>
					</timeSeriesSets>
				</importTimeSeriesActivity>
			</importActivities>
		</activities>
</generalAdapterRun>

...