...
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?> <Run xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews/PI" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://fews.wldelft.nl/schemas/version1.0/pi-schemas/pi_run.xsd" version="1.5"> <timeZone>0.0</timeZone> <startDateTime date="2017-03-26" time="06:00:00"/> <endDateTime date="2017-03-29" time="06:00:00"/> <time0 date="2017-03-26" time="06:00:00"/> <workDir>X:\XXX\DimrPreAdapterTest\piRunFile1d2dRTC\dimr_model</workDir> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_flow1d.xml</inputTimeSeriesFile> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_fm.xml</inputTimeSeriesFile> <inputTimeSeriesFile>X:\XXX\piRunFile1d2dRTC\Input\export_pi_fbc.xml</inputTimeSeriesFile> <outputDiagnosticFile>notUsed.xml</outputDiagnosticFile> <properties> <!-- Reference to dimr configuration file, relative to parent directory of the/this pi-run.xml file --> <!-- This file will be read to see which components of the dimr are used and find references to .md1d, .mdu, flow1d2d.ini and/or fbc runtime config --> <string key="dimrConfigFile" value="../dimr_config.xml"/> <!-- Specify which of the above time series xml files is meant for flow1d --> <string key="piFileForFlow1d" value="inputTimeSeriesFile-1"/> <!-- Overwrite RstInterval value in the .mdu file with this property --> <string key="restartIntervalForFm" value="600"/> <!-- Specify which of the above time series xml files is meant for FM --> <string key="piFileForFm" value="inputTimeSeriesFile-2"/> <!-- Specify which of the above time series xml files is meant for FBC (rtc1) --> <string key="piFileForFbc" value="inputTimeSeriesFile-3"/> <!-- Will write the pi time series values for fbc as binary in timeseries_import.bin--> <string key="piTimeSeriesAsBin" value="true"/> <!-- Will convert the specified </properties> </Run> |
The dimr configuration file will be read to find the components that are being used so it knows which files need to be changed.
boundary NetCDF file to ASCII write the pi time series values for fbc as binary in timeseries_import.bin-->
<string key="dWaveNetcdfBoundaryFileToConvert" value="input/boundary.nc"/>
<!-- Optional settings for conversion of boundary file to ASCII, values shown here are default-->
<string key="dWaveBoundaryFilePrefix" value="WW3_"/>
<string key="dWaveBoundaryFileNumberOfCopies" value="3"/>
</properties>
</Run>
|
The dimr configuration file will be read to find the components that are being used so it knows which files need to be changed.
Code Block | ||||
---|---|---|---|---|
| ||||
<?xml version="1.0" encoding="UTF-8"?>
<dimrConfig xsi:schemaLocation="http://schemas.deltares.nl/dimr http://content.oss.deltares.nl/schemas/dimr-1.0.xsd" xmlns="http://schemas.deltares.nl/dimr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<documentation>
<fileVersion>1.00</fileVersion>
<createdBy>Deltares, Coupling Team</createdBy>
<creationDate>2018-07-07T14:49:48.9157275Z</creationDate>
<control>
<parallel>
<startGroup>
<time>1 60 2678500</time>
<coupler name="1d2d_to_rtc"/>
<start name="real-time control"/>
| ||||
Code Block | ||||
| ||||
<?xml version="1.0" encoding="UTF-8"?> <dimrConfig xsi:schemaLocation="http://schemas.deltares.nl/dimr http://content.oss.deltares.nl/schemas/dimr-1.0.xsd" xmlns="http://schemas.deltares.nl/dimr" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <documentation> <fileVersion>1.00</fileVersion> <createdBy>Deltares, Coupling Team</createdBy> <creationDate>2018-07-07T14:49:48.9157275Z</creationDate> <control> <parallel> <startGroup> <time>1 60 2678500</time> <coupler name="1d2d_to_rtc"/> <start name="real-time control"/> <coupler name="rtc_to_1d2d"/> </startGroup> <start name="1d2d"/> </parallel> </control> <component name="real-time control"> <library>FBCTools_BMI</library> <workingDir>rtc</workingDir> <inputFile>.</inputFile> </component> <component name="1d2d"> <library>flow1d2d</library> <workingDir>1d2dcoupler</workingDir> <inputFile>1d2d.ini</inputFile> </component> <coupler name="rtc_to_1d2d"/> <sourceComponent>real-time control<</sourceComponent>startGroup> <start <targetComponent>1d2d</targetComponent>name="1d2d"/> <item></parallel> </control> <component name="real-time control"> <sourceName>output_Langel_zu_Crest level (s)</sourceName> <library>FBCTools_BMI</library> <workingDir>rtc</workingDir> <targetName>water flow 1d/weirs/Langel_zu/structure_crest_level</targetName> <inputFile>.</inputFile> </item>component> <item><component name="1d2d"> <sourceName>output_02_Wehr_Duis~~1_Crest level (s)</sourceName><library>flow1d2d</library> <workingDir>1d2dcoupler</workingDir> <targetName>water flow 1d/weirs/02_Wehr_Duis~~1/structure_crest_level</targetName> </item> </coupler> <inputFile>1d2d.ini</inputFile> </component> <coupler name="1d2drtc_to_rtc1d2d"> <sourceComponent>1d2d<<sourceComponent>real-time control</sourceComponent> <targetComponent>real-time control<<targetComponent>1d2d</targetComponent> <item> <sourceName>water flow 1d/observations/P_Langel/water_level</<sourceName>output_Langel_zu_Crest level (s)</sourceName> <targetName>input_P_Langel_Water level (op)<<targetName>water flow 1d/weirs/Langel_zu/structure_crest_level</targetName> </item> <item> <sourceName>water flow 1d/observations/RuhrOWDuisburg/water_level</<sourceName>output_02_Wehr_Duis~~1_Crest level (s)</sourceName> <targetName>input_RuhrOWDuisburg_Water level (op)<<targetName>water flow 1d/weirs/02_Wehr_Duis~~1/structure_crest_level</targetName> </item> </coupler> </dimrConfig> |
Also when the <time> element is present within <control> <parallel> <startGroup> its contents will be replaced with the appropriate values.
FBC component
Will be used if library "FBCTools_BMI" is configured as component within the dimr config file
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="real-time control">
<library>FBCTools_BMI</library>
<workingDir>rtc</workingDir>
<!-- Look hardcoded for rtcRuntimeConfig.xml -->
<inputFile>.</inputFile>
</component>
|
It will look for the hardcoded file name rtcRuntimeConfig.xml in working directory relative to the parent dir of dimr config file.
It will replace start date and end date in rtcRuntimeConfig.xml with the appropriate values.
It will look for the hardcoded file name timeseries_import.xml in the working dir and insert all timeseries from the time series file configured by "piFileForFbc" (or the first time series xml if there is only 1) by matching headers.
DFlowFM component
<coupler name="1d2d_to_rtc">
<sourceComponent>1d2d</sourceComponent>
<targetComponent>real-time control</targetComponent>
<item>
<sourceName>water flow 1d/observations/P_Langel/water_level</sourceName>
<targetName>input_P_Langel_Water level (op)</targetName>
</item>
<item>
<sourceName>water flow 1d/observations/RuhrOWDuisburg/water_level</sourceName>
<targetName>input_RuhrOWDuisburg_Water level (op)</targetName>
</item>
</coupler>
</dimrConfig>
|
Also when the <time> element is present within <control> <parallel> <startGroup> its contents will be replaced with the appropriate values.
FBC component
Will be used if library "FBCTools_BMI" is configured as component Will be used if library "dflowfm" is configured as component within the dimr config file
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="dflowFMreal-time control"> <library>dflowfm<<library>FBCTools_BMI</library> <workingDir>fm<<workingDir>rtc</workingDir> <inputFile>mackay.mdu</inputFile> <<!-- Look hardcoded for rtcRuntimeConfig.xml --> <inputFile>.</inputFile> </component> |
It will look for the .mdu file hardcoded file name rtcRuntimeConfig.xml in working directory relative to the parent dir of dimr config file.
It will read "ExtForceFileNew" value.
Code Block | ||
---|---|---|
| ||
[external forcing]
ExtForceFile =
ExtForceFileNew = FlowFM_bnd.ext
|
It will look for .ext file relative to .mdu file parent directory and extract all "forcingfile" properties from it.
Code Block | ||
---|---|---|
| ||
[boundary]
quantity = waterlevelbnd
locationfile = mackay_bnd.pli
forcingfile = mackay_bnd.bc
[boundary]
quantity = rainfall
locationfile = mackay_ugrid_wgs84_net.nc
forcingfile = ..\input\mackay_rain.bc
|
Insert all timeseries from "piFileForFm" (or the first time series xml if there is only 1) into all .bc files (relative to .ext file parent dir) by matching headers.
In the .mdu file itself it will replace Tstart, Tstop and RstInterval with the appropriate values.
RstInterval can be overwritten by a property in the run info file called "restartIntervalForFm"
DFlow1D component
Will be used if library "cf_dll" is configured as component within the dimr config file
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="Hydrodynamics">
<library>cf_dll</library>
<workingDir>dflow1d</workingDir>
<inputFile>Hydrodynamics.md1d</inputFile>
</component>
|
It will look for the .md1d file in working directory relative to the parent dir of dimr config file.
It will replace StartTime and StopTime with the appropriate values.
replace start date and end date in rtcRuntimeConfig.xml with the appropriate values.
It will look for the hardcoded file name timeseries_import.xml in the working dir and insert all timeseries from the time series file configured by "piFileForFbc" (or the first time series xml if there is only 1) by matching headers.
DFlowFM component
Will be used if library "dflowfm" is configured as component within the dimr config file
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="dflowFM">
<library>dflowfm</library>
<workingDir>fm</workingDir>
<inputFile>mackay.mdu</inputFile>
</component>
|
It will look for the .mdu file in working directory relative to the parent dir of dimr config file.
It will read "ExtForceFileNew" value.
Code Block | ||
---|---|---|
| ||
[external forcing]
ExtForceFile =
ExtForceFileNew = FlowFM_bnd.ext
|
It will look for .ext file relative to .mdu file parent directory and extract all "forcingfile" properties from it.
Code Block | ||
---|---|---|
| ||
[boundary]
quantity = waterlevelbnd
locationfile = mackay_bnd.pli
forcingfile = mackay_bnd.bc
[boundary]
quantity = rainfall
locationfile = mackay_ugrid_wgs84_net.nc
forcingfile = ..\input\mackay_rain.bc
|
Insert all timeseries from "piFileForFmIt will look for "boundCondFile" to find .bc file (relative to .md1d file parent dir) and insert all timeseries from "piFileForFlow1d" (or the first time series xml if there is only 1) by ) into all .bc files (relative to .ext file parent dir) by matching headers.
Flow1D2D component
In the .mdu file itself it will replace Tstart, Tstop and RstInterval with the appropriate values.
RstInterval can be overwritten by a property in the run info file called "restartIntervalForFm"
DFlow1D component
Will be Will be used if library "flow1d2dcf_dll" is configuredconfigured as component within the dimr config file
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="1d2dHydrodynamics"> <library>flow1d2d<<library>cf_dll</library> <workingDir>1d2dcoupler<<workingDir>dflow1d</workingDir> <!-- Will be read to find references to .md1d and. mdu file--> <inputFile>1d2d.ini</inputFile> </component> <inputFile>Hydrodynamics.md1d</inputFile> </component> |
It will look for the .ini md1d file in working directory relative to the parent dir of dimr config file.
It will replace StartTime and StopTime with the appropriate values.
It will look for "boundCondFile" to find .bc file (relative to .md1d file parent dir) and insert all timeseries from "piFileForFlow1d" (or the first time series xml if there is only 1) by matching headers.
Flow1D2D component
Will be used if library "flow1d2d" is configured
Code Block | ||||
---|---|---|---|---|
| ||||
<component name="1d2d">
<library>flow1d2d</library>
<workingDir>1d2dcoupler</workingDir>
<!-- Will be read to find references to .md1d and. mdu file-->
<inputFile>1d2d.ini</inputFile>
</component>
|
It will look for the .ini file in working directory relative to the parent dir of dimr config file.
Code Block | ||
---|---|---|
| ||
[Model]
type | ||
Code Block | ||
| ||
[Model] type = Flow1D name = Flow1D name = water flow 1d directory = ..\dflow1d modelDefinitionFile = water flow 1d.md1d [Model] type = FlowFM name = FlowFM directory = ..\dflowfm modelDefinitionFile = FlowFM.mdu |
It will extract .md1d file (with directory and model definition file relative to parent dir of the .ini file) by looking for model = Flow1D
It will extract .mdu file (with directory and model definition file relative to parent dir of the .ini file) by looking for model = FlowFM
It will process the .md1d and .mdu file the same way as described in DFlow1D and DFlowFM component
D-Waves component
Will be used if library "wave" is configured
Code Block | ||||
---|---|---|---|---|
| ||||
= ..\dflowfm
modelDefinitionFile = FlowFM.mdu
|
It will extract .md1d file (with directory and model definition file relative to parent dir of the .ini file) by looking for model = Flow1D
It will extract .mdu file (with directory and model definition file relative to parent dir of the .ini file) by looking for model = FlowFM
...
<component name="1d2d">
<library>wave</library>
<workingDir>wave</workingDir>
<inputFile>stmartin.mdw</inputFile>
</component>
|
It will look for the .mdw file in working directory relative to the parent dir of dimr config file.
At this point the DIMR adapter only performs a conversion of the boundary conditions NetCDF file to ASCII format. The relative path of the netCDF file to convert must be provided in the PI runinfo file using the dWaveNetcdfBoundaryFileToConvert property as shown in the example runinfo file above. Two additional properties are provided, to summarize:
- dWaveNetcdfBoundaryFileToConvert = relative path of the boundary conditions netCdf file
- dWaveBoundaryFilePrefix = prefix for the filenames of the output ASCII files, the default prefix is "WW3_"
- dWaveBoundaryFileNumberOfCopies = the number of file copies to provide for each boundary, the default number is 3