MI - Fimex
ncml Configuration

ncml Configuration

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2 ncml-2.2.xsd ">


<!-- rename a dimension, make sure to rename the variable-dimension, too -->
<dimension name="x_c" orgName="x" />

<!-- add/reassign a new variable attribute -->
<variable name="air_temperature">
   <attribute name="standard_name" value="temperature" type="string" />
</variable>

<!-- change the type of a variable, repack -->
<variable name="precipitation_amount" type="short">
   <attribute name="_FillValue" value="-32767" type="short" />
   <attribute name="scale_factor" value="0.001" type="float" />
   <attribute name="add_offset" value="0" type="double" />
</variable>

<!-- rename a variable -->
<variable orgName="sea_level_pressure" name="sea_pressure" />
<variable orgName="x" name="x_c" />

<variable name="surface_snow_thickness">
   <!--remove a variable-attribute -->
   <remove name="long_name" type="attribute"/>
</variable>



<!-- add/reassign a new global attribute -->
<attribute name="max_time" value="2008-05-28" type="string" />
<!-- rename a attribute -->
<!-- <attribute orgName="min_time" name="minimum_time" /> -->



<!-- remove a global attribute -->
<remove name="comment" type="attribute" />
<!-- remove a variable -->
<remove name="land_ice_area_fraction" type="variable" />


<!-- not supported -->
<group name="x" orgName="y"/>
</netcdf>

Unidata's NetCDF Markup Language (NcML) as described in http://www.unidata.ucar.edu/software/netcdf/ncml/ gives the opportunity to change all information written in the CDM. With the –ncml.config option, the CDM will be configured immediately after reading a file. It is also possilbe to read in a ncml file with the –input.file=xxx.ncml option. In this case, the real data must be linked with the 'location' markup. As an extension to the Unidata ncml-location field, fimex allows to add a type and config field to location, e.g.

<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
location="test.flt felt felt2netcdfconfig.xml"
</netcdf>

Input-files can and should be validated against the included ncml-2.2.xsd.

Fimex supports now also ncml-aggregation. Simple examples are:

<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- same as above, but with scan -->
<aggregation type="joinExisting">
<scan location=". felt felt2nc.xml" regExp="joinExistingAgg\d+\.flt" />
</aggregation>
</netcdf>
<?xml version="1.0" encoding="UTF-8"?>
<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<aggregation type="union">
<netcdf location="joinExistingAgg1.nc" />
<netcdf location="unionAgg2.nc3" />
</aggregation>
</netcdf>

MetNoFimex::NcmlCDMReader contains the up-to-date list of features.

See also
MetNoFimex::NcmlCDMReader