Title: DapperM: A Matlab Interface to Dapper
1DapperM A Matlab Interface to Dapper An
OPeNDAP In Situ Data Service
- D.W. Denbo1, J. Sirott2, W.H. Zhu11UW/JISAO-NOAA/
PMEL2NOAA/PMEL
IIPS Session 3BAmerican Meteorological
SocietyJanuary 14-18, 2007, San Antonio TX
2Introduction
- The Dapper server provides OPeNDAP protocol
access to in situ data. - We have developed an easy to use interface from
Matlab to Dapper DapperM. DapperM uses Java
tools that were developed for use with ncBrowse
and Java Ocean Atlas.
3Design
- DapperM utilizes NdEdit and other existing Java
tools to provide the user interface for the
navigation and selection of Dapper Data. - Design goals include
- Re-use Java components to navigate and select
data - Create Java objects that hide the original Java
data structures. - Create Matlab scripts that can directly interact
with the datasets and objects. - Create an easy to use GUI.
4dpr_gui Example
The Argo dataset is available from Dapper and is
automatically updated regularly from Argo data
assembly centers. In this example, Argo data
from near the Aleutian Islands is selected.
5gtgt dpr_gui
6- Argo data selected from near the Aleutian Islands
using NdEdit. - Once Step 4 Select is pressed the selected
stations are returned to the DapperM object.
7Display after Waterfall Plot button has been
selected.
8- After Save to Matlab has been selected the data
is available as selection_1 in the users work
area. - Matlabs Array Editor is a useful tool to browse
selection_1 contents.
9- Variables for the first station can be viewed by
opening selection_11,1. - The sub-CellArray contains the name of each
variable and an array holding the data values.
10- Attributes for the first station can be viewed by
opening selection_11,2. - The sub-CellArray contains the name and value for
each attribute. - The first 9 attributes contain information about
the entire Dapper dataset.
11Script Example
create waterfall plot collection
dpr_wizard dpr_plot(collection, 1.0) will
prompt for variable get a list of each
stations attributes n1 while
collection.hasNext stn collection.openNext
listn dpr_attributes(stn) n n
1 end
12DapperM Objects
- Attribute - A (name, value) pair.
- DapperM - Coordinates browsing, selecting, and
downloading Stations from Dapper collections. - Dimension - Holds the name and length of a
dimension. - Station - A container for station Attributes,
Variables, and Dimensions. - Variable - A container for variable Attributes,
Dimensions, and data.
13DapperM Functions
- dpr_attributes - Returns a CellArray that
contains Attribute names and values of a Station
or DapperM collection. - dpr_choose_variable - Selects a variable from the
DapperM collection. - dpr_date - Converts Java time (milliseconds since
1970) to values that will work with Matlabs
datestr(). - dpr_dimensions - Returns a CellArray that
contains the dimension names, lengths, and
unlimited dimension flag. - dpr_gui - Matlab gui interface to the DapperM
Java Wizard. - dpr_plot - Plots a variable of all the Stations
in the DapperM collection.
14DapperM Functions
- dpr_profiles - Loads a matrix with all the
variables in the Station. - dpr_selection - Extracts variables from a Station
or DapperM collection into a CellArray. - dpr_station_selection - Extracts variables from a
Station into a CellArray. - dpr_variables - Returns a CellArray of variable
names and a reference to the Java Variable
object. - dpr_variable_names - Returns a CellArray with the
names and units of all station variables. - dpr_wizard - Opens the Java DapperWizard and
returns a DapperM collection.
15CellArray Format
dpr_gui returns a profile CellArray with the
format selectionn,1
CellArray, variable data
varm,1 variable name
varm,2 data array
where m is the variable number
selectionn,2 CellArray, station global
attributes
attributej,1 attribute name
attributej,2 attribute value
selectionn,3 longitude (0-360 degrees east)
selectionn,4 latitude
selectionn,5 time (MATLAB format)
selectionn,6 time string
16Summary
- DapperM provides easy access to Dapper in situ
Server for Matlab users. - Matlab functions and Java objects can be used
together for powerful, flexible, application
design. - dpr_gui function provides graphical interface to
select data from Dapper and return a
multi-dimensional CellArray containing the
selected data.
17Links
- DapperM Web Page (downloads) http//www.epic.noaa.
gov/epic/software/DapperM/ - Dapper Server Web Page http//www.epic.noaa.gov/ep
ic/software/dapper/ - ncBrowse Web Page http//www.epic.noaa.gov/java/nc
Browse/ - Java Ocean Atlas Web Page http//www.epic.noaa.gov
/epic/software/JavaJOA.htm - NdEdit Web Page http//www.epic.noaa.gov/epic/soft
ware/JavaNdedit.htm