• No results found

2.2 OPeNDAP

2.2.5 OPeNDAP data models and data types

A dataset consists beside of its data also of a data model that defines the relationship of data values to each other, with the result that the data gets a meaning. Such data models can be considered as data types within OPeN- DAP, as Sgouros (2004) remarks. According to Cornillon et al. (2003) and Gallagher et al. (2005), the OPeNDAP data access protocol (DAP) provides the four data types Array, Structure, Grid and Sequence. Cornillon et al. (2003) and Heimbigner (2008) explain that a Structure can be considered as a simple heterogeneous collections of fields, and an Array of an ordered collection of fields.

that is using the DAP 2.0 data accessing protocol. This UML diagram was created by Caron and Domenico (2006) and is also illustrated by Nativi et al. (2008).

Figure 2.8: UML diagram of the OPeNDAP data model that is using the DAP 2.0 data accessing protocol (Caron & Domenico, 2006)

Grid type

The OPeNDAP Grid data type as a special case of a structure consists of a n- dimensional array structure that is containing the measurements in the form of different dependent variables, as well as n one-dimensional map vectors as independent variables that are specifying the axes of this multidimensional

array with n dimensions, as described by Gallagher et al. (2005), Heimbigner (2008) and Sgouros (2009). They also explain that the intervals in between the rows of a grid are defined by the map vectors and do not have to be regular. Each map vector – that has to be of an atomic type – defines the indexes of one dimension of the data array. Subsequently it must have the same number of elements as well as the same name as the corresponding array dimension, as clarified by Gallagher et al. (2005). Gridded NetCDF data is translated to OPeNDAPs Grid data type in case that the NetCDF-service of the OPeNDAP data server Dapper is used. This translation is explained in subsection 2.3.2 on page 58.

Listing 2.1 on page 52 illustrates a full OPeNDAP Dataset Descriptor Structure (DDS) and Listing 2.2 on page 52 a full OPeNDAP Data Attribute Structure (DAS) for a gridded dataset. The data is represented by the use of the OPeNDAP Grid data type and is conform to the CF-1.4 Convention. Sequence type

In-situ data consists of observations that were measured at a specific site. The Sequence data type of OPeNDAP exists to store such in-situ data that can’t be represented by the use of the Grid data representation, as Sgouros (2009) argues. Sequences are one-dimensional structures of an length that is unknown until the data is read (Caron, 2004). Cornillon et al. (2009) remark that the OPeNDAP Sequence data type was originally designed to represent profile data in NVODS.

Gallagher et al. (2005), Heimbigner (2009) and Sgouros (2009) demon- strate this OPeNDAP data type with an example: It can be compared to records of a relational data table, in that columns represent different data values that were measured, and rows subsequent instances in a Sequence of these measurements.

The differences of the Sequence data type to an Array is the fact, that only one measurement value of a variable in the sequences corresponds to one time value, as stated by Sgouros (2004). In this regard, an ordered set of zero or more variable length arrays of Structures can describe the Sequence data type according to Gallagher et al. (2005) and Heimbigner (2008). Each Sequence entry must have the same variable type as well as the same number and order. If a Sequence contains a Structure or Array, each instance of these types must be of the same size, as Gallagher et al. (2005) continue to explain. Cornillon et al. (2009) state that this data type faces constraints regarding the interoperability due to a lack of a consistent organizational structure. In-situ data is translated to OPeNDAPs Sequence data type in case that the CDP-service of the OPeNDAP data server Dapper is employed. This is

explained in subsection 2.3.2 on page 58.

An example of a Dataset Descriptor Structure (DDS) and a Data At- tribute Structure (DAS) of OPeNDAP’s Sequence data type can be found in subsection 3.2.2 on page 80. These listings represent OPeNDAP in-situ time-series data according to the Dapper OPeNDAP In-situ Convention.

, D a t a s e t { F l o a t 6 4 t i m e [ t i m e = 2 8 9 ] ; F l o a t 6 4 h e i g h t [ h e i g h t = 1]; F l o a t 6 4 l a t i t u d e [ l a t i t u d e = 1 0 0 ] ; F l o a t 6 4 l o n g i t u d e [ l o n g i t u d e = 2 0 0 ] ; G r i d { A R R A Y : B y t e w a t e r w a t c h _ f l o o d _ o c c u r r e n c e [ t i m e = 2 8 9 ] [ h e i g h t = 1][ l a t i t u d e = 1 0 0 ] [ l o n g i t u d e = 2 0 0 ] ; M A P S : F l o a t 6 4 t i m e [ t i m e = 2 8 9 ] ; F l o a t 6 4 h e i g h t [ h e i g h t = 1]; F l o a t 6 4 l a t i t u d e [ l a t i t u d e = 1 0 0 ] ; F l o a t 6 4 l o n g i t u d e [ l o n g i t u d e = 2 0 0 ] ; } w a t e r w a t c h _ f l o o d _ o c c u r r e n c e ; } w a t e r w a t c h _ f l o o d o c c u r r e n c e _ 2 0 1 0 _ d o y 1 _ 2 8 9 _ a l l _ r e p r ;

Listing 2.1: OPeNDAP DDS for a typical gridded dataset represented by the OPeNDAP Grid data type. This dataset is respecting the CF-1.4 Convention

, A t t r i b u t e s { t i m e { S t r i n g u n i t s " h o u r s s i n c e 1970 -01 -01 0 0 : 0 0 : 0 . 0 " ; S t r i n g l o n g _ n a m e " t i m e "; S t r i n g s t a n d a r d _ n a m e " t i m e "; S t r i n g c a l e n d a r " g r e g o r i a n "; S t r i n g a x i s " T "; } h e i g h t { S t r i n g u n i t s " 1 " ; S t r i n g l o n g _ n a m e " l e v e l "; S t r i n g p o s i t i v e " up "; S t r i n g a x i s " Z "; } l a t i t u d e { S t r i n g u n i t s " d e g r e e s _ n o r t h "; S t r i n g l o n g _ n a m e " l a t i t u d e "; S t r i n g s t a n d a r d _ n a m e " l a t i t u d e "; S t r i n g a x i s " Y "; } l o n g i t u d e {

S t r i n g u n i t s " d e g r e e s _ e a s t "; S t r i n g l o n g _ n a m e " l o n g i t u d e "; S t r i n g s t a n d a r d _ n a m e " l o n g i t u d e "; S t r i n g a x i s " X "; } w a t e r w a t c h _ f l o o d _ o c c u r r e n c e { B y t e _ F i l l V a l u e 1; S t r i n g u n i t s " 1 " ; S t r i n g l o n g _ n a m e " f l o o d o c c u r r e n c e ";

S t r i n g c o m m e n t "0 = no data , 1 = not flooded , 2 = wet , 3 = f l o o d e d "; } N C _ G L O B A L { S t r i n g C o n v e n t i o n s " CF - 1 . 4 " ; S t r i n g t i t l e " W a t e r w a t c h f l o o d o c c u r r e n c e "; S t r i n g i n s t i t u t i o n " LSiiT , U n i v e r s i t y of S t r a s b o u r g , F r a n c e "; S t r i n g s o u r c e " No i n f o r m a t i o n a v a i l a b l e "; S t r i n g h i s t o r y " N c m l c r e a t i o n d a t e : Tue Jan 18 1 4 : 3 5 : 5 2 2 0 1 1 " ; S t r i n g r e f e r e n c e s " No i n f o r m a t i o n a v a i l a b l e "; S t r i n g c o m m e n t " No i n f o r m a t i o n a v a i l a b l e "; } D O D S _ E X T R A { S t r i n g U n l i m i t e d _ D i m e n s i o n t i m e ; } }

Listing 2.2: OPeNDAP DAS for a typical gridded dataset represented by the OPeNDAP Grid data type. This dataset is respecting the CF-1.4 Convention