Versions Compared

Key

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


What

nameofinstance.xml

Description

Configuration for import module

schema location

http

https://

fews

fewsdocs.

wldelft

deltares.nl/schemas/version1.0/timeSeriesImportRun.xsd

Entry in ModuleDescriptors

<moduleDescriptor id="TimeSeriesImportRun">
<description>Import module to import timeseries from the various grid-formats ie GRIB format</description>
<className>nl.wldelft.fews.system.plugin.dataImport.TimeSeriesImport</className>
</moduleDescriptor>

Table of Contents

Time Series Import Module

...

Code Block
xml
xml
<general>
      <importTypeStandard>database</importTypeStandard>
      <jdbcDriverClass>com.mysql.jdbc.Driver</jdbcDriverClass>
      <jdbcConnectionString>jdbc:mysql://192.168.101.215/cwb_ac</jdbcConnectionString>
      <user>sobek</user>
      <password>Tohek>cwa</password>
      <relativeViewPeriod startOverrulable="true" endOverrulable="true" start="-1" end="1" unit="day"/>
      <table name="qpe_sums_obs">
        <dateTimeColumn name="rehdate"/>
        <valueColumn name="rad_gz" unit="mm/hr" locationId="Qesums" parameterId="P.radar.actual" parser="Mosaic"/>
      </table>
      <table name="qpe_sums_fo">
        <forecastDateTimeColumn name="createdate"/>
        <dateTimeColumn name="raddate"/>
        <valueColumn name="rad_gz" unit="mm/hr" locationId="Qpesums" parameterId="P.radar.forecast" parser="Mosaic"/>
      </table>
      <unitConversionsId>ImportUnitConversions</unitConversionsId>
      <importTimeZone>
        <timeZoneOffset>+00:00</timeZoneOffset>
      </importTimeZone>
      <dataFeedId>QPE_Sum</dataFeedId>
    </general>

sftp example:

Code Block
xml
xml
<general>
      <importType>TypicalAsciiForecast</importType>
      <folder>sftp://wf:2004wrf@130.167.66.114:22/home/WRF</folder>
      <relativeViewPeriod startOverrulable="true" endOverrulable="true" start="-1" end="3" unit="day"/>
      <unitConversionsId>ImportUnitConversions</unitConversionsId>
      <importTimeZone>
        <timeZoneOffset>+00:00</timeZoneOffset>
      </importTimeZone>
      <dataFeedId>Forecast</dataFeedId>
    </general>

...

Please note that the  triggering files cannot be located on the FTP.fileNamePatternFilter

groupImportPattern

Since 2024.01 - Option to filter specify groups of files that need to be imported based on their filenametogether. This can be useful for forecasts spread over several files which should be imported as one forecast i.e. a group of files, in particular if each file is added to the import folder at a different time.

The filenames must contain the forecast date and time. The pattern to define a group is specified in fileNameDateTimePattern, with the expected number of files for one forecast in numberOfFiles. The files will be imported only when all expected files are in the import folder. A time span also has to be specified in waitingTime to define when to consider the forecast as failed and move it to the failed folder. If more than the waiting time has passed between the forecast time and T0, the forecast is considered failed and the files are moved to the failed folder.

This option can be used in combination with the importTriggeringFile option.

For example, for the following configuration:

Code Block
languagexml
<groupImportPattern>
	<numberOfFiles>6</numberOfFiles>
    <fileNameDateTimePattern>'timeseries_'MMddHHmm'_?'</fileNameDateTimePattern>
    <waitingTime unit="day" multiplier="1"/>
</groupImportPattern>

with the import folder containing the files: 

  • timeseries_01011200_1
  • timeseries_01011200_2
  • timeseries_01011200_3
  • timeseries_01011200_4
  • timeseries_01011200_5
  • timeseries_01011200_6
  • timeseries_01021200_1

The first six files will be imported because six files are matching the pattern "timeseries_01011200_?". But the last file will not be imported yet because it is the only file matching the pattern "timeseries_01021200_?" .

fileNamePatternFilter

Option to filter files that need to be imported based on their filename. This can be useful if there are files in if there are files in the import folder that should not be imported:

