A Union aggregation type creates the union of all the variables in the component datasets. Assume we have two datasets, with the following two DDS's:
Dataset {
Float32 lat[lat = 21];
Float32 lon[lon = 360];
Grid {
ARRAY:
Int16 cldc[lat = 21][lon = 360];
MAPS:
Float32 lat[lat = 21];
Float32 lon[lon = 360];
} cldc;
} coads/cldc.mean.nc;
Dataset {
Float32 lat[lat = 21];
Float32 lon[lon = 360];
Grid {
ARRAY:
Int16 lflx[lat = 21][lon = 360];
MAPS:
Float32 lat[lat = 21];
Float32 lon[lon = 360];
} lflx;
} coads/lflx.mean.nc;
Using the following XML fragment to specify the aggregation creates a DDS like the one in Example 2.
<aggregation serviceName="COADS" aggType="Union"> <fileAccess urlPath="cldc.mean.nc"/> <fileAccess urlPath="lflx.mean.nc"/> </aggregation>
The resulting DDS (and the accompanying Data Attribute Structure (DAS)) is the union of all the
individual files' DDS. The first time a variable is encountered it is
added to the combined DDS, subsequent variables with the same name are
ignored. In the above example, the top level variables lat
and lon are therefore taken from the
cldc.mean.nc dataset. See figure 1.1.
Example 2
Dataset {
Float32 lat[lat = 21];
Float32 lon[lon = 360];
Grid {
ARRAY:
Int16 cldc[lat = 21][lon = 360];
MAPS:
Float32 lat[lat = 21];
Float32 lon[lon = 360];
} cldc;
Grid {
ARRAY:
Int16 lflx[lat = 21][lon = 360];
MAPS:
Float32 lat[lat = 21];
Float32 lon[lon = 360];
} lflx;
} local/coads;