National Oceanic and Atmospheric Administration
NOAA DChart/Dapper Administration
 

Server Configuration

Dapper comes with contains two configurable servlets: one provides provides OPeNDAP access to data (referred to as the Dapper servlet), while the other (known as the DChart servlet) provides an AJAX user interface to the OPeNDAP servlet.

Starting or stopping Dapper

Dapper is started with the dapper.sh command followed by the start argument:

    ./dapper.sh start

You must run this command from the Dapper distribution directory.

Debug information from the Tomcat container is available in logs/tomcat.log. Log info from Dapper is sent to logs/dapper.log while log info from DChart is sent to logs/dchart.log.

If you want to run Dapper in a terminal window and have all debug information sent to the terminal, you can use:

    ./dapper.sh run

Dapper is stopped with the stop argument:

    ./dapper.sh stop

Configuring the Dapper servlet

Dapper is configured with the etc/dapper.properties file. A sample configuration file is available in etc/dapper.properties.sample. Following are the configurable properties:

Property Type Required Description
dapper.cdp_databases string no Comma separated list of databases for the CDP to use
dapper.max_profiles string no Maximum number of profiles to serve in one data request. Default is 1000
dapper.netcdf_directory string no A directory that contains netCDF files to be served by the netCDF service. This directory can contain other directories and Dapper will also server netCDF files from those directories. The default value is empty (no netCDF directories).
dapper.user string yes Database user name
dapper.password string yes Database user password
dapper.dbhost string no Host name of MySQL server (default localhost)
dapper.dbport int no Port number of MySQL server (default 3306)
dapper.timeout int no Maximum time in seconds to devote to one request (default 60)
dapper.disable_proxy boolean no Disable proxying (and conversion) of remote netCDF datasets to OPeNDAP (default false)
dapper.aggconfig string no Configuration file for aggregating data. (default etc/aggs.xml)

Configuring Dapper aggregations

Dapper allows you to aggregate multiple netCDF files into a single logical netCDF file. This is configured through an aggregation configuration file that is located (by default) in etc/aggs.xml.

Dapper supports two kinds of aggregations:

  • Variable aggregations combine the variables from multiple netCDF files into one logical netCDF file
  • Outer aggregations concatenate the outer dimension of variables with the same name in multiple files into a logical variable where the outer dimension has a size equal to the sum of the sizes of the outer dimension in the original netCDF files.

Outer aggregations can be nested in variable aggregations. Dapper can aggregate netCDF files that are available as local files as well as by HTTP or OPeNDAP.

Here's a sample aggregation configuration file (available in etc/aggs.xml.sample) that aggregates several netCDF files containing NCAR/NCEP reanalysis data:

 <scichart>
     <aggregation cacheTime="86400" id="www.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/pressure" type="variable">
         <aggregation type="outer" dim="time">
             <dataset url="http://www.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/pressure/air.2006.nc"/>
             <dataset url="http://www.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/pressure/air.2007.nc"/>
         </aggregation>
         <aggregation type="outer" dim="time">
             <dataset url="http://www.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/pressure/hgt.2006.nc"/>
             <dataset url="http://www.cdc.noaa.gov/Datasets/ncep.reanalysis.dailyavgs/pressure/hgt.2007.nc"/>
         </aggregation>
     </aggregation>
 < /scichart> 

If you copy this file to etc/aggs.xml and restart the server and point your browser to:

http://localhost:8080/dods/aggregations/www.cdc.noaa.gov/Datasets/ncep.r...

you will see that these four URls have been consolidated into a single logical OPeNDAP url.

Dapper aggregation file schema

Scichart element

The scichart element is the root element of the Dapper aggregation file.

Tag Children Children Description
<scichart> aggregation+
yes
Root element of document
Aggregation element
Tag Children Children Description
<aggregation> dataset+ |
aggregation
yes
Defines an aggregation. Only variable aggregations are allowed to have a nested aggregation.
Attribute Type Required Description
id string yes unique id for this aggregation. The OPeNDAP URL for the aggregation will be at "/dods/aggregations/<id>.nc"
cacheTime integer no Time (in seconds) to cache metadata associated with this aggregation. Default is 3600 (1 hour)
type "variable"|"outer" yes Aggregation method
dim string yes (for outer aggregations) Name of the dimension to use to concatenate datasets. Only applies to outer aggregations.
Dataset element

