Prev Up Next Index
Go backward to 3.5 Dataset Aliases
Go up to 3 Practice II: Configuring the OPeNDAP Catalog/Aggregation Server
Go forward to 4 Configuration Elements and Attributes Specification

3.6 Multiple Aggregation elements

A dataset can contain multiple aggregation elements. The Aggregation Server creates a single DDS and DAS by adding the elements of the individual aggregation's DDS and DAS, in the order that they are specified. If a variable or attribute with the same name already exists, then the duplicate is not added. While this does not allow general dataset restructuring, it is useful for simple cases of combining datasets. In the following example:

<dataset name="Combine Type 2 and Type 3:" urlPath="Type2and3testCombine">
<metadata metadataType="Aggregation">
<aggregation serviceName="local" varName="time" aggType="JoinExisting">
<fileAccess urlPath="cdc/air.1948.nc"/>
<fileAccess urlPath="cdc/air.1949.nc"/>
<fileAccess urlPath="cdc/air.1950.nc"/>
</aggregation>
<aggregation serviceName="local" aggType="Union">
<fileAccess urlPath="cdc/sst.mnmean.nc"/>
</aggregation>
</metadata>
</dataset>

A JoinExisting aggregation that has this DDS:

Dataset {
  Float32 level[level = 17];
  Float32 lat[lat = 73];
  Float32 lon[lon = 144];
  Float64 time[time = 1096];
  Grid {
    ARRAY:
      Int16 air[time = 1096][level = 17][lat = 73][lon = 144];
    MAPS:
      Float64 time[time = 1096];
      Float32 level[level = 17];
      Float32 lat[lat = 73];
      Float32 lon[lon = 144];
  } air;
} local/MeanAir;

and another dataset with this DDS:

Dataset {
  Float32 lat[lat = 180];
  Float32 lon[lon = 360];
  Float64 time[time = 233];
  Grid {
    ARRAY:
      Int16 sst[time = 233][lat = 180][lon = 360];
    MAPS:
      Float64 time[time = 233];
      Float32 lat[lat = 180];
      Float32 lon[lon = 360];
  } sst;
} SST;

are joined to create the following DDS:

Dataset {
  Float32 level[level = 17];
  Float32 lat[lat = 73];
  Float32 lon[lon = 144];
  Float64 time[time = 1096];
  Grid {
    ARRAY:
      Int16 air[time = 1096][level = 17][lat = 73][lon = 144];
    MAPS:
      Float64 time[time = 1096];
      Float32 level[level = 17];
      Float32 lat[lat = 73];
      Float32 lon[lon = 144];
  } air;
  Grid {
    ARRAY:
      Int16 sst[time = 233][lat = 180][lon = 360];
    MAPS:
      Float64 time[time = 233];
      Float32 lat[lat = 180];
      Float32 lon[lon = 360];
  } sst;
} Type2and3testCombine;

Note that the sst Grid (and maps) are added to the combined dataset, but the top-level variables lat, lon, and time are all taken only from the JoinNew dataset, since it was specified first.


Tom Sgouros, 2004/07/07

Prev Up Next