Versions Compared

Key

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

...

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 as external parameter id. 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. For example:

Code Block
xml
xml

<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>
	<properties>
		<string key="variable_identification_method" value="standardlong_name"/>
	</properties>
	<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>

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. The variable_identification_method property currently only works for import types "NETCDF-CF_GRID", "NETCDF-CF_TIMESERIES" and "NETCDF-CF_PROFILE".

...

For a THREDDS opendap server:

First browse to a folder on the server. Then copy the current URL from the address line and replace "catalog.html" at the end of the url by "catalog.xml".

For a HYRAX opendap server:

First browse to a folder on the server. Then click on the link "THREDDS Catalog XML" on the bottom of the page. Then copy the current URL from the address line.

Example: For example to import data from the folder TODO use the following line in the import configuration:

Code Block
xml
xml

<import>
	<general>
		<importType>NETCDF-CF_GRID</importType>
		<serverUrl>TODO</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>

Import data for a given period of time

...

Note

This currently only works for importing a single netcdf file, this does not work when using a catalog.

Example of an import configuration with user and password elements:

Code Block
xml
xml

<import>
	<general>
		<importType>NETCDF-CF_GRID</importType>
		<serverUrl>http://test.opendap.org/opendap/hyrax/data/nc/sst.mnmean.nc.gz</serverUrl>
		<user>kermit</user>
		<password>gr33n</password>
		<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>

Known issues

Export of data

...