Versions Compared

Key

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

...


Figure 76 Elements of the ImportActivities configuration

description

Optional description of import activity. Used for reference purposes only

importStateActivity

Root element for importing modules states resulting from the run of the external modules. Multiple elements may be defined. If no state is to be imported (for example in forecast run as opposed to state run), then the element should not be defined.

  • stateConfigFile - Fully qualifying name of the XML file containing the state import configuration
  • expiryTime - When the state is an intermediate result in a forecast run you can let the state expire. By default the expiry time is the same as the module instance run.
  • synchLevel - Optional synch level for state. Defaults to 0 is not specified (i.e. same as data generated by the forecast run)
stateConfigFile

Name (and location) of the PI-XML file describing the states to be imported. If the directory location is not explicitly specified the file will be expected to be read from the importDir defined in the general section. This file contains all necessary information to define state type and location. The moduleInstanceId of the state imported is per definition the current module instance.

importTimeSeriesActivity

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

  • 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

exportPlaceholdFile

This option can be used for all import activities, except for importStateActivity.
If <exportPlaceholderFile>true</exportPlaceholderFile>, then the General adapter will generate placeholder files. A placeholder file is a file with headers only, without timeseries. Its name is the same as filename configured for the ImportActivity and this placeholderfile is written to the import directory. The placeholder files are written before any execute activity is started. The models cq model adapters should read this placeholder files to see which data should be provided to import in FEWS.

  • <importTimeSeriesActivity> writes headers to pi_timeseries.xml
  • <importMapStacksActivity> writes headers to pi_mapstacks.xml
  • <importPiNetcdfActivity> writes headers to netCDF file
  • <importProfilesActivity> writes headers to pi_profiles.xml

The intention behind this exportPlaceholderFile functionality is that the model cq modeladapter reads the placeholders to see which timeseries are required by Fews.
After simulation, the model cq modeladapter overwrites these files with its own data over the placeholder files ready to be imported by the import activity.

Code Block
xml
xml

<importTimeSeriesActivity>
	<exportPlaceholderFile>true</exportPlaceholderFile>
	<importFile>output.xml</importFile>
	<timeSeriesSets>
        ....
	</timeSeriesSets>
</importTimeSeriesActivity>

It is available in the same way for importTimeSeriesActivity, importMapStacksActivity, importPiNetcdfActivity and importProfilesActivity.

description

Optional description of import activity. Used for reference purposes only

importStateActivity

Root element for importing modules states 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.

importPiNetcdfActivity

Imports grid and scalar time series resulting from the run of the external modules.
All timeseries sets specified inside one importPiNetcdfActivity must have the same value type - grid or scalar.

importProfilesActivity

...

If no state is to be imported (for example in forecast run as opposed to state run), then the element should not be defined.

  • stateConfigFile - Fully qualifying name of the XML file containing the state import configuration
  • expiryTime - When the state is an intermediate result in a forecast run you can let the state expire. By default the expiry time is the same as the module instance run.
  • synchLevel - Optional synch level for state. Defaults to 0 is not specified (i.e. same as data generated by the forecast run)
stateConfigFile

Name (and location) of the PI-XML file describing the states to be imported. If the directory location is not explicitly specified the file will be expected to be read from the importDir defined in the general section. This file contains all necessary information to define state type and location. The moduleInstanceId of the state imported is per definition the current module instance.

importTimeSeriesActivity

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

  • 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.

importPiNetcdfActivity

Imports grid and scalar time series resulting from the run of the external modules.
All timeseries sets specified inside one importPiNetcdfActivity must have the same value type - grid or scalar.

importProfilesActivity

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

exportPlaceholdFile

If <exportPlaceholderFile>true</exportPlaceholderFile>, then the General adapter will generate placeholder files. A placeholder file is a file with headers only, without timeseries. Its name is the same as filename configured for the ImportActivity and this placeholderfile is written to the import directory. The placeholder files are written before any execute activity is started. The models cq model adapters should read this placeholder files to see which data should be provided to import in FEWS.

  • <importTimeSeriesActivity> writes headers to pi_timeseries.xml
  • <importMapStacksActivity> writes headers to pi_mapstacks.xml
  • <importPiNetcdfActivity> writes headers to NC file
  • <importProfilesActivity> writes headers to pi_profiles.xml

The intention behind this exportPlaceholderFile functionality is that the model cq modeladapter reads the placeholders to see which timeseries are required by Fews.
After simulation, the model cq modeladapter overwrites these files with its own data over the placeholder files ready to be imported by the import activity.

...


<importTimeSeriesActivity>
	<exportPlaceholderFile>true</exportPlaceholderFile>
	<importFile>output.xml</importFile>
	<timeSeriesSets>
        ....
	</timeSeriesSets>
</importTimeSeriesActivity>

It is available in the same way for importTimeSeriesActivity, importMapStacksActivity, importPiNetcdfActivity and importProfilesActivity.

Shutdown Activities


Elements of the Shutdown Activities configuration
This activity is the identical to the startUpActivities. The only difference is that these are carried out after the module run and import of data. See definition of StartUp activities for configuration.