This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Dear all, I've come across a problem when aggregating a dataset across the time dimension using NcML and the latest (2.2.18) nj22 library. I would like to aggregate a number of files, which represent timesteps of an ocean forecast model (one timestep per file). I am aggregating using an NcML file like this: <netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2"> <aggregation dimName="t" type="joinExisting"> <scan location="/path/to/files" suffix=".nc"/> </aggregation> </netcdf> When reading this NcML file using NetcdfDataset.openDataset() I get an aggregated dataset with the correct number of timesteps BUT all the values along the time axis are the same. After much head-scratching I think I've found the source of the problem, but I don't have a solution. In each individual file, the time dimension is specified with different units but the values remain the same: File 1: time units: seconds since 2007-02-06 00:00:00, value: 43200 File 2: time units: seconds since 2007-02-07 00:00:00, value: 43200 This seems to confuse the aggregation code, which I assume expects the units to remain constant between files and the values to change. Is there a solution or workaround for this? I don't control how the netCDF files are made so I don't think I can change them. Any help will be much appreciated. Regards, Jon -- -------------------------------------------------------------- Dr Jon Blower Tel: +44 118 378 5213 (direct line) Technical Director Tel: +44 118 378 8741 (ESSC) Reading e-Science Centre Fax: +44 118 378 6413 ESSC Email: address@hidden University of Reading 3 Earley Gate Reading RG6 6AL, UK -------------------------------------------------------------- =============================================================================== To unsubscribe netcdf-java, visit: http://www.unidata.ucar.edu/mailing-list-delete-form.html ===============================================================================