[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem aggregating along time dimension



Hi Jon:

At the moment, all you can do is generate the coordinates yourself in the NcML, 
following this section of the docs:

 
http://www.unidata.ucar.edu/software/netcdf/ncml/v2.2/Aggregation.html#JoinExistingTypes

Otherwise we'll have to add a "request for enhancement" on dealing with join 
coordinates whose units change. It would be helpful to have some datasets with this 
problem for testing.

Regards,

John

Jon Blower wrote:
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


===============================================================================
To unsubscribe netcdf-java, visit:
http://www.unidata.ucar.edu/mailing-list-delete-form.html
===============================================================================