...

The relative period for which data should be imported. This period is relative to the time 0 of the run. When the start and end time are overrulable the user can specify the download length with the cold state time and forecast length in the manual forecast dialog. It is also possible to import data for an absolute period of time using the startDateTime and endDateTime elements.

startDateTime

...

Start date and time of the (absolute) period for which data should be imported. Start is inclusive. This dateTime is in the configured importTimeZone. It is also possible to import data for a relative period of time using the relativeViewPeriod element.

endDateTime

End

startDateTime

Start date and time of the (absolute) period for which data should be imported. Start End is inclusive. This dateTime is in the configured importTimeZone. It is also possible to import data for a relative period of time using the relativeViewPeriod element.

endDateTime

import data for a relative period of time using the relativeViewPeriod element.

onlyGaps 

Since 2022.02. Specifically designed for service imports.

This elements specifies that only for periods with gaps (missing data enclosed within non missing data) in the import time series data will be imported.

First all gaps of the import time series within the period for the import are detected, then the import is run for all periods of the gaps. 

A gap in any time series will result in the (re)import for all time series.

Non equidistant series will not be included for detection of gaps.

Unreliable non-missing values are not counted as gaps.

Missing values at the start and end of a configured period for a series are not counted as gaps.

This element needs to be combined with either a relativeViewPeriod or a startDateTime and endDateTime in the general part of the import configEnd date and time of the (absolute) period for which data should be imported. End is inclusive. This dateTime is in the configured importTimeZone. It is also possible to import data for a relative period of time using the relativeViewPeriod element.

externalForecastTimesSearchRelativePeriod & externalForecastTimesCardinalTimeStep

...

ID of the IdMap used to convert external parameterId's and locationId's to internal parameter and location Id's. Each of the formats specified will have a unique method of identifying the id in the external format. See section on configuration for Mapping Id's units and flags.identifying the id in the external format. See section on configuration for Mapping Id's units and flags.

moduleInstanceAware

Since 2023.01. If value is set to true, data will only be imported if the module instance id specified in the config file matches the module instance id of the downloaded data.

useStandardName (since stable build 2012.02)

...

Convert the geographical coordinate system (horizontal datum and projection) to specified geoDatum during import. Not all parsers support this parameter so please check the documentation for a particular parser to see if it is supported.

missingValue

check the documentation for a particular parser to see if it is supported.

missingValue

Optional specification of missing value identifier in external data format.

traceValue

Value to be replaced by 0 during import, before datum conversion. For example, some NWP products show minute negative values. These can be filtered upon import by setting the traceValue. Example: <traceValue>-0.025</traceValue> would replace all instances of -0.025 by 0Optional specification of missing value identifier in external data format.

importTimeZone

Time zone the external data is provided in if this is not specified in the data format itself. The timezone in the data format will always override the timezone configured using this option. This may be specified as a timeZoneOffset, or as a specific timeZoneName.

...

Enumeration of supported time zones. See appendix B for list of supported time zones.

gridStartPoint

Deprecated. Do not use this option in new configurations. This option should only be used in old versions of Delft-FEWS or for netcdf files that are not compliant with the NetCDF-CF conventions.

supported time zones.

gridStartPoint

Identification of the cell considered as the first cell of the grid.  This option should only be used if the NetCDF file is not CF compliant and contains insufficient metadata with info of the grid, its orientation etc.

may be in the upper left corner or in the lower left corner. Enumeration of options include :

  • NW: for upper left
  • SW : for upper leftSW : for lower leftlower left
  • NE : for  upper right  

  • SE :  for lower right 

gridStartPoint is supported by the import type netcdf-cf_grid, matroos_netcdfmapseries , grib1, grib2 and cemig
Options  NE and SE are supported only by NETCDF-CF_GRID

logErrorsAsWarnings and logErrorsAsWarningsToFileOnly

...

disableDataFeedInfo

By default all data feeds are visible in SystemMonitorDisplay in the importstatus tab.If some data feeds are not wanted, for example because  they are not really relevant,  one can use this  option feeds are visible in SystemMonitorDisplay in the importstatus tab.If some data feeds are not wanted, for example because  they are not really relevant,  one can use this  option 

