wiki:T02_CSML/Csmlscan

Version 2 (modified by domlowe, 12 years ago) (diff)

more on scanning

How to use the CSML Scanner

The CSML scanner will scan a collection of files (or just a single file) to create a CSML Dataset which contains a collection of CSML Features.

The scanner currently works with GridSeriesFeatures, e.g. model output, with support for other feature types being under development.

To install the scanner follow the instructions for installing CSML which start at section 6 here: InstallDiscoveryBrowse

When CSML is installed you should have a script called csmlscan, which will be somewhere like /usr/local/bin/csmlscan.

At the command line type:

csmlscan

You should get an exception:

No featuretype declared in config file (or no config file)

This shows csmlscan is working, so now we need to create a config file to tell it what to scan. We will then run csmlscan with the -c option to read this config file:

csmlscan -c yourconfigfile.cfg

And this is what a config file looks like...

Example contents of config file

[dataset]
dsID:UBXyeKx6

[features]
type: GridSeries
number: many

[files]
root: /badc/coapec/data/HadCM3_beowulf/64-bit/wholerun/annual/ocean/
mapping: onetomany
output: /home/dom/coapec/COAPEC_500YrRun_wholerun_annual_ocean.xml
printscreen:1

[spatialaxes]
spatialstorage:fileextract

[values]
valuestorage:fileextract

[time]
timedimension: t
timestorage:inline

Now to look at the sections of this file in more detail:

[dataset] section:

dsID: The Dataset id you want to see in your final csml document. This will be the unique id that is used to reference the document locally. In NDG the dataset id forms the end part of the NDG URI: badc.nerc.ac.uk__NDG-A0__UBXyeKx6 This id should be unique within your domain, and can be opaque or otherwise. If you don't provide an id the scanner will create a random id for you.

[features] section:

[files] section:

[spatialaxes] section:

[values] section:

[time] section: