...
In case of sigma-layer data, a locationSet links the sigma layer/coordinate (% of depth) to a layer index and a parent location which determines the respective sub-domain. This can be organized in from of a .csv file. To determine that the sigma layer/coordinate must be interpreted for 3rd dimension by Delft-FEWS define the layerSigmaCoordinate parameter in the locationSet, that is reading the respective .csv file.
...
Delft-FEWS interprets the Sigma Layers
...
based on the following logic:
- It does not take into account negative values, but interprets it as absolute value
- It always sorts from smallest to largest value and hence always reads upwards
- When reading the input file Delft-FEWS interprets the layer numbering in an upwards direction (0-n, upwards)
- abs(smallest Sigma Coordinate) = lowest layer = 0
- abs(highest Sigma Coordinate) = highest layer = n
Note that in case Delft-FEWS cannot find a corresponding depth value for a location due to the bathymetry of the water system, the results are automatically interpreted as missing and not visualized.
Z-LayersAnchor Z-Layers Z-Layers
| Z-Layers | |
| Z-Layers |
In case of z-layer data, a locationSet links the z-layer (absolute depth) to a layer index and a
...
In case of z-layer data, a locationSet links the z-layer (absolute depth) to a layer index and a parent location which determines the respective sub-domain. This can be organized in from of a .csv file. To determine that the z-layer must be interpreted for 3rd dimension by Delft-FEWS define the z-coordinate parameter in the locationSet, that is reading the respective .csv file.
...
| Code Block | ||
|---|---|---|
| ||
[external forcing] ExtForceFileNew = mackay_bnd.ext # ExtForceFileNew DDB uses new format ExtForceFile = mackay_pioneer.ext # *.ext |
z Example .ext file with reference to .bc file:
...
| Code Block | ||
|---|---|---|
| ||
<exportTimeSeriesActivity>
<exportFile>timeseries.xml</exportFile>
<timeSeriesSets>
<timeSeriesSet>
<moduleInstanceSetId>URBS_Forecast</moduleInstanceSetId>
<valueType>scalar</valueType>
<parameterId>Q.sim.fcst</parameterId>
<locationSetId>DFLOWFM_river.$CATCHMENT$_$SUBCATCHMENT$</locationSetId>
<timeSeriesType>simulated forecasting</timeSeriesType>
<timeStep unit="minute" multiplier="15"/>
<relativeViewPeriod unit="day" start="0" end="3"/>
<readWriteMode>read only</readWriteMode>
</timeSeriesSet>
<timeSeriesSet>
<moduleInstanceId>ImportROMS</moduleInstanceId>
<valueType>scalar</valueType>
<parameterId>H.tidal.fcst</parameterId>
<locationSetId>DFLOWFM_coastal.$CATCHMENT$_$SUBCATCHMENT$</locationSetId>
<timeSeriesType>external forecasting</timeSeriesType>
<timeStep unit="minute" multiplier="30"/>
<readWriteMode>read complete forecast</readWriteMode>
</timeSeriesSet>
</timeSeriesSets>
</exportTimeSeriesActivity>
|
D-Flow FM model configuration example (single domain, 2D data import)
...
| Code Block | ||
|---|---|---|
| ||
<?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>
<rootDir>$REGION_HOME$\Modules\dflowfm</rootDir>
<workDir>%ROOT_DIR%</workDir>
<exportDir>%ROOT_DIR%\dflowfm_curacao\input</exportDir>
<exportDataSetDir>$REGION_HOME$\Modules</exportDataSetDir>
<exportIdMap>IdExport_DFlowFM</exportIdMap>
<importDir>%ROOT_DIR%\dflowfm_curacao\output</importDir>
<importIdMap>IdImport_DFlowFM</importIdMap>
<dumpFileDir>$GA_DUMPFILEDIR$</dumpFileDir>
<dumpDir>%ROOT_DIR%\dflowfm_curacao\dump</dumpDir>
<diagnosticFile>%ROOT_DIR%\dummy.xml</diagnosticFile>
<missVal>-999.</missVal>
<!-- Take care this should be the timezone the computer is running in -->
<timeZone>
<timeZoneOffset>-04:00</timeZoneOffset>
</timeZone>
<endDateTimeFormat>yyyyMMdd_HHmmss</endDateTimeFormat>
</general>
<activities>
<startUpActivities>
<purgeActivity>
<filter>%ROOT_DIR%\dflowfm_curacao\output\*.*</filter>
</purgeActivity>
<purgeActivity>
<filter>%ROOT_DIR%\dflowfm_curacao\input\*.*</filter>
</purgeActivity>
</startUpActivities>
<exportActivities>
<exportStateActivity>
<moduleInstanceId>DFlowFM_curacao_Historical</moduleInstanceId>
<stateExportDir>%ROOT_DIR%\dflowfm_curacao\instate</stateExportDir>
<stateSelection>
<warmState>
<stateSearchPeriod unit="hour" start="-23" end="-2"/>
</warmState>
</stateSelection>
</exportStateActivity>
<exportNetcdfActivity>
<exportFile>air_pressure.nc</exportFile>
<timeSeriesSets>
<timeSeriesSet>
<moduleInstanceId>WFLOW_curacao_GA_Historical</moduleInstanceId>
<valueType>grid</valueType>
<parameterId>P.specific</parameterId>
<locationId>wflow_curacao</locationId>
<timeSeriesType>simulated historical</timeSeriesType>
<timeStep unit="hour" multiplier="1"/>
<relativeViewPeriod unit="hour" end="0"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</timeSeriesSets>
</exportNetcdfActivity>
<exportNetcdfRunFileActivity>
<description>This run file is passed as argument to DFLOWFM pre adapter</description>
<exportFile>%WORK_DIR%\run_info.nc</exportFile>
<properties>
<string key="model_id" value="dflowfm_curacao\curacao"/>
<string key="input_grid_files_to_convert" value="%ROOT_DIR%\dflowfm_curacao\input\x_wind.nc;%ROOT_DIR%\dflowfm_curacao\input\air_pressure.nc"/>
</properties>
</exportNetcdfRunFileActivity>
</exportActivities>
<executeActivities>
<executeActivity>
<description>DFlowFM pre adapter</description>
<command>
<className>nl.deltares.dflowfm.DFlowFMPreAdapter</className>
<binDir>adapter</binDir>
</command>
<arguments>
<argument>%WORK_DIR%\run_info.nc</argument>
</arguments>
<logFile>
<file>%WORK_DIR%\dflowfm_pre_adapter_log.txt</file>
<errorLinePattern>*ERROR*</errorLinePattern>
<warningLinePattern>*WARN*</warningLinePattern>
<infoLinePattern>*INFO*</infoLinePattern>
<debugLinePattern>*DEBUG*</debugLinePattern>
</logFile>
<timeOut>99999999</timeOut>
<ignoreDiagnostics>true</ignoreDiagnostics>
</executeActivity>
<executeActivity>
<description>Run DFLOWFM</description>
<command>
<executable>bin\unstruc.exe</executable>
</command>
<arguments>
<argument>--autostartstop</argument>
<argument>dflowfm_curacao\curacao.mdu</argument>
</arguments>
<logFile>
<file>%WORK_DIR%\dflowfm_curacao\curacao.dia</file>
<errorLinePattern>*ERROR*</errorLinePattern>
<warningLinePattern>*WARNING*</warningLinePattern>
<debugLinePattern>*INFO*</debugLinePattern>
<debugLinePattern>*DEBUG*</debugLinePattern>
</logFile>
<timeOut>44200000</timeOut>
<ignoreDiagnostics>true</ignoreDiagnostics>
</executeActivity>
</executeActivities>
<importActivities>
<importStateActivity>
<stateFile>
<importFile>%WORK_DIR%\dflowfm_curacao\output\curacao_%END_DATE_TIME%_rst.nc</importFile>
<relativeExportFile>curacao_%END_DATE_TIME%_rst.nc</relativeExportFile>
</stateFile>
</importStateActivity>
<importNetcdfActivity>
<importFile>%WORK_DIR%\dflowfm_curacao\output\curacao_map.nc</importFile>
<timeSeriesSets>
<timeSeriesSet>
<moduleInstanceId>DFlowFM_curacao_Historical</moduleInstanceId>
<valueType>grid</valueType>
<parameterId>H.sim</parameterId>
<locationId>DFlowFM_Curacao</locationId>
<timeSeriesType>simulated historical</timeSeriesType>
<timeStep unit="nonequidistant"/>
<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>
</timeSeriesSets>
</importNetcdfActivity>
</importActivities>
</activities>
</generalAdapterRun>
|
...
Define all sub-domain (partitions) locations in a location set so that they can be used as parent location for the locations per individual layer and sub-domain.
| Code Block | ||
|---|---|---|
| ||
<locationSet id="model_partitions"> <csvFile> <file>FmModelPartitions.csv</file> <geoDatum>WGS 1984</geoDatum> <id>%ID%</id> <name>%NAME%</name> <x>0</x> <y>0</y> <attribute id="EXTERNAL_ID"> <text>%EXTERNAL_ID%</text> </attribute> </csvFile> </locationSet> |
...
In a .csv link the parent location which indicates the whole partition/sub-domain to individual layers within each domain. This can either be done based on sigma-layers or z-layers depending on the model. In the locationSets.xml you have to either define the layerSigmaCoordinate or the z-coordinate to indicate to Delft-FEWS which parameter to use for the depth dimension.indicates the whole partition/sub-domain to individual layers within each domain. This can either be done based on sigma-layers or z-layers depending on the model. In the locationSets.xml you have to either define the layerSigmaCoordinate or the z-coordinate to indicate to Delft-FEWS which parameter to use for the depth dimension.
When defining the Sigma Coordinate make sure to follow Delft-FEWS logic to interpret the values as explained under sigma-layers.
D-Flow FM uses a similar logic and counts the layer consequently from lowest to highest (0-n, upwards)
- lowest layer = 0
- highest layer = n
Other models like DELWAQ and PART use a different logic, that counts the layers consequently from highest to lowest (0-n, downwards)
- highest layer = 0
- lowest layer = n
The individual model interpretation in combination with the Delft-FEWS interpretation has to be taken into account when linking the layers in the configuration.
location sets for sigma-layers
| Code Block | ||
|---|---|---|
| ||
<locationSet id="model_layers"> <csvFile> <file>FmModelLayers.csv</file> <geoDatum>WGS 1984</geoDatum> <id>%ID%</id> <parentLocationId>%PARENT_ID%</parentLocationId> <x>0</x> <y>0</y> <layerSigmaCoordinate>%SIGMA_COORDINATE%</layerSigmaCoordinate> <attribute id="SIGMA_COORDINATE"> <number>%SIGMA_COORDINATE%</number> </attribute> <attribute id="LAYER_INDEX"> <text>%LAYER_INDEX%</text> </attribute> <attribute id="PARENT_ID"> <text>%PARENT_ID%</text> </attribute> </csvFile> </locationSet> |
...

