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

[netCDFJava #HRY-102614]: problem in using NetCDF-Java Library to create netcdf file

Greetings Jeff,

The reason your ncml file won't work is because the variables you are creating
are each bigger than 2 gigabytes. If you switch to writing out a netcdf4 file, 
you will be able to use your ncml file without modification.

To enable netcdf4 writing, you will need the C library installed. See


for more information.



> Dear Sir/Madam:
> I am using the function NcMLReader.writeNcMLToFile(InputStream ncml, String 
> fileOutName) in NetCDF-Java Library (netcdfAll-4.6.jar)  to create a netcdf 
> file with ncml.However,it failed because of the error below:
> java.lang.IllegalArgumentException: Variable starting pos=2217611712 may not 
> exceed 2147483647
> at ucar.nc2.iosp.netcdf3.N3header.writeHeader(N3header.java:686) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.iosp.netcdf3.N3header.create(N3header.java:602) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.iosp.netcdf3.N3iosp.create(N3iosp.java:668) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.NetcdfFileWriter.create(NetcdfFileWriter.java:797) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.FileWriter2.write(FileWriter2.java:196) ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.FileWriter2.write(FileWriter2.java:176) ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.ncml.NcMLReader.writeNcMLToFile(NcMLReader.java:1652) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at ucar.nc2.ncml.NcMLReader.writeNcMLToFile(NcMLReader.java:1634) 
> ~[netcdfAll-4.6.jar:4.6.0]
> at com.jeff.cdm.Netcdf3Util.createFileWithNCML(Netcdf3Util.java:100) 
> [JeffUtil.jar:?]
> at 
> com.xxzx.datadist.processor.impl.CreateNCProcessor.process(CreateNCProcessor.java:53)
>  [DataDistributor.jar:?]
> at com.xxzx.datadist.job.DataDistJob.start(DataDistJob.java:127) 
> [DataDistributor.jar:?]
> at com.xxzx.datadist.DataDistributor.runJob(DataDistributor.java:130) 
> [DataDistributor.jar:?]
> at com.xxzx.datadist.DataDistributor.main(DataDistributor.java:92) 
> [DataDistributor.jar:?]
> The ncml file I used is in the attachment "qpf.ncml".
> Could you tell me how to solve the problem?
> Thank you for your attention.
> Best regards
> Jeff

Ticket Details
Ticket ID: HRY-102614
Department: Support netCDF Java
Priority: Normal
Status: Open

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.