Dataset to include in an aggregation

Tag Children Required? Description
<dataset>



 
Attribute Type Required Description
url string yes url of the dataset.Aggregations can include file:, http:, or dods: url schemes.

Configuring the DChart servlet

DChart is configured with the dchart/etc/config.xml XML file. If the file is missing the servlet will be disabled.

A sample configuration file ( available in dchart/etc/config.xml.sample) is below:

<scichart>
<title>
<![CDATA[
<h1>My Dapper Server</h1>
<h2>Change me in config.xml</h2>
]]>
</title>
<property name="opendap.cache.expires" value="3600"/> <!-- Max cache age in second -->
<property name="opendap.cache.capacity" value="100000" /> <!-- Max number of items in cache -->
<datasets>
<dataset category="Gridded example" name="NCAR Reanalysis" url="file://test/data/agg/air.2006.0.2.nc" type="grid" >
<description>
Gridded data example
</description>
</dataset>
<dataset category="In-situ example" url="http://localhost:8080/dods/dapperexample/argo_sample.cdp" name="Argo Pacific profiles">
<variables>
<include name="PSAL" mapto="Salinity"/>
<include name="TEMP" mapto="Temperature"/>
</variables>
<description>
In-situ data example
</description>
</dataset>
</datasets>
</scichart>

Many more examples are available in the dchart/etc directory, including the configuration file used at PMEL (dchart/etc/config.xml.pmel).

DChart configuration file schema

Scichart element

The scichart element is the root element of the DChart configuration file.

Tag Children Children Description
<scichart> property+ |
datasets |
title
yes
Root element of document
Title element
Tag Children Required? Description
<title>
no
Title to display on DChart web page

 

Property element

The property element defines name value pairs to pass to the DChart servlet.

Two properties are currently defined:

  • opendap.cache.expires specifies how long (in seconds) DChart should cache data from an Opendap server.
  • opendap.cache.capacity specifies the maximum number of Opendap requests to store in the DChart Opendap cache.
Tag Children Required? Description
<property>   no
Name/value pair
Attribute Type Required Description
name string yes Property name
value string yes Property value
Datasets element

Contains all of the <dataset> elements and defines the base URL of the Opendap data server.

Tag Children Required? Description
<datasets> dataset+ yes
Container for dataset element
Attribute Type Required Description
default_category string no Default category to use for datasets
base string yes Base URL of Opendap server
Dataset element

Use the dataset element to include datasets from the base URL specified by the <datasets> element.

Tag Children Required? Description
<dataset>

variables | description | ranges | attributes

yes
Include a dataset in DChart
Attribute Type Required Description
default true|false no If true, this dataset will be selected when DChart is initialized in the client browser.
url string yes url of the dataset. DChart supports file:, http:, or dods: schemes for the url.
category string no Category in which to place dataset
type "time"|"profile"|"grid" no Indicates whether the dataset is a time series, profile or gridded. If missing, DChart will assume that the dataset is a profile unless the dataset has the string "_time_" in the URL which implies a time series
name string yes Label DChart uses to display this dataset
Description element

The description element is used to configure a link from a dataset to a description of the dataset. For example:

	    <description>
              <![CDATA[
                More info on this dataset is available <a href="http://www.example.com">here</a>.
              ]]>
	    </description>
		      
Tag Children Required? Description
<description>


no
Dataset description
Ranges element

Specifies default ranges to use for the dataset. Only time ranges are currently supported.

Tag Children Required? Description
<ranges>

range

no
Default dataset ranges
Range element

Specifies a range. Only time ranges are currently supported. Dates are formatted as "DD/MMM/YYYY HH:MM:SS" or [^|$][+/-]delta, where ^ is the first date in the dataset, $ is the last date in the dataset, and delta is a time interval in seconds.All times are assumed to be GMT.

