Prev Up Next Index
Go backward to 1.2.1 JoinNew Aggregation
Go up to 1.2 A little more detail
Go forward to 1.2.3 Union Aggregation

1.2.2 JoinExisting Aggregation

The JoinExisting aggregation type joins variables along an existing dimension. The dimension must have a coordinate variable and is named in the aggregation element:

<aggregation serviceName="local" varName="time" 
    aggType="JoinExisting">
  <fileAccess urlPath="cdc/air.1948.nc"/>
  <fileAccess urlPath="cdc/air.1949.nc"/>
</aggregation>

The above aggregation declaration joins these two datasets:

Dataset {
  Float32 level[level = 17];
  Float32 lat[lat = 73];
  Float32 lon[lon = 144];
  Float64 time[time = 366];
  Grid {
    ARRAY:
      Int16 air[time = 366][level = 17][lat = 73][lon = 144];
    MAPS:
      Float64 time[time = 366];
      Float32 level[level = 17];
      Float32 lat[lat = 73];
      Float32 lon[lon = 144];
  } air;
} cdc/air.1948.nc;

Dataset {
  Float32 level[level = 17];
  Float32 lat[lat = 73];
  Float32 lon[lon = 144];
  Float64 time[time = 365];
  Grid {
    ARRAY:
      Int16 air[time = 365][level = 17][lat = 73][lon = 144];
    MAPS:
      Float64 time[time = 365];
      Float32 level[level = 17];
      Float32 lat[lat = 73];
      Float32 lon[lon = 144];
  } air;
} cdc/air.1949.nc;

The resulting DDS is shown below in Example 1. Notice the time dimension of the air grid. In this case, all variables of type Array or Grid with the specified outermost dimension are joined into a single variable in the aggregated dataset. All other non-joined variables, and all attributes are taken from the first of the joined datasets.

 

Example 1

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

Tom Sgouros, 2004/07/07

Prev Up Next