overwriteAnnotations

Configuring <overwriteAnnotations>true</overwriteAnnotations> will make sure that all existing annotations with the same location - time combination will be overwritten when a new annotation is imported. By default annotations with different content in either the annotation itself or one of the configurable properties will exist next to eachother. 

trimPeriodWhenLastImportedTimeStepAfterPeriod

...

Skips the first n lines of a ASCII file (like CSV). Error is logged when this option is configured for a binary filefor a binary file.

validate

Option to allow validation of the import files against the template, i.e.  xml-schema. If there is no template available, this option wil be ignored.

charset

Since 2017.01 it is possible to explicitly configure the charset for text file imports, like the generalCsv import.

...

  • locationId : Id of the location for which to apply the delay.
  • locationSetId : Id of the location for witch to apply the delay.
  • parameterId : Id for the parameter for which to apply the delay.
  • timeUnit : Specification of time units the delay is defined in.
  • multiplier  : Integer number of time units for the delay.

For example, to specify a delay of 2 hours, enter "hour" as unit and 2 as multiplier.

Note: You cannot use this option for timeseries of type external forecasting because doing so would require that the same delay is also applied to the forecast time.

startTimeShift

Specification of a shift to apply to the start time of a data series to be imported as external forecasting. This is required when the time value of the first data point is not the same as the start time of the forecast. This may be the case in for example external precipitation values, where the first value given is the accumulative precipitation for the first time step. The start time of the forecast is then one time unit earlier than the first data point in the series. Multiple entries may exist.

...

For some data formats an external unit is not defined in the file to be imported. This elements allows the unit to be specified explicitly. This unit is then used in possible unit conversions.to be imported. The element <externUnit> allows the unit to be specified explicitly, which is then used to find the corresponding unit conversions as configured in a UnitConversionsFiles (see 02 Unit Conversions).

Code Block
languagexml
<externUnit parameterId="P.nwp.fcst" unit="mm" cumulativeSum="false"/>

Attributes of <externUnit>:Attributes;

  • parameterId: Id of the parameter for which a unit is specified. This is the internal parameter Id.
  • unit: specification of unit. This unit must be available in the UnitConversions specified in the unitConversionsId element.
  • cumulativeSum:  if this option is set to "true", then it is possible to receive the parameters as cumulative sums. Cumulative sums are partial sums of a given sequence of numbers. For example, if the sequence is:  {a, b, c, d, ...}, then the cumulative sums are: a, a+b, a+b+c, a+b+c+d, .... . The import module will then calculate the values for the individual time steps {a, b, c, d, ...} by subtracting the cumulative sum of the previous cumulative sum value.
  • cumulativeMean: similar to cumulativeSum, if cumulativeMean is set to "true", then it is possible to receive the parameters as cumulative means. Cumulative means are partial means of a given sequence of numbers. Therefore, for a given sequence of numbers s{x1,x2,...,xn,xn+1} cumulative means are calculated as follows: CM (xn+1) = [xn+1 + n * CM (xn)] ⁄ n+1. The import module will then calculate the values for the individual time steps {a, b, c, d, ...} by multiplying the cumulative mean with the amount of time steps already processed and then subtracting of the previous value that has been also multiplied with the amount of timestep processed minus 1.

...

When an annotation is imported with the exact same location-time combination and identical contents of the annotation text (valueColumn) and all properties (propertyColumn) for an already existing annotation, then it is checked whether the start and or end time has changed and if so, they are updated . But when the start and end time are also the same the "new" annotation is considered the same and any potential changes in other columns are ignored and the annotation will not be imported. 

This behaviour can be overruled with the <overwriteAnnotations>true</overwriteAnnotations> which will make sure that all existing annotations with the same location - time combination will be overwritten when a new annotation is imported.

Example: Import of Meteosat images as time-series

...

Code Block
xml
xml
<parameterGroup id="image">
       <parameterType>instantaneous</parameterType>
       <unit>-</unit>
       <valueResolution>8</valueResolution>
       <parameter id="image">
       <shortName>image</shortName>
       </parameter>
</parameterGroup>

...