[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmicdf
- Subject: Re: rmicdf
- Date: Mon, 26 Aug 1996 15:14:15 -0600
Tom,
> > ... I can send you a patch file.
>
> That would be great. I've been faking my work with other NetCDF files, but
> I'm at the point where a patch would help a lot.
It's appended. This has a couple of other unrelated changes in it, but
they're minor and shouldn't break anything.
--Russ
Index: JiDim.java
===================================================================
RCS file: /upc/share/CVS/rmicdf/netcdf/JiDim.java,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 JiDim.java
*** 1.1.1.1 1996/07/25 16:36:14
--- JiDim.java 1996/08/08 16:47:25
***************
*** 3,10 ****
import java.io.*;
public class JiDim {
! public int mStart, mCount, mStride;
! public String mName;
public JiDim(String name, int start, int count)
{
--- 3,10 ----
import java.io.*;
public class JiDim {
! int mStart, mCount, mStride;
! String mName;
public JiDim(String name, int start, int count)
{
***************
*** 20,30 ****
mStart = start;
mCount = count;
mStride = stride;
- }
-
- public JiVar getCoordVar() throws IOException
- {
- throw new IOException("JiDim::getCoordVar() : not supported");
}
public String getName()
--- 20,25 ----
Index: JiNcSource.java
===================================================================
RCS file: /upc/share/CVS/rmicdf/netcdf/JiNcSource.java,v
retrieving revision 1.3
diff -c -r1.3 JiNcSource.java
*** 1.3 1996/08/08 16:40:54
--- JiNcSource.java 1996/08/26 16:20:01
***************
*** 61,66 ****
--- 61,67 ----
toStringVarData(out, vars[i]);
}
}
+ out.println("}");
}
private void toStringVarData(PrintStream out, JiVar v)
***************
*** 72,83 ****
private void toStringVar(PrintStream out, JiVar v)
{
JiDim[] dims = v.getDims();
! out.print("\t" + v.getTypeString() + " " + v.getName() + "(");
! out.print(dims[0].getName());
! for (int j=1; j < dims.length; ++j){
! out.print(", " + dims[j].getName());
}
! out.println(") ;");
JiVar [] atts = v.getAtts();
if (atts != null){
for (int i=0; i < atts.length; ++i){
--- 73,87 ----
private void toStringVar(PrintStream out, JiVar v)
{
JiDim[] dims = v.getDims();
! if (dims.length > 0) {
! out.print("\t" + v.getTypeString() + " " + v.getName() + "(");
! out.print(dims[0].getName());
! for (int j=1; j < dims.length; ++j){
! out.print(", " + dims[j].getName());
! }
! out.print(")");
}
! out.println(";");
JiVar [] atts = v.getAtts();
if (atts != null){
for (int i=0; i < atts.length; ++i){
Index: JiNcVar.java
===================================================================
RCS file: /upc/share/CVS/rmicdf/netcdf/JiNcVar.java,v
retrieving revision 1.2
diff -c -r1.2 JiNcVar.java
*** 1.2 1996/08/08 16:04:38
--- JiNcVar.java 1996/08/26 16:12:40
***************
*** 129,134 ****
--- 129,137 ----
*/
public JiVar[] getAtts()
{
+ if (mAtts == null) {
+ return new JiVar[0];
+ }
JiVar[] rvar = new JiVar[mAtts.length];
for (int i=0; i < mAtts.length; ++i){
rvar[i] = mAtts[i];
***************
*** 594,599 ****
--- 597,606 ----
if (!mFinished){
if (mIsRecord && mSizes.length == 1)
rval = new JiSlab(getOffset(), 1);
+ else if (mSizes.length == 0) { // scalar
+ rval = new JiSlab(getOffset(), 1);
+ mFinished = true;
+ }
else
rval = new JiSlab(getOffset(), mSizes[0]);
if (!mIsRecord && mCounter.length == 1){