Versions Compared

Key

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

...


Example:
<?xml version="1.0" encoding="UTF-8"?>
<Polygons xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.wldelft.nl/fews
pi_polygons.xsd" version="1.1">
<geoDatum>LOCAL</geoDatum>
<timeZone>0.0</timeZone>
<polygon>
<locationId>String</locationId>
<parameter>String</parameter>
<timeStep>
<seconds>3600</seconds>
</timeStep>
<startDate date="1967-08-13" time="13:00:00"/>
<endDate date="1967-08-13" time="14:00:00"/>
<name>Flood Rhine</name>
<upstreamId>rh2</upstreamId>
<event date="1967-08-13" time="13:00:00">
<pt x="3.14159265358979" y="3.14159265358979" z="3.14159265358979" mark="1"/>
<pt x="3.14159265358979" y="3.14159265358979" z="3.14159265358979" mark="2"/>
</event>
<event date="1967-08-13" time="14:00:00">
<pt x="3.14159265358979" y="3.14159265358979" z="3.14159265358979" mark="0"/>
<pt x="3.14159265358979" y="3.14159265358979" z="3.14159265358979" mark="0"/>
</event>
</polygon>
</Polygons>

The structure of the XML schema is given in the figures below. Note that attributes are not displayed in the figures. Consult the full schema (+documentation) for details.

Run Parameters

The model run file contains Since 2008.03. General information about the files exported run executed by the General Adapter to the model input folders and information about the files to be produced by the model and imported by general adapter that is used by the pre and post adapter
This file generated on the fly during a pi run file export activity from the General Adapter. The model run file is recreated every time a general adapter runs. The fully qualified path to this file is given as command line argument when a pre of post adapter is executedThis file is read only for the pre and post adapters.
A pre or post adapter that supports pi run files only needs this pi run file at the command line argument to find all the pi files it needs to read and write.
Other options can be passed to the pre or post adapter by adding extra properties to the generated pi run file during export.

schema file, root element

example file

pi_run.xsd, Run

pi_run.xml

Here is a list of information available in the model run file:

  1. timeZone: Time zone used in the exported pi files. This is also the default time zone used by the general adapter when the time zone is not specified in an imported file.
  2. startDateTime: Start of the run. The earliest time exported by the General Adapter.
  3. endDateTime: End of the run. The latest time exported by the General Adapter.
  4. time0: This is the start of a forecast for a forecast run. This is the time 0 of a FEWS task run.
  5. lastObservationDateTime: Last time of non missing observation based on observed time series sets configured in the general adapter.
  6. workDir: Fully qualified path to the current working directory. This is also the startup directory of an non java executable launched by the general adapter.
  7. inputParameterFile: Fully qualified path to the pi parameter file exported by the General Adapter before the run. An active modifier is already applied to this fileproperties: Kind of environment variables for the pre and post adapter. This is also a convenient way to pass global properties to a pre or post adapter. An adapter is not allowed to access the FEWS global.properties directly. These extra options make an additional pre or post adapter configuration file unnecessary. See the documentation of the used pre and post adapter for the supported property keys with their allowed values.
  8. inputStateDescriptionFile: Fully qualified path to the pi state file that describes the state exported by the General Adapter. In this file you can also find the state time and the paths to the actual state files.
  9. inputDataSetDirinputTimeSeriesFile: Fully qualified path to the directory to which a pi time series file exported by the General Adapter unpacks the module data setbefore the run. Element may occur multiple times.
  10. inputTimeSeriesFilesinputMapStackFile: List of fully Fully qualified paths to the timeseries files path to a map stack file exported by the General Adapter . (Under construction: FEWS-2010)before the run.
    A map stack is a list of raster files for each time step.
  11. inputNetcdfFile: Fully qualified path to a pi netcdf file inputParameterFile: Fully qualified path to the pi parameter file that describes the model parameters exported by the General Adapter . (Under construction: FEWS-2010)before the run
  12. inputLongitudinalProfilesFileworkDir: Fully qualified path to a pi longitudinal profiles file exported by the General before the run
  13. outputDiagnosticFile the working directory. This is also the startup directory of an non java executable launched by the general adapter.diagnosticFile: Fully qualified path the to a pi diagnositic file that that has to will be imported by the general adapter after each execute activity. Is General
    Adapter after the run . It is deleted by the general adapter before each execute activitythe run.
  14. outputStateDescriptionFile: Fully qualified path to the pi state file that descripes the state that has to will be imported by the General Adapter.outputTimeSeriesFiles: List of fully qualified paths to the timeseries files to
    adapter after the run
  15. outputTimeSeriesFile: Fully qualified path to a pi time series file that will be imported by the General Adapter after the run
  16. outputMapStackFile: Fully qualified path to a pi map stap file that will be imported by the General Adapter . (Under construction: FEWS-2010)

The structure of the XML schema is given in the figure below (This file is currently under construction):
Image Removed

An example file is given in the figure below (under construction):

  1. after the run. A map stack is a list of raster files for each time step.
  2. outputNetcdfFile: Fully qualified path to a pi netcdf file that will be imported by the General Adapter after the run
  3. outputLongitudinalProfilesFile: Fully qualified path to a pi longitudinal profiles file that will be imported by the General Adapter after the run
  4. properties: Kind of extra command line arguments for the pre and post adapter. This is also a
    convinient way way to pass global properties to a pre or post adapter. An adapter is not allowed to access the
    FEWS global.properties directly. These extra options makes an additional pre or post adapter configuration file unnessesary.
    See the documentation of the used pre and post adapter for the supported property keys with their allowed values

