The SHEF export  exports  scalar time series to SHEF file format (Standard Hydrometeorological Exchange Format) . Only the format type .E is supported in FEWS versions earlier than 2018.02.

In FEWS 2019.02 additional export options for SHEF format .B and .A records have been added.

The SHEF coding manual is provided by the US National Weather Service online and can be downloaded from the SHEF Information page.

Example configuration

An example of the SHEF export configuration file:

<timeSeriesExportRun xmlns="http://www.wldelft.nl/fews" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
					 xsi:schemaLocation="http://www.wldelft.nl/fews http://chps1/schemas/timeSeriesExportRun.xsd">
	<export>
		<general>
			<exportType>SHEF</exportType>
			<folder>$EXPORT_FOLDER_RVF$</folder>
			<exportFileName>
				<name>_mis_chps_shef_export.</name>
				<prefix>
					<timeZeroFormattingString>yyyyMMddHH</timeZeroFormattingString>
				</prefix>
				<suffix>
					<currentTimeFormattingString>yyyyMMddHHmmss</currentTimeFormattingString>
				</suffix>
			</exportFileName>
			<idMapId>IdExportSHEF_RVF</idMapId>
			<unitConversionsId>ExportSHEF</unitConversionsId>
			<exportMissingValue>-999</exportMissingValue>
			<omitMissingValues>false</omitMissingValues>
		</general>
		<properties>
   			<string key="format" value="E"/>
		</properties>
		<timeSeriesSet>
			<moduleInstanceId>H2Q_DRCM7_DRCM7_DRCM7_Forecast</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>STG</parameterId>
			<locationId>DRCM7</locationId>
			<timeSeriesType>simulated forecasting</timeSeriesType>
			<timeStep unit="hour" multiplier="6"/>
			<relativeViewPeriod unit="day" start="-5" startOverrulable="false" end="0" endOverrulable="false"/>
			<readWriteMode>read only</readWriteMode>
		</timeSeriesSet>
		<timeSeriesSet>
			<moduleInstanceId>STAGEQ_DRCM7_SSTG_Forecast</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>SSTG</parameterId>
			<locationId>DRCM7</locationId>    
			<timeSeriesType>simulated forecasting</timeSeriesType>
			<timeStep unit="hour" multiplier="6"/>
			<relativeViewPeriod unit="day" start="-1" startOverrulable="false" end="14" endOverrulable="false"/>
			<readWriteMode>read only</readWriteMode>
		</timeSeriesSet>
	</export>
</timeSeriesExportRun>

Notes

New in FEWS 2019.02 is the format property as shown in the example above, which can be added to select the export format. The default format is E to provide backward compatibility with existing configurations that do not include the <properties> element. Additional format supported by FEWS 2019.02 are A and B.

Only for the B format SHEF files, an additional property named "source" can be set to define the "message source" as described in the SHEF coding manual, (defaul value is "FEWS")

The SHEF serializer does not automatically support all the features that are described in the SHEF coding manual, and the following features will need to be configured manually:

  • ID mapping to map the FEWS parameter id's to the correct SHEF parameter codes, locations etc. (see the SHEF coding manual)
  • unit conversions, especially when the exported SHEF file needs to contain imperial units instead of the SI units used by FEWS internally.
  • Time zone conversion.


 Java source code

ShefTimeSeriesSerializer.java

  • No labels