Details

Description

Aafaque,

My apologies for the top post, but the thread is getting quite long.

Here’s what I found, the issue does not appear to be a problem of aggregating four or more files - I can get the error below to trigger with just one file. The problem is the renaming of the band_1 variable after it has been built up during an aggregation. (I’m very glad you sent all the various tiff and ncml files - I’d have never figured this out w/o them.)

Here’s what will work: If you use NCML to rename the Grid variable ‘band_1’ to ‘SRB’ for each file you intend to aggregate, you can then aggregate on the Grid ‘SRB.’ So, given:

(note that I commented out the 'variable name="SRB2" orgName=“band_1”’ part).

But, if you add <variable name="SRB2" orgName=“band_1"/> back in, the aggregation will fail. It’s a bug, at least I think it is a bug, but I cannot promise a fix soon. I tried, as a work around, using NCML to change the name of the resulting 3d Grid, like this:

So for now: You can aggregate as many TIFF files as you want, but if you want to rename the variable that results from the aggregation, you must do so by renaming all of its components first, then combine those together.

I’m sorry this took so long to sort out and that the outcome is less than satisfactory. What you’re trying seems logically correct, but fails because the NCML implementation is applying the variable rename operation (<variable name="SRB2" orgName="band_1" />) to the DDS of the elements of the aggregation, and not the DDS that results from the previous operations (i.e., the DDS of the aggregation).

This is not in the code you’re running - that might be an issue as well - because assertions are compiled out for production releases. I’ll change that so we trap these conditions and produce a more informative error message.