The SHEF import imports scalar time series from SHEF file format. Formats .A (including continuations) and .E are supported in FEWS versions earlier than 2018.02.
In FEWS 2018.2 the SHEF import for .B (including continuations and revisions) has also been implemented and tested for example files provided by NWS.
The SHEF coding manual is provided by the US National Weather Service online and can be downloaded from the SHEF Information page.
Creation date as external forecast time
From the version 2024.02, it is possible to set the external forecast time from the creation date (DC). The following property should be added to the configuration:
<properties> <bool key="readDCField" value="true"/> </properties>
The external forecast time will then be read from the DC element. All valid format of DC element are supported. More information can be found about the DC element in the SHEF Information page.
For example:
.ER LBYT2 1213 Z DC202312131341/DH18/HGIFF/DIH6 will set the external forecast time to 13/12/2023 at 13:41:00.
The DC element can even be placed after the values it applies for. This format is not recommended, as it is not valid according to the SHEF documentation.
Example configuration
An example of the SHEF import configuration file:
<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesImportRun xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/timeSeriesImportRun.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews">
   <import>
      <general>
         <importType>SHEF</importType>
         <folder>$IMPORT_FOLDER$/RiverForecasts/LMRFC</folder>
         <fileNamePatternFilter>NEWRR5ORN*</fileNamePatternFilter>
         <failedFolder>$FAILED_FOLDER$/RiverForecasts/LMRFC</failedFolder>
         <backupFolder>$BACKUP_FOLDER$/RiverForecasts/LMRFC</backupFolder>
         <deleteImportedFiles>false</deleteImportedFiles>
         <idMapId>IdImportLMRFCObserved</idMapId>
         <unitConversionsId>ImportEnglishUnits</unitConversionsId>
         <missingValue>-999</missingValue>
         <importTimeZone>
            <timeZoneName>GMT</timeZoneName>
         </importTimeZone>
         <dataFeedId>LMRFC_Paducah_Cairo_LocalFlow</dataFeedId>
      </general>
      <timeSeriesSet>
         <moduleInstanceId>ImportLMRFCObserved</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>QR</parameterId>
         <qualifierId>Loc</qualifierId>
         <qualifierId>Sim</qualifierId>
         <locationId>PAHK2</locationId>
         <locationId>CIRI2</locationId>
         <timeSeriesType>simulated historical</timeSeriesType>
         <timeStep multiplier="6" unit="hour"/>
         <readWriteMode>add originals</readWriteMode>
      </timeSeriesSet>
      <externUnit unit="KCFS" parameterId="QR"/>
   </import>
</timeSeriesImportRun>
Notes
The SHEF parser 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 SHEF parameter codes to the correct FEWS parameter id's, location Id's etc. (see the SHEF coding manual)
 - unit conversions, especially when the imported SHEF file contains imperial units instead of the SI units used by FEWS internally.
 - Time zone conversion.
 
Date creation as forecast Time