Exports profile data to file in NETCDF-CF format

Overview

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

Exports data to NetCDF files which comply to the CF 1.4 standard.

To indicate that data values are missing , NetCDF-CF exports use float value 9.96921e+036 by default. It is possible to change it by entering a different missing value (NaN or other) in the configuration files. Use option <exportMissingValue> in TimeSeriesExport module, and <missVal> in GeneralAdapter
More information about the cf standards can be found at: http://cfconventions.org/

There are six types of NetCDF-CF exports which can be defined:

Configuring the export

An example of the NETCDF-CF_PROFILE export will be given here.

In FEWS, it is possible to couple time series with pre-configured properties. From 2021.02 the properties can be exported to the NETCDF file as NETCDF attributes. See a config example bellow. Using the example, the name of the NETCDF attribute will be systemid, the value will be the value of timeSeriesProperty with the name rivieren2, that belongs to the exported time series.


Since 2021.02 it is also possible to import NETCDF attributes into FEWS and save them as timeSeriesProperty. You can see a config example for that here: NETCDF-CF_GRID

<?xml version="1.0" encoding="UTF-8"?>
<timeSeriesExportRun 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/timeSeriesExportRun.xsd">
	<export>
		<general>
			<exportType>NETCDF-CF_PROFILE</exportType>
			<folder>%REGION_HOME%/Export/netcdf/1D</folder>
			<exportFileName>
				<name>.nc</name>
				<prefix>
					<timeZeroFormattingString>yyyyMMddHHmm</timeZeroFormattingString>
				</prefix>
			</exportFileName>
			<idMapId>IdExportNetCDF</idMapId>
			<exportMissingValueString>-9999.0</exportMissingValueString>
		</general>
		<properties>
			<string key="timeseriesproperty:rivieren1" value='netcdfattribute:discharge_forcing_id'/>
			<string key="timeseriesproperty:rivieren2" value='netcdfattribute:systemid '/>
		</properties>   <timeSeriesSet>
			<moduleInstanceId>ExportNetcdf_Profile</moduleInstanceId>
			<valueType>longitudinalprofile</valueType>
			<parameterId>H.fx</parameterId>
			<locationId>Maastakken_NDB(Haringvliet)</locationId>
			<timeSeriesType>simulated historical</timeSeriesType>
			<timeStep unit="day" multiplier="1"/>
			<relativeViewPeriod unit="day" start="-30" end="0"/>
			<readWriteMode>add originals</readWriteMode>
		</timeSeriesSet>
	</export>
</timeSeriesExportRun>

An example of the IdMapping used for the NETCDF-CF_PROFILE export will be given below.
Note that in the IdMapping of the parameters, the external name must match the variable names as used by the netcdf file exactly (case sensitive). The locations that are mapped refer to branch id's which are defined in the Branches.xml.
If the parameter has an entry in the standard name CF table, you can enter it in the externalQualifier1 attribute of the parameter. The value of this qualifier will be added as the standard_name attribute for this variable in the netcdf exported 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="H.fx" external="waterlevel" externalQualifier1="waterlevel (not a standard name, but for example)"/>

	<location internal="Maastakken_NDB(Haringvliet)" external="Maastakken_NDB(Haringvliet)"/>

</idMap>

An example of the branches file is shown below.

<?xml version="1.0" encoding="UTF-8"?>
<branches 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/branches.xsd" version="1.1">
	<geoDatum>Rijks Driehoekstelsel</geoDatum>
	<branch id="Maastakken_NDB(Haringvliet)">
		<branchName>Maastakken_NDB(Haringvliet)</branchName>
		<startChainage>1030</startChainage>
		<endChainage>321624</endChainage>
		<pt chainage="1030" label="R_MS_001_1" x="176029.1129" y="308594.236" z="40.32" z_rb="51.34"/>
		<pt chainage="2061" label="R_MS_001_2" x="176631.808" y="309427.7428" z="41.79" z_rb="50.92"/>
		...
		<pt chainage="321624" label="N_NDB_92" x="57935.1" y="436953" z="-7.82" z_rb="2.79"/>
	</branch>
</branches>