The structure of the XML schema is given in the figure below (This file is currently under construction):
Image Added

An example file is given in the figure below (under construction):

<?xml version="1.0" encoding="UTF-8"?>
<fews:Run version="1.2" xsi:schemaLocation="http://www.wldelft.nl/fews/PI pi_run.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:fews="http://www.wldelft.nl/fews/PI">
   <fews:timeZone>0</fews:timeZone>
   <fews:startDateTime date="2008-08-13" time="00:00:00"/>
   <fews:endDateTime date="2008-08-13" time="12:00:00"/>
   <fews:time0 date="2008-08-13" time="10:00:00"/>
   <fews:lastObservationDateTime date="2008-08-13" time="08:00:00"/>
   <fews:diagnosticFile>output/diagnostics.xml</fews:diagnosticFile>
   <fews:workDir>work</fews:workDir>
   <fews:inputStateDescriptionFile>input/state.xml</fews:inputStateDescriptionFile>
   <fews:inputDir>input</fews:inputDir>
   <fews:inputDataSetDir>input/dataset</fews:inputDataSetDir>
   <fews:outputStateDescriptionFile>output/state.xml</fews:outputStateDescriptionFile>
   <fews:outputDir>output</fews:outputDir>
   <fews:properties>
      <fews:description>a variable</fews:description>
      <fews:string value="c:\java\jre" key="JAVA_HOME"/>
   </fews:properties>
</fews:Run>

<?xml version="1.0" encoding<?xml version="1.0" encoding="UTF-8"?>
<fews <Run     xsi:Run versionschemaLocation="1.2" xsi:schemaLocation="http://www.wldelft.nl/fews/PI http://wwwfews.wldelft.nl/fewsschemas/version1.0/PI pi_run.xsdImage Added" xmlns:xsi
    xmlns="http://www.w3wldelft.orgnl/2001fews/XMLSchema-instancePI" xmlns xmlns:fewsxsi="http://www.wldelftw3.nlorg/fews2001/PIXMLSchema-instance">
   <fews:timeZone>0</fews:timeZone>
   <fews:startDateTime date     <timeZone>0.0</timeZone>
    <startDateTime date="2008-10-17" time="09:00:00"/>
    <endDateTime date="2008-0810-1323" time time="0011:00:00"/>
   <fews:endDateTime date     <time0 date="2008-0810-1321" time time="1209:00:00"/>
   <fews:time0 date="2008-08-13" time="10:00:00"/>
   <fews:lastObservationDateTime date="2008-08-13" time="08:00:00"/>
   <fews:diagnosticFile>output/diagnostics.xml</fews:diagnosticFile>
   <fews:workDir>work</fews:workDir>
   <fews:inputStateDescriptionFile>input/state.xml</fews:inputStateDescriptionFile>
   <fews:inputDir>input</fews:inputDir>
   <fews:inputDataSetDir>input/dataset</fews:inputDataSetDir>
   <fews:outputStateDescriptionFile>output/state.xml</fews:outputStateDescriptionFile>
   <fews:outputDir>output</fews:outputDir>
   <fews:properties>
      <fews:description>a variable</fews:description>
      <fews:string value="c:\java\jre" key="JAVA_HOME"/>
   </fews:properties>
</fews:Run>     <workDir>F:\Fews\Midlands_sa\Modules\MCRM\Sev-C101</workDir>
    <inputStateDescriptionFile>F:\Fews\Midlands_sa\Modules\MCRM\Sev-C101\InputFromGA\state.xml</inputStateDescriptionFile>
    <inputTimeSeriesFile>F:\Fews\Midlands_sa\Modules\MCRM\Sev-C101\InputFromGA\inp_hindcast.xml</inputTimeSeriesFile>
    <inputTimeSeriesFile>F:\Fews\Midlands_sa\Modules\MCRM\Sev-C101\InputFromGA\inp_forecast.xml</inputTimeSeriesFile>
    <inputTimeSeriesFile>F:\Fews\Midlands_sa\Modules\MCRM\Sev-C101\InputFromGA\inp_stateupdate.xml</inputTimeSeriesFile>
    <outputTimeSeriesFile>F:\Fews\Midlands_SA\Modules\MCRM\SEV-C101\OutputToGA\out_hindcast.xml</outputTimeSeriesFile>
    <outputTimeSeriesFile>F:\Fews\Midlands_SA\Modules\MCRM\SEV-C101\OutputToGA\out_forecast.xml</outputTimeSeriesFile>
    <properties>
        <float key="test" value="12.0"/>
        <string key="eer" value="fdfdfd"/>
    </properties>
</Run>

 Implementing the Pi_Run option in the Genaral AdapterImplementing the Pi_Run option in the Genaral Adapter

To generate a pi_run file for a module run, it is necessary to configure the run options in the General section of the General Adapter configuration file. The following options can be configured:

...

pre or post adapter you can configure a export run file activity
The export fun file activity in the General Adapter XML schema is given in the figure below:
Image Modified