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

[netCDFJava #JYB-204699]: writing point netcdf



Hi Jeff:

You cant do this:

    VariableSimpleAdapter var = new 
VariableSimpleAdapter(structureMembers.addMember("test", "test", "m", 
DataType.DOUBLE, new int[]{1}));

because it creates a variable with non-shared dimensions, and you are writing 
to netcdf, which requires shared dimensions.

You should have a real Variable; do you ?

John



> Hi Lansing,
> 
> Attached is a simple test program. This gives the NPE when run.
> I'm not adding any values just creating variables and writing the header.
> 
> Am I creating the variables correctly?
> 
> -Jeff
> 
> 
> 
> address@hidden> wrote:
> 
> > Jeff,
> >
> > What are you using for the method addMember in the StructureDataScalar
> > class?  I put together this:
> >
> > public void addMember(String name, String desc, String units, double val,
> > int[] intArr) {
> >         StructureMembers.Member m = members.addMember(name, desc, units,
> > DataType.DOUBLE,  intArr);
> >         ArrayDouble.D0 data = new ArrayDouble.D0();
> >         data.set(val);
> >         setMemberData(m, data);
> >     }
> >
> > but you're test code is sending in the type Double, not a value.  Do you
> > have something like this:
> >
> > public void addMember(String name, String desc, String units, DATATYPE,
> > int[] intArr) {
> >  *some other code*
> >
> > Or did you mean to send in some double value?
> >
> > -Lansing
> >
> > Ticket Details
> > ===================
> > Ticket ID: JYB-204699
> > Department: Support netCDF Java
> > Priority: Normal
> > Status: Open
> >
> >
> 
> 


Ticket Details
===================
Ticket ID: JYB-204699
Department: Support netCDF Java
Priority: Normal
Status: Open