dapperm: a matlab interface to dapper — an opendap in situ data service d.w. denbo 1, j. sirott 2,...

17
DapperM: A Matlab Interface to Dapper — An OPeNDAP In Situ Data Service D.W. Denbo 1 , J. Sirott 2 , W.H. Zhu 1 1 UW/JISAO-NOAA/PMEL 2 NOAA/PMEL IIPS Session 3B American Meteorological Society January 14-18, 2007, San Antonio TX

Upload: katerina-brainerd

Post on 15-Dec-2015

233 views

Category:

Documents


1 download

TRANSCRIPT

DapperM: A Matlab Interface to Dapper — An OPeNDAP

In Situ Data Service

D.W. Denbo1, J. Sirott2, W.H. Zhu1

1UW/JISAO-NOAA/PMEL2NOAA/PMEL

IIPS Session 3BAmerican Meteorological Society

January 14-18, 2007, San Antonio TX

16 January 2007 23rd Conference on IIPS 2

Introduction• 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.

16 January 2007 23rd Conference on IIPS 3

Design• 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.

16 January 2007 23rd Conference on IIPS 4

dpr_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.

>> dpr_gui

• 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.

Display after “Waterfall Plot” button has been selected.

• After “Save to Matlab” has been selected the data is available as “selection_1” in the users work area.

• Matlab’s Array Editor is a useful tool to browse selection_1 contents.

• Variables for the first station can be viewed by opening selection_1{1,1}.

• The sub-CellArray contains the name of each variable and an array holding the data values.

• Attributes for the first station can be viewed by opening selection_1{1,2}.

• The sub-CellArray contains the name and value for each attribute.

• The first 9 attributes contain information about the entire Dapper dataset.

16 January 2007 23rd Conference on IIPS 11

Script Example% create waterfall plotcollection = dpr_wizard;dpr_plot(collection, 1.0); %% will prompt for variable%% get a list of each stations attributes%n=1;while collection.hasNext stn = collection.openNext list{n} = dpr_attributes(stn); n = n + 1;end

16 January 2007 23rd Conference on IIPS 12

DapperM 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.

16 January 2007 23rd Conference on IIPS 13

DapperM 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 Matlab’s 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.

16 January 2007 23rd Conference on IIPS 14

DapperM 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.

16 January 2007 23rd Conference on IIPS 15

CellArray Formatdpr_gui returns a profile CellArray with the format: selection{n,1} = CellArray, variable data var{m,1} = variable name var{m,2} = data array where m is the variable number selection{n,2} = CellArray, station global attributes attribute{j,1} = attribute name attribute{j,2} = attribute value selection{n,3} = longitude (0-360 degrees east) selection{n,4} = latitude selection{n,5} = time (MATLAB format) selection{n,6} = time string

16 January 2007 23rd Conference on IIPS 16

Summary• 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.

16 January 2007 23rd Conference on IIPS 17

Links• DapperM Web Page (downloads)

http://www.epic.noaa.gov/epic/software/DapperM/

• Dapper Server Web Page http://www.epic.noaa.gov/epic/software/dapper/

• ncBrowse Web Page http://www.epic.noaa.gov/java/ncBrowse/

• Java Ocean Atlas Web Page http://www.epic.noaa.gov/epic/software/JavaJOA.htm

• NdEdit Web Page http://www.epic.noaa.gov/epic/software/JavaNdedit.htm