Home| general |src.bin|dmap| dmaptoncdf Index

dmaptoncdf

Syntax
dmaptoncdf --help
dmaptoncdf [-vb] datamap map netcdf
Synopsis

Converts a DataMap file to a Network Common Data Format (netCDF) file.

Options
--helpprint the help message and exit.
--versionprint the RST version number and exit.
-vbverbose. Log information to the console.
datamapfilename of the DataMap file to convert.
mapmap file that relates variables in the DataMap file to those in the netCDF file.
netcdffilename of the netCDF file to generate.
Description

Converts a DataMap file to a Network Common Data Format (netCDF) file.

The netCDF format has no concept of a "record". A netCDF dataset is just a collection of arrays of fixed length, named, dimensions. One dimension can be defined as "unlimited". The unlimited dimension does not have a fixed length and it's index can effectively be thought of as the record number.

In translating DataMap files, each record in the file is mapped to an index of the unlimited dimension;scalars become 1 dimensional arrays, and arrays gain one extra dimension.

NetCDF has a simple text based scripting language called CDL (Common Data form Language) that can be used to describe the layout of a dataset. The utility ncgen can convert a CDL file to an empty dataset ready to store data.

The tool dmaptocdl first analyses a dmap file to determine the size of the arrays required and produces an outline CDL file. The user can edit this CDL file to correct any problems and add any meta-data (attributes), before creating an empty CDF file using ncgen. The user then populates the dataset by using dmaptoncdf.

Examples
dmaptoncdf 20021219.kap.fitacf fitacf.cdfmap 20021219.kap.netcdf

Populate the empty netCDF dataset "20021219.kap.netcdf" with data from the file "20021219.kap.fitacf" using the mapping table "fitacf.cdfmap".