Versions Compared

Key

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

...

  • startUpActivities
  • exportActivities
  • executeActivities
  • importActivities
  • shutDownActivities

 


General settings


Figure 67 Elements of the general section of the general adapter configuration

...

  • description - optional description of the activity (for documentation only)
  • sourceZipFile - the name of the zip file to be unzipped
  • destinationDir - the name of the directory where the files will be put

...


zipActivity

Root element of a zip activity used to pack all files and subdirectories of an indicated directory to a zip file for later use/inspection. One or more source file pattern (including * and ? wildcards) can be specified to include only a subset of the files in the source directory. Multiple zip activities may be defined. The file name may include environment variables, as well as tags defined in the general adapter or on the global.properties. See the environment variables section for a list of internal variables.

...

  • description - optional description of the activity (for documentation only)
  • sourceDir - the name of the directory containing the files to be zipped
  • sourcePatterm - (Since 2019.02) a file name pattern to select a subset of the files in source directory.
  • destinationZipFile - the name of the zip file to be created

 


Example:

No Format
<startupActivities>
    <unzipActivity>
        <sourceZipFile>extra_files.zip</sourceZipFile>
        <destinationDir>%ROOT_DIR%/work</destinationDir>
    </unzipActivity>
</startupActivities>
...
<shutdownActivities>
    <zipActivity>
        <sourceDir>%ROOT_DIR%/work</sourceDir>
        <sourcePattern>input/timeseries_input.*</sourcePattern>
        <sourcePattern>diagnostics/diag.xml</sourcePattern>
        <destinationZipFile>%ROOT_DIR%/inspection/%CURRENT_TIME%_%TIME0%_saved.zip</destinationZipFile>
    </zipActivity>
</shutdownActivities>

...

Option to skip time series sets if the location set does not exist. Useful when module or workflow is run in loop with tags being translated. Default is 'false'.

exportMapStacksActivity

...



Figure 72 Elements of the ExportMapStacksActivity.

...

TimeSeriesSets to be exported. These should contain only one locationId. For exporting multiple grids, multiple exportMapStack activities should be defined. 


exportProfilesActivity

Configuration of the exportProfiles activity is identical to the exportTimeSeries Activity.

...

  • string
  • int
  • float
  • double (since stable build 2014.01)
  • bool

 


example of exported run file

Code Block
xml
xml
<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">
	<logLevel>info</logLevel>
    <timeZone>0.0</timeZone>
    <startDateTime date="1900-01-01" time="00:00:00"/>
    <endDateTime date="2100-01-01" time="00:00:00"/>
    <time0 date="2000-01-01" time="00:00:00"/>
    <workDir>workdir</workDir>
    <outputDiagnosticFile>diagnostic</outputDiagnosticFile>
</Run>

...


exportNetcdfRunFileActivity (since stable build 2014.01)

...

Code Block
2002 11 30 09 00                     ! MODEL START         : ISYEAR,ISMONTH,ISDATE,ISHR,ISMN [year,month,day,hour,minute]
2002 11 30 11 00                       ! MODEL STOP          : ISYEAR,ISMONTH,ISDATE,ISHR,ISMN [year,month,day,hour,minute]
2                                     ! TIME STEP           :[sec]
131-52-2                            ! TOXIC ID            : CAS NO.-TOXIC, 444#-OI
235875.9     329956.4 ! ACCIDENT LOC.       : X   Y      TM coordinate (referred in LXLY.INP)
2012 01 10 09 00                       ! ACCIDENT TIME       : IEVYEAR,IEVMONTH,IEVDATE,IEVHR,IEVMN [year,month,day,hour,minute]
10.0                      ! spill duration      : [MIN]
500000.0                 ! spill material mass : [G]
10.                                   ! CHLA                : CHLA CONC. [UG/L] FOR TOXIC CALCULATION
5.                                    ! TEM                 : WATER TEMPERATURE [DEGREE C] FOR TOXIC CALCULATION
5.                                    ! SSC                 : Suspended Solid Conc.  [MG/L] FOR TOXIC CALCULATION
0.1                                   ! DOC                 : DOC CONC.  [MG/L] FOR TOXIC CALCULATION
100.                                  ! I                   : IRADIATION [LY/DAY]
5.                                    ! WSPD                : WINDSPEED  [M/S]
73                   ! simulation number
200211300900FSS200211300900   FSS ! test

...


exportAreaSelectionActivity

...

Code Block
languagexml
titleExample customJre using Fews-bin
<command>
	<className>nl.wldelft.fews.adapter.urbsiniadapter.UrbsIniAdapter</className>
	<customJreDir>$FEWS<customJreDir>$BIN_BIN_DIR$/windows/jre</customJreDir>
	<jvmArg>-mx512m</jvmArg>
</command>

...

Code Block
languagexml
titleAppending a directory to the Windows PATH environment variable
<environmentVariables>
	<environmentVariable>
		<name>path</name>
		<value>%PATH%;%ROOT_DIR%\wflow_bin;</value>
	</environmentVariable>
</environmentVariables>

...


logFile 

Optional (since stable build 2014.01) . One or more text files that contain log information from the module that is executed. After the module has executed, the specified lines from these files will be imported in FEWS as log messages with the specified log level.

...

Code Block
xml
xml
<importStateActivity>
	<stateImportDir>%WORK_DIR%</stateImportDir>
	<stateFile>
		<importFile>state.out</importFile>
		<!-- Rename imported state file so that it can be used as input state for a future model run. -->
		<relativeExportFile>state.inp</relativeExportFile>
	</stateFile>
	<stateFile>
		<importFile>state2.out</importFile>
		<!-- Rename imported state file so that it can be used as input state for a future model run. -->
		<relativeExportFile>state2.inp</relativeExportFile>
	</stateFile>
</importStateActivity>

...


Since 2017.02. Import a dynamic number of states for different state times at once. Pi state description xml file is not used. When exported the file is named "start.bin": 

Code Block
xml
xml
<importStateActivity>
   <stateImportDir>states</stateImportDir>
   <stateFileDateTimePattern>'state'yyyyMMddHHmm'.bin'</stateFileDateTimePattern>
   <relativeExportFile>start.bin</relativeExportFile>
</importStateActivity>

 


Old example that reads the input state file paths from a pi state description xml file. Do not use this if a pi state description xml file is not needed:

...

  • importFile - PI-XML file describing the time series to be imported. The file contains all information on type of data to be imported (scalar, longitudinal, grid, polygon). For all data types except the grid the file also contains the time series data If the directory location is not explicitly specified the file will be expected to be read from the importDir defined in the general section.

...


importMapStacksActivity

Root element for importing grid time series resulting from the run of the external modules. Multiple elements may be defined. importFile and timeSeriesSet should be defined.

...