You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Singapore OMS Lake Diagnostic System file format

Basically files in the Singapore OMS Lake Diagnostic System file format are text files.

Implementation details

First, the location is determined from the first to filename. The import will scan the input for the following lines.

  • SCHEDULE A
  • SCHEDULE B
  • Data Section

The parameters are collected from lines containing a slash '/', where the actual parameterId is taken from the left part before the slash. The parameters for SCHEDULE A are retrieved from the lines between SCHEDULE A and SCHEDULE B. The parameters for SCHEDULE B are retrieved from the lines between SCHEDULE B and Data Section. The actual data with measurements is retrieved from the lines after the Data Section tag. Each line with data that starts with 'A' or 'B' will contain also a number of space delimited values. The first value is the Julian day since 1-Jan-2000. The second value is the number of seconds in that day. The timestamp that is derived from this is supposed to be in same timezone as specified in the importTimeZone value of the import configuration. The other values are measurement data, for each parameter in the corresponding schedule. The import will determine the timestep from the difference in time between the first two data rows. The other rows must follow the same timestep.

Sample configuration file for importing Singapore OMS Lake Diagnostic System files

<?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>SingaporeLDS</importType>
			<folder>$IMPORT_FOLDER$/Lds</folder>
			<failedFolder>$IMPORT_FAILED_FOLDER$/Lds</failedFolder>
			<backupFolder>$IMPORT_BACKUP_FOLDER$/Lds</backupFolder>
			<idMapId>IdImportLds</idMapId>
			<importTimeZone>
				<timeZoneOffset>+08:00</timeZoneOffset>
			</importTimeZone>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>ImportLds</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>T.obs.water</parameterId>
			<locationSetId>LDS_NTU-CWR</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="minute" multiplier="15"/>
			<readWriteMode>add originals</readWriteMode>
			<synchLevel>1</synchLevel>
			<expiryTime unit="day" multiplier="10"/>
		</timeSeriesSet>
	</import>
	
</timeSeriesImportRun>

Sample idMapping

When working with parameters with different depths the identifiers sometimes have to be mapped.
For instance suppose the parameterId in the input file was TCHN 1 and the location derived from the filename was t4, this case can easily be mapped to a internal identifiers
MCH1 and T.obs.water using the following id mapping.

<?xml version="1.0" encoding="UTF-8"?>
<idMap version="1.1" 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/idMap.xsd">
	<map internalLocation="MCH1" internalParameter="T.obs.water" externalParameter="TCHN 1" externalLocation="t4"/>
...
</idMap>
  • No labels