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

Re: [netcdf-java] GRIB file handling bug?



Hi Paul:

The problem is that the file has 2 GDSs in it, so two groups are made. Since you are writing to netcdf3, which doesnt support groups, it barfs. The error message is lame, i will fix that.

You should probably seperate the GRIB records to have unique GDSs.

The stable release will support netcdf-4 writing, if you have the C library.

John

On 11/15/2012 1:31 PM, Paul Hamer wrote:
John,

Looks like I get a different problem now:

 > java -cp netcdfAll-4.3.jar ucar.nc2.dataset.NetcdfDataset -out
/tmp/dum.ncf -in /data/1232018000000
Read from /data/1232018000000 write to /tmp/dum.ncf
Nov 15, 2012 1:27:57 PM ucar.nc2.NetcdfFileWriter addGroupAttribute
WARNING: illegal attribute name=
LambertConformal_113X151-40p15N-97p74W/long_name change to
LambertConformal_113X151-40p15N-97p74W_long_name
Nov 15, 2012 1:27:57 PM ucar.nc2.NetcdfFileWriter addGroupAttribute
WARNING: illegal attribute name=
LambertConformal_225X301-40p06N-98p08W/long_name change to
LambertConformal_225X301-40p06N-98p08W_long_name
Exception in thread "main" java.lang.IllegalStateException: Unknown
dimension= x
         at ucar.nc2.FileWriter2.addNetcdf3(FileWriter2.java:225)
         at ucar.nc2.FileWriter2.write(FileWriter2.java:166)
         at ucar.nc2.dataset.NetcdfDataset.main(NetcdfDataset.java:1684)

Using the current official release is always dodgy. :-)

Paul.


On Thu, Nov 15, 2012 at 1:15 PM, John Caron <address@hidden
<mailto:address@hidden>> wrote:

    Hi Paul:

    This file seems to be ok in Java NetCDF 4.3, can you check using
    that version? We expect to release 4.3.14 as the stable release this
    week or next.

    FYI, GRIB handling in earlier versions of Java NetCDF is Considered
    Harmful.

    John



    On 11/15/2012 1:02 PM, Paul Hamer wrote:

        The attached file is an example  NOAAPORT distributed icing product
        (CIP) which causes an exception when accessed using Java NetCDF.
        This is
        the analysis file for this model, the forecast files are handled
        without
        error. Any ideas?

        Paul.

        --
        Paul Hamer

        NOAA Earth System Research Laboratory (ESRL)
        Global Systems Division (GSD)
        325 Broadway R/GS5
        Boulder, CO 80305-3328

        phone : 303.497.6342 <tel:303.497.6342>




        _________________________________________________
        netcdf-java mailing list
        address@hidden <mailto:address@hidden>
        For list information or to unsubscribe, visit:
        http://www.unidata.ucar.edu/__mailing_lists/
        <http://www.unidata.ucar.edu/mailing_lists/>


    _________________________________________________
    netcdf-java mailing list
    address@hidden <mailto:address@hidden>
    For list information or to unsubscribe, visit:
    http://www.unidata.ucar.edu/__mailing_lists/
    <http://www.unidata.ucar.edu/mailing_lists/>




--
Paul Hamer

NOAA Earth System Research Laboratory (ESRL)
Global Systems Division (GSD)
325 Broadway R/GS5
Boulder, CO 80305-3328

phone : 303.497.6342