Versions Compared

Key

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

...

Excerpt
hiddentrue

Imports timeseries data from NetCDF-CF file formatsfiles

Overview

Info

This import is available in DELFT-FEWS versions after 28-10-2009 (FEWS version 2009.02)


Info

In DELFT-FEWS versions 2011.02 and later this import type can also be used to import data using OPeNDAP, see Import data using OPeNDAP.

Imports scalar time series data from NetCDF files which comply to the CF standard. More information about the cf standards can be found at http://cfconventions.org/cf-conventions/v1.6.0/cf-conventions.html.

For an example of the format that can be imported with this import type, see http://cfconventions.org/cf-conventions/cf-conventions.html#_orthogonal_multidimensional_array_representation_of_time_series

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

...

...

Configuring the import

An example of the NETCDF-CF_TIMESERIES import will be given here.

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 herehttps://publicwiki.deltares.nl/display/FEWSDOC/NETCDF-CF_GRID+Export

Code Block
borderStylesolid
titleImportNetcdf_Timeseries 1.00 default.xml
borderStylesolid
<?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_TIMESERIES</importType>
			<folder>$IMPORT_FOLDER$/NETCDF</folder>
			<failedFolder>$IMPORT_FAILED_FOLDER$</failedFolder>
			<backupFolder>$IMPORT_BACKUP_FOLDER$</backupFolder>
			<idMapId>IdImportNetCDF</idMapId>
		</general>
		<properties>
			<string key="netcdfattribute:taskrunid" value='timeseriesproperty:rivieren1'/>
			<string key="netcdfattribute:systemid" value='timeseriesproperty:rivieren2'/>
		</properties>
  		<timeSeriesSet>
			<moduleInstanceId>ImportNetcdf_Timeseries</moduleInstanceId>
			<valueType>scalar</valueType>
			<parameterId>Q.udm</parameterId>
			<locationSetId>DMFlowPoints</locationSetId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

...

Note that in the IdMapping of the parameters and locations, the external name must match the variable and location names as used by the netcdf file exactly (case sensitive).

Code Block
borderStylesolid
titleIdImportNetCDF 1.00 default.xml
borderStylesolid
<?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">
	<parameter internal="Q.udm" external="afvoerdm_takken"/>
	<!--DMFlowPoints-->
	<location internal="DMTak_1001" external="1001"/>
	<location internal="DMTak_1002" external="1002"/>
	<location internal="DMTak_1003" external="1003"/>
	<location internal="DMTak_1004" external="1004"/>
	<location internal="DMTak_1006" external="1006"/>
	...
	<location internal="DMTak_6113" external="6113"/>
	<location internal="DMTak_6114" external="6114"/>
	<location internal="DMTak_6115" external="6115"/>
</idMap>


Since 2020.02  NETCDF-CF_TIMESERIES is able to import from the NC file that contains more than one location list.

For example, NC file contains water level and discharge and these two  parameters are defined on different locations. NC file contains then two location lists.

Please note :  to be able to read the NC with multiple location(station) lists, the location(station)  variable must have the attribute :cf_role = "timeseries_id";