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

RE: 19991202: Java NetcdfFile.add



> John,
>     What I am trying to do is incrementally create a netcdf file. I am
> getting my data from a network call and I don't know all the variables
> or sizes at the beginning. I could read through all the data
> twice, but
> since this is over a network it would be very inefficient. So
> what I am
> trying to is create an netcdffile with a empty schema and then
> incrementally
> add protovariables and data.  Can I do this at all?  How?
> I had failed to note that the add function is private so I
> can't use it.
> Thanks.

Hmmm, unfortunately, the Java netcdf API doesnt allow you to
incrementally update the Schema; the Schema in a NetcdfFile is
considered immutable.

Kinda lame, but I think thats the way it is. You could 1) read the data
twice, accumulating the scheme on the first pass, or 2) write seperate
files for each Variable, then merge at the end. Probably some other
options, but you can probably figure them out based on your situation.