Examples:

<!-- Fixed time interval -->
<ranges>                         
  <range type="t" low="01/Jan/2004 00:00:00" high="31/Dec/2005 00:00:00"/>
</ranges>

<!-- Low value is 1 hour before last time point in dataset -->                        
<ranges>                         
  <range type="t" low="$-3600"/>
</ranges>
Tag Children Required? Description
<range>


yes
Default range
Attribute Type Required Description
type "t" yes  
high Date no Upper date value of range
low Date no Lower date value of range
Attributes element

Specifies miscellaneous attributes for the dataset.

Tag Children Required? Description
<attributes>

stationName

no
Dataset attributes
StationName element

Name of Dapper variable or attribute that contains the station name. This name will be displayed when a user clicks on a station in the DChart map.

Tag Children Required? Description
<stationName>



Determine station name to display in DChart user interface.
Attribute Type Required Description
variable string yes Name of Dapper variable or attribute to use for station name
Variables element

The variables element contains configuration info on the variables in a particular dataset.

Tag Children Required? Description
<variable>

include* | exclude* | default

no
Configuration info on variables in a dataset
Include element

Include a variable from a Dapper dataset in DChart dataset and (optionally) rename the variable. For example, if a Dapper dataset contains the variable "PSAL" and you want to display it as "Salinity", you would add:

<include name="PSAL" mapto="Salinity"/>

to the configuration file.

Tag Children Required? Description
<include>



Include variables from a dataset
Attribute Type Required Description
name string yes Name of variable to include
mapto string yes Display the variable with the value of this attribute
Exclude element

Exclude a variable from a Dapper dataset in DChart.

Tag Children Required? Description
<exclude>



Exclude variables from a dataset
Attribute Type Required Description
name string yes Name of variable to include
Default element

Specifies the variable to select when a user selects a DChart dataset.

Tag Children Required? Description
<default>



Default selected variable in a dataset
Attribute Type Required Description
name string yes Name of variable

Tomcat configuration

Dapper is packaged with the Jakarta Tomcat Server. By default, the Tomcat server is configured to run on ports 8080 (for HTTP) and 8005 (for shutdown notices). If you already have a server running on either of these ports, you will need to reconfigure Tomcat. The following describes how to change these ports to 9090 and 9005:

  • Edit the file jakarta/conf/server.xml in a text editor.
  • Change the line containing:

    <Server port="8005"

    to

    <Server port="9005"

  • Change the line containing:

    <Connector port="8080"

    to

    <Connector port="9090"

  • Save the file and restart the server

 More information on configuring Tomcat is available at the Tomcat site.

Configuration information for the DChart account and data sharing features

It's in the config.xml file for DChart (look at the version deployed at PMEL on adelie in ~sirott/dapper/dchart/etc/config.xml

At this point, I would just disable it since it isn't really used very much. It is disabled by default. The relevant properties for configuration (again, look at the config file above) are:

<property name="dchart.enable_upload" value="true" />
<property name="dchart.moderate_newaccount" value="true" />
<property name="dchart.admin_email" value="Joe.Sirott@noaa.gov" />
<recaptcha_key domain="pmel.noaa.gov" public="6LfDMwQAAAAAAEZHtcJqcmXwQ2EMpxxJIWU6Etzq" private="6LfDMwQAAAAAAEF2DD8QOS9qKULlTt9y2nw1YOjJ" />

The first property is self-explanatory. The moderate_newaccount property, if set to true, sends an e-mail to the address listed in the admin_email property when a user applies for a new account, and requires that the administrator click on a link to create the new account. The recaptcha_key is used to configure the recaptcha box that appears when applying for an account; more details of how recaptcha works are available at http://www.google.com/recaptcha

DChart Home | Dapper Home | Documentation & Support Home
DOC
| NOAA | OAR | PMEL | EPIC
Privacy Policy | Disclaimer | Webmaster