Overview

MM3P files are essentially CSV files (comma-separated values) with the following characteristics:

  • The first line contains the identification of the columns (see the example below). This line is expected to be present, but it is simply skipped by the reading routines.
  • The ID of the location appears in the first column. The ID of the parameter appears in the second column. These are taken to be the external names for the location and parameter.
  • The time base column is used to optionally identify the time step of a series. This makes it possible to have both a 15 minutes and an hourly time series in one file.
  • The derivation is an enumeration of VAL (actual value) and AVG (average value during last time step). It is read as qualifier and can be used in the idMapping to store the series at the correct destination
  • The date and time for each observed value appears in the fifth column in the format "YYYY-mm-DD HH:MM".
  • The value itself appears in the sixth column.
  • There may be more than one location and more than one parameter in the file - each combination will become a new time series.

Example file

Here is an example of such a file (note that a comma (,) is used as the separator exclusively and that the decimal separator is a period (.))

OS_NAME,PT_NAME,Timebase,Derivation,Timestamp,Value,Manual
TKK001,LEVEL,15M,VAL,2009-03-13 05:00,10.655,
TKK001,LEVEL,15M,VAL,2009-03-13 04:45,10.65063,
TKK001,LEVEL,15M,VAL,2009-03-13 04:30,10.64937,
TKK001,LEVEL,15M,VAL,2009-03-13 04:15,10.65563,
TKK001,LEVEL,15M,VAL,2009-03-13 04:00,10.6575,
TKK001,LEVEL,15M,VAL,2009-03-13 03:45,10.6525,
TKK001,LEVEL,15M,VAL,2009-03-13 03:30,10.65,
TKK001,LEVEL,15M,VAL,2009-03-13 03:15,10.65125,
TKK001,LEVEL,15M,VAL,2009-03-13 03:00,10.64937,
TKK001,LEVEL,15M,VAL,2009-03-13 02:45,10.65,
TKK001,LEVEL,15M,VAL,2009-03-13 02:30,10.65063,
TKK001,LEVEL,15M,VAL,2009-03-13 02:15,10.65625,
TKK001,LEVEL,15M,VAL,2009-03-13 02:00,10.65312,
TKK001,LEVEL,15M,VAL,2009-03-13 01:45,10.66,
TKK001,LEVEL,15M,VAL,2009-03-13 01:30,10.64937,
TKK001,LEVEL,15M,VAL,2009-03-13 01:15,10.65688
TKK001,LEVEL,15M,VAL,2009-03-13 01:00,10.65938
TKK001,LEVEL,15M,VAL,2009-03-13 00:45,10.65688

Configuration

Notice that the importType should be defined as MM3PCSV.

<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun 
   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/timeSeriesImportRun.xsd">
  <import>
    <general>
      <importType>MM3PCSV</importType>
      <folder>$IMPORT_FOLDER_MM3P$</folder>
      <maxAllowedFolderSizeMB>250</maxAllowedFolderSizeMB>
      <failedFolder>$IMPORT_FAILED_FOLDER$/MM3P</failedFolder>
      <backupFolder>$IMPORT_BACKUP_FOLDER$/MM3P</backupFolder>
      <idMapId>IdMM3P</idMapId>
      <unitConversionsId>ImportUnitConversions</unitConversionsId>
      <importTimeZone>
        <timeZoneOffset>+00:00</timeZoneOffset>
      </importTimeZone>
      <dataFeedId>MM3P</dataFeedId>
      <reportChangedValues>true</reportChangedValues>
    </general>
    <timeSeriesSet>
      <moduleInstanceId>ImportMM3P</moduleInstanceId>
      <valueType>scalar</valueType>
      <parameterId>Q.meting</parameterId>
      <locationId>TKK001</locationId>
      <locationId>TKK101</locationId>
      <timeSeriesType>external historical</timeSeriesType>
      <timeStep unit="minute" multiplier="15"/>
      <readWriteMode>add originals</readWriteMode>
      <synchLevel>1</synchLevel>
    </timeSeriesSet>
  • No labels