DAP Design: shared dimensions, groups and types
From OPeNDAP Documentation
Revision as of 21:45, 3 March 2009 by Jimg (talk | contribs) (New page: Back: DAP3/4#NC-DAP == Shared Dimensions == Shared dimensions will be added to DAP so that special variables used to identify the independent parameters in non-scalar variables can b...)
Back: DAP3/4#NC-DAP
Shared dimensions will be added to DAP so that special variables used to identify the independent parameters in non-scalar variables can be clearly labeled as such. When a dimension is named, each use of that dimension means the same values. Each dimension will have both a name and a size in addition to a type. The moniker Shared Dimension is really redundant. Any Dimension in DAP 3.3 can be shared. There is no requirement that a dimension be used; it can be declared and never used.
Dimension examples
Declaring dimensions in the DDX:
<Dataset name="dimension_ex_1" ...> <!-- The 'dimensions' section must come first if present --> <dimensions> <!-- Dimensions are declared like an array except that the 'dimension' element is replaced by an 'extent' element and the extent has no name (since the dimension itself is named --> <Int32 name="latitude"> <extent size="1024"> </Int32> <String name="color"> <extent size="3"> </String> </dimensions> <!-- remainder of the document --> </Dataset>
Using dimensions in the DDX. In DAP, dimensions can only be used in a Grid variable;
<Dataset name="dimension_ex_1" ...> <dimensions> <Int32 name="latitude"> <dimension size="1024"> </Int32> <Int32 name="longitude"> <dimension size="1024"> </Int32> </dimensions> <!-- The two declarations that follow are effectively Grids, but now share the same dimentions --> <Byte name="uwnd"> <!-- note that only the name is used, not the size --> <map name="latitude"> <map name="longitude"> </Byte> <Byte name="vwnd"> <map name="latitude"> <map name="longitude"> </Byte> ... </Dataset>