Versions Compared

Key

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

...

How to import data from an OPeNDAP server

Import configuration

Data can be imported into Delft-FEWS directly from an OPeNDAP server. This can be done using the Import Module. The following import types currently support import using OPeNDAP:

...

To instruct the import to use OPeNDAP instead of importing local files, specify a server URL instead of an import folder. See the following configuration exampleBelow is an example import configuration.

Code Block
xml
xml
<?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_GRID</importType>
			<serverUrl>http://test.opendap.org/opendap/hyrax/data/nc/sst.mnmean.nc.gz</serverUrl>
			<startDateTime date="2007-07-01" time="00:00:00"/>
			<endDateTime date="2008-01-01" time="00:00:00"/>
			<idMapId>OpendapImportIdMap</idMapId>
			<missingValue>32767</missingValue>
		</general>
		<timeSeriesSet>
			<moduleInstanceId>OpendapImport</moduleInstanceId>
			<valueType>grid</valueType>
			<parameterId>T.obs</parameterId>
			<locationId>gridLocation1</locationId>
			<timeSeriesType>external historical</timeSeriesType>
			<timeStep unit="nonequidistant"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</import>
</timeSeriesImportRun>

The serverURL is the URL of a file on an OPeNDAP server. The time series set(s) define what data should be imported into Delft-FEWS. For more details see Import Module configuration options.

The import also needs an id map configuration file, that contains a mapping between the time series sets in the import configuration and the variables in the file(s) to import. Below is an example id map configuration.

Code Block
xml
xml

<?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="T.obs" external="sst"/>
	<location internal="gridLocation1" external="unknown"/>
</idMap>
Note

The external parameter id is case sensitive.

A NetCDF file can contain multiple variables. By default the external parameter id is matched to the names of the variables in the NetCDF file to find the required variable to import. There also is an option to use the standard_name attribute or long_name attribute of the variable in the NetCDF file. To use this option add the variable_identification_method property to the import configuration. This can be done by adding the following lines to the import configuration file, just above the time series sets:

Code Block
xml
xml

<properties>
<string key="variable_identification_method" value="standard_name"/>
</properties>

The value can be "standard_name", "long_name" or "variable_name" (default). If value is e.g. "standard_name", then the external parameter id from the id map configuration file is matched to the standard_name attributes of the variables in the NetCDF file to find the required variable to import. If the variable_identification_method property is not present, then "variable_name" is used by default.

Import data from a single file

...