Versions Compared

Key

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

...

Code Block
languagexml
themeEclipse
<exportNetcdfActivity>
                                                	<exportFile>precip_inputs.nc</exportFile>
                                                	<writeRealizationDimension>false</writeRealizationDimension>
                                                	<timeSeriesSets>
                                                            		<timeSeriesSet>
                                                                        			….
                                                            		</timeSeriesSet>
                                                	</timeSeriesSets>
                        </exportNetcdfActivity>

Because of this setting, in many cases the same moduleDataSet can be used for deterministic and probabilistic simulations.

Including multiple modes in one model

With the recent Raven version, it is possible to include multiple settings that can be used in different runs. The new functionality is the Mode command (section A.1.8 of the User Manual):

:IfModeEquals A # use target stage for reservoir control
   :ReservoirTargetStage 220300
  :ReadFromNetCDF
    :FileNameNC ../input/control_inputs.nc   :VarNameNC TARGET_STAGE
    :DimNamesNC stations time
   :StationIdx FROM_STATION_VAR
   :PeriodEndingNC
:EndReadFromNetCDF
:EndReservoirTargetStage
:EndIfModeEquals

:IfModeEquals B # use outflow for reservoir control
:OverrideReservoirFlow 220300
  :ReadFromNetCDF
    :FileNameNC ../input/control_inputs.nc   :VarNameNC RESERVOIR_OUTFLOW
    :DimNamesNC stations time
    :StationIdx FROM_STATION_VAR
    :PeriodEndingNC
  :EndReadFromNetCDF
:EndIfModeEquals

The Mode is a setting that can be provided in the runinfo.nc file (par 5.7) as a property. Equally to the other settings, this can be modified in FEWS as a location Attribute.

The IfModeEquals can be used in every Raven file, except the RVI file.

Executing the model

Because of the seamless integration, no model adapter is needed anymore. With the following configuration, the model will be executed. The Raven logfile is read directly by FEWS:

Code Block
languagexml
themeEclipse
<executeActivity>
            <command>
                        <executable>%REGION_HOME%/Modules/Raven/bin/Raven.exe</executable>
            </command>
            <arguments>
                        <argument>$MODEL$</argument>
            </arguments>
            <logFile>
                        <file>%ROOT_DIR%/$MODEL$/output\Raven_errors.txt</file>
                        <errorLinePattern>ERROR*</errorLinePattern>
                        <warningLinePattern>WARNING*</warningLinePattern>
                        <infoLinePattern>ADVISORY*</infoLinePattern>
                        <debugLinePattern>DEBUG*</debugLinePattern>
            </logFile>
            <timeOut>3000000</timeOut>
            <ignoreDiagnostics>true</ignoreDiagnostics>
</executeActivity>

The argument needs to be the name of the model. Logfile settings can be changed according to specific needs, more information can be found here: https://publicwiki.deltares.nl/display/FEWSDOC/05+General+Adapter+Module#id-05GeneralAdapterModule-logFile


Importing results

Model state

In case the simulation is used to create an updated model state, the importActivities include an importStateActivity. The Raven model state is stored as a [model]_solution.rvc in the output folder. The following configuration reads in the file and stores it as a model state:

Code Block
languagexml
themeEclipse
<importStateActivity>
            <stateFile>
                        <importFile>%ROOT_DIR%\$MODEL$/output/$MODEL$_solution.rvc</importFile>
                        <relativeExportFile>$MODEL$.rvc</relativeExportFile>
            </stateFile>
</importStateActivity>

Simulation results

Raven exports all relevant timeseries in NetCDF format. These can be imported in Delft-FEWS in the importActivities  as normal NetCDF import. The export files are placed in the Output folder and have as prefix the RunName of the simulation.