MI - Fimex
wdb Reader Configuration

wdb Reader Configuration

Fimex is able to read data from instances of the WDB (http://wdb.sourceforge.net) by using the WdbCDMReader (or on the command line: input.type=wdb). The usual 'file'-location is in that case reinterpreted as wdb-connetction string, e.g. 'dbname=proffdb-devel.met.no;port=5432;dbName=wdb;dbUser=proffread;wciUser=proffwrite' would connect to the host proffdb-devel on port 5432 and the databse wdb with the user proffread. Additonal options: The following keywords are recognized:

Example:

fimex --input.type=wdb --input.file='host=proffdb-devel.met.no;port=5432;dbname=wdb;user=proffread;referencetime=latest' --output.file=test.nc4

For convenience, the input.file options can also be stored in a wdb-datasource-file (.wdbml) like proffdb-devel.wdbml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wdb_query>
<wdb_query
xmlns:xi="http://www.w3.org/2001/XInclude"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="etc/wdb_query.xsd">
<connection>
<database>wdb</database>
<host>proffdb-devel.met.no</host>
<port>5432</port>
<user>proffread</user>
</connection>
<wci>
<!-- Implicit from connection.user
<begin>
<user>wdb</user>
</begin>
-->
<read>
<dataprovider>proff.h12h8ppvum4</dataprovider>
<referencetime>latest</referencetime>
<!-- <valueparameter>air temperature</valueparameter> -->
<!-- In most cases, dataversion should be set to -1, in case it has been used to mark "corrected" data -->
<dataversion>-1</dataversion>
</read>
</wci>
</wdb_query>

Additional options controlling the translation of wdb-parameters to Fimex/CDM can be set with a wdb_config.xml file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE wdb_fimex_config>

<wdb_netcdf_config 
	xmlns:xi="http://www.w3.org/2001/XInclude"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="wdb_config.xsd">

<global_attributes>
    <attribute name="Conventions" value="CF-1.0" />
    <attribute name="institution" value="Norwegian Meteorological Institute" />
    <attribute name="topiccategory" value="ClimatologyMeteorologyAtmosphere" />
    <attribute name="distribution_statement" value="Free" />
</global_attributes>

<units>
	<translation wdbname="ratio" cfname="1"/>
	<translation wdbname="%" cfname="%"/>
	<translation wdbname="kg/m2" cfname="kg m-2"/>
	<translation wdbname="m" cfname="m"/>
	<translation wdbname="m2/s2" cfname="m-2 s-2"/>
	<translation wdbname="m/s" cfname="m s-1"/>
	<translation wdbname="Pa" cfname="Pa"/>
	<translation wdbname="s" cfname="s"/>
	<translation wdbname="W/m2" cfname="W m-2"/>
</units>

<wdb_parameters>

	<level_parameter wdbname="height above ground">
	    <attribute name="standard_name" value="height" />
	</level_parameter>
	
	<level_parameter wdbname="height above ground distance">
	    <attribute name="standard_name" value="height" />
	</level_parameter>
	
	
	<value_parameter wdbname="geopotential height specific energy">
	    <attribute name="standard_name" value="geopotential_height" />
	</value_parameter>
	

	<value_parameter wdbname="mean sea level pressure">
	    <attribute name="standard_name" value="air_pressure_at_sea_level" />
	</value_parameter>
			
	<value_parameter wdbname="sea temperature">
	    <attribute name="standard_name" value="sea_water_temperature" />
	</value_parameter>
	
	<value_parameter wdbname="significant combined wind waves and swell height distance">
	    <attribute name="standard_name" value="sea_surface_swell_wave_significant_height" />
	</value_parameter>
	
	<value_parameter wdbname="sunshine duration">
	    <attribute name="standard_name" value="duration_of_sunshine" />
	</value_parameter>
	
	<value_parameter wdbname="total cloud cover">
	    <attribute name="standard_name" value="cloud_area_fraction" />
	</value_parameter>
	
	<value_parameter wdbname="total precipitation distance">
	    <attribute name="standard_name" value="lwe_thickness_of_precipitation_amount" />
	</value_parameter>
	
	<value_parameter wdbname="visibility distance">
	    <attribute name="standard_name" value="visibility_in_air" />
	</value_parameter>
	
	<value_parameter wdbname="wind velocity (u vector)">
	    <attribute name="standard_name" value="x_wind" />
	</value_parameter>
	
	<value_parameter wdbname="wind velocity (v vector)">
	    <attribute name="standard_name" value="y_wind" />
	</value_parameter>
	
	<value_parameter wdbname="x wind">
	    <attribute name="standard_name" value="x_wind" />
	</value_parameter>
	
	<value_parameter wdbname="y wind">
	    <attribute name="standard_name" value="y_wind" />
	</value_parameter>


	<!-- 
	<value_parameter wdbname="local 20th percentile accumulated precipitation surface density">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->
	
	<!-- 
	<value_parameter wdbname="local 50th percentile accumulated precipitation surface density">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->
	
	<!-- 
	<value_parameter wdbname="local 80th percentile accumulated precipitation surface density">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->

	<!-- 
	<value_parameter wdbname="probability of precipitation">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->
	
	<!-- 
	<value_parameter wdbname="low cloud cover">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->
	
	<!-- 
	<value_parameter wdbname="medium cloud cover">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->

	<!-- 
	<value_parameter wdbname="high cloud cover">
	    <attribute name="units" value= />
	    <attribute name="standard_name" value= />
	</value_parameter>
	 -->

</wdb_parameters>
</wdb_netcdf_config>
See also
MetNoFimex::WdbCDMReader