Overview

This import is available since Delft-FEWS version 2016.02 and later.

This import type can also be used to import data using OPeNDAP, see Import data using OPeNDAP.

Parser for importing track data from a NetCDF file. This can be used for importing data that is valid according to the CF-1.6 conventions with featureType "trajectory" or "point". More information about the CF conventions can be found at http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html.

For featureType "point" all points in the file are imported together to form a single track. An example input NetCDF structure for this can be found in the CF conventions document Appendix H section H.1. Point Data.

For featureType "trajectory" this parser supports two different input formats, the simplest format provides only a single track per file, i.e. variables in the NetCDF file must be one dimensional and only have a time dimension. For an example of the format that can be imported with this import type, see the CF conventions document Appendix H, section H.4.2. Single trajectory.

In Delft FEWS version 2020.02 an additional format has been implemented, as described in the CF conventions document Appendix H, section H.4.1. Multidimensional array representation of trajectories. This format supports multiple trajectories in one file, especially suited for datasets where all trajectories have the same time dimension and are available for the same period. 

Track x,y coordinates are imported as normal timeseries, i.e. they do not get any special treatment in this parser and are handled like other data variables. In fact this parser does not know about tracks at all. Tracks are constructed in other places in Delft-FEWS (e.g. trackLayer in GridDisplay) where it is possible to combine a data timeseries with two timeseries with x and y coordinates in the configuration to create a track.

For details about other formats of NetCDF files that can be imported in Delft-FEWS, see NetCDF formats that can be imported in Delft-FEWS.

Consequences for coordinates

The values of coordinate timeseries are imported as normal timeseries. Therefore for the coordinate timeseries there must be timeSeriesSets configured in the import run and parameters configured in the id map. Furthermore the imported coordinates are rounded to floats. For global lat,lon coordinates in degrees this corresponds to a spatial accuracy of about 4 meters.

Supported properties

  • connection_retry_count (only used for importing data from an OPeNDAP server)
  • connection_retry_interval_in_milliseconds (only used for importing data from an OPeNDAP server)

Configuring the import

Note that in the idMapping, the external parameter Ids must match the variable names used in the NetCDF file exactly (case sensitive). The external location Ids are used by this import only in case the format providing multiple trajectories per file is used (Delft FEWS 2020.02 and later).

Example import id map config file:

<?xml version="1.0" encoding="UTF-8"?>
<idMap 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" version="1.1">
    <parameter internal="latitude" external="lat"/>
    <parameter internal="longitude" external="lon"/>
    <parameter internal="H.m" external="ssha"/>
    <!-- dummy locationId (not used when importing a single track format) -->
    <location internal="H-2001" external="dummy"/>
</idMap>

Example time series import run config file:

From 2021.01 it is possible to import NETCDF attributes as timeSeriesProperties into FEWS. This can be configured in the properties (see example below). Using the example config, the value of the NETCDF attribute ‘systemid’ will be imported as a timeSeriesProperty ‘rivieren2’.

Since 2021.02 it is also possible to export timeSeriesProperties as NETCDF attributes. You can find a config example here:  https://publicwiki.deltares.nl/display/FEWSDOC/NETCDF-CF_GRID+Export

<?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>NETCDF-CF_TRAJECTORY</importType>
            <folder>../junit_test_output/nl/wldelft/fews/system/plugin/dataImport/TimeSeriesImportTestData/import/netcdf_track</folder>
            <idMapId>netcdf_track</idMapId>
        </general>
		<properties>
			<string key="netcdfattribute:taskrunid" value='timeseriesproperty:rivieren1'/>
			<string key="netcdfattribute:systemid" value='timeseriesproperty:rivieren2'/>
		</properties>
	    <timeSeriesSet>
            <moduleInstanceId>NetcdfTrackImportTest</moduleInstanceId>
            <valueType>scalar</valueType>
            <parameterId>latitude</parameterId>
            <locationId>H-2001</locationId>
            <timeSeriesType>external historical</timeSeriesType>
            <timeStep unit="nonequidistant"/>
            <readWriteMode>add originals</readWriteMode>
        </timeSeriesSet>
        <timeSeriesSet>
            <moduleInstanceId>NetcdfTrackImportTest</moduleInstanceId>
            <valueType>scalar</valueType>
            <parameterId>longitude</parameterId>
            <locationId>H-2001</locationId>
            <timeSeriesType>external historical</timeSeriesType>
            <timeStep unit="nonequidistant"/>
            <readWriteMode>add originals</readWriteMode>
        </timeSeriesSet>
        <timeSeriesSet>
            <moduleInstanceId>NetcdfTrackImportTest</moduleInstanceId>
            <valueType>scalar</valueType>
            <parameterId>H.m</parameterId>
            <locationId>H-2001</locationId>
            <timeSeriesType>external historical</timeSeriesType>
            <timeStep unit="nonequidistant"/>
            <readWriteMode>add originals</readWriteMode>
        </timeSeriesSet>
    </import>
</timeSeriesImportRun>
  • No labels