NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

Re: NullPointerException during aggregation

  • Subject: Re: NullPointerException during aggregation
  • From: John Caron <caron@xxxxxxxxxxxxxxxx>
  • Date: Fri, 03 Nov 2006 10:23:49 -0700
Hi Jon:

Can you check if you get the same error in the latest 2.2.17 release?
I have fixed some bugs in aggregation, but im not sure if thats one of them.

thanks

Jon Blower wrote:
Hi all,

I'm having problems working with NcML aggregations and the 2.2.16
version of the Java NetCDF libraries.  I would like to aggregate
files:

NATL_1_28082006.nc
NATL_1_29082006.nc
NATL_1_30082006.nc
...

along the time dimension.  I tried an NcML file like this:

<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2";>
  <aggregation dimName="time" type="joinNew">
    <variableAgg name="temperature"/>
    <variableAgg name="salinity"/>
    <scan location="/path/to/files/" suffix=".nc"
dateFormatMark="NATL_1_#ddMMyyyy" />
  </aggregation>
</netcdf>

This gave me a NullPointerException:

java.lang.NullPointerException
    java.util.Calendar.setTime(Calendar.java:1032)
    java.text.SimpleDateFormat.format(SimpleDateFormat.java:785)
    java.text.SimpleDateFormat.format(SimpleDateFormat.java:778)
    java.text.DateFormat.format(DateFormat.java:314)
ucar.nc2.units.DateFormatter.toDateTimeStringISO(DateFormatter.java:184)
    ucar.nc2.ncml.Aggregation.crawlDirectory(Aggregation.java:817)

I think I know why this is.  There are other files in the same
directory of the form "NATL_120_28082006.nc" and I think the
aggregator is trying to match these.  Can I arrange it so that only
files that match the pattern "NATL_1_#ddMMyyyy.nc" are aggregated, and
all others are simply ignored?

I am reluctant to change the directory structure of my data because
other applications may depend on it.

Thanks in advance,
Jon


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


  • 2006 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdf-java archives: