Closed GoogleCodeExporter closed 8 years ago
Issue 26 has been merged into this issue.
Original comment by crosb...@gmail.com
on 8 Nov 2011 at 4:19
Does this work in the old njTBX?
Original comment by crosb...@gmail.com
on 17 Nov 2011 at 4:53
{{{
subgrid = grid.getVerticalTransform();
array = subgrid.getCoordinateArray(q-1); % Issue 27 is failing here...
}}}
Original comment by crosb...@gmail.com
on 17 Nov 2011 at 4:58
Hi Brian, I am getting the following traceback/error on the above:
No method 'getCoordinateArray' with matching signature found for class
'ucar.unidata.geoloc.vertical.OceanSG1'.
It's weird because OceanSG1 does in fact have getCoordinateArray. On some
datasets this fails on the first index/loop but on others
(http://geoport.whoi.edu/thredds/dodsC/coawst_2_2/fmrc/coawst_2_2_best.ncd) it
fails on the 4th or 5th loop. I don't know too much about java, am I
implementing something wrong? Could I be blowing the heap, but not getting the
error?
Alex
Original comment by crosb...@gmail.com
on 3 Jan 2012 at 3:19
Hi Alex, I'll take a look either later today or tomorrow.
Original comment by bschlin...@gmail.com
on 3 Jan 2012 at 4:59
Thanks, I did some profiling with jconsole, and I don't think its a memory issue
Original comment by crosb...@gmail.com
on 3 Jan 2012 at 5:34
Also it appears to happening on requests that span multiple time indices
Original comment by crosb...@gmail.com
on 4 Jan 2012 at 8:48
I get the following stacktrace:
opendap.dap.DataReadException: Inconsistent array length read: 1165128303 !=
1914731274
at opendap.dap.DVector.deserialize(DVector.java:249)
at opendap.dap.DataDDS.readData(DataDDS.java:117)
at opendap.dap.DConnect2$DataDDSCommand.process(DConnect2.java:793)
at opendap.dap.DConnect2.openConnection(DConnect2.java:313)
at opendap.dap.DConnect2.getData(DConnect2.java:775)
at opendap.dap.DConnect2.getData(DConnect2.java:1057)
at ucar.nc2.dods.DODSNetcdfFile.readDataDDSfromServer(DODSNetcdfFile.java:1179)
at ucar.nc2.dods.DODSNetcdfFile.readData(DODSNetcdfFile.java:1344)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:846)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.dataset.VariableDS.reallyRead(VariableDS.java:546)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:526)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.Variable.read(Variable.java:604)
at ucar.unidata.geoloc.vertical.VerticalTransformImpl.readArray(VerticalTransformImpl.java:130)
at ucar.unidata.geoloc.vertical.OceanSigma.getCoordinateArray(OceanSigma.java:103)
opendap.dap.DAP2Exception: opendap.dap.DataReadException: Inconsistent array
length read: 1165128303 != 1914731274
at opendap.dap.DConnect2.openConnection(DConnect2.java:317)
at opendap.dap.DConnect2.getData(DConnect2.java:775)
at opendap.dap.DConnect2.getData(DConnect2.java:1057)
at ucar.nc2.dods.DODSNetcdfFile.readDataDDSfromServer(DODSNetcdfFile.java:1179)
at ucar.nc2.dods.DODSNetcdfFile.readData(DODSNetcdfFile.java:1344)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:846)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.dataset.VariableDS.reallyRead(VariableDS.java:546)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:526)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.Variable.read(Variable.java:604)
at ucar.unidata.geoloc.vertical.VerticalTransformImpl.readArray(VerticalTransformImpl.java:130)
at ucar.unidata.geoloc.vertical.OceanSigma.getCoordinateArray(OceanSigma.java:103)
Caused by: opendap.dap.DataReadException: Inconsistent array length read:
1165128303 != 1914731274
at opendap.dap.DVector.deserialize(DVector.java:249)
at opendap.dap.DataDDS.readData(DataDDS.java:117)
at opendap.dap.DConnect2$DataDDSCommand.process(DConnect2.java:793)
at opendap.dap.DConnect2.openConnection(DConnect2.java:313)
... 13 more
The corresponding Matlab errors are:
Error using ncgeovariable/grid_interop (line 213)
No method 'getCoordinateArray' with matching signature found for class
'ucar.unidata.geoloc.vertical.OceanSigma'.
Error in ncgeovariable/subsref (line 1047)
sref = obj.grid_interop(first, last, stride);
Original comment by bschlin...@gmail.com
on 4 Jan 2012 at 11:16
Did a check at the command line for the method getCoordinateArray. The method
does exist:
>> import ucar.unidata.geoloc.vertical.OceanSigma
>> methods('OceanSigma')
Methods for class ucar.unidata.geoloc.vertical.OceanSigma:
OceanSigma getCoordinateArray isTimeDependent subset
equals getUnitString notify toString
getClass hashCode notifyAll wait
Looks like the error "No method 'getCoordinateArray' with matching signature
found for class 'ucar.unidata.geoloc.vertical.OceanSigma'." is a red herring.
Might be a bug in the opendap libraries. I don't have time right now to dive
into it though.
Original comment by bschlin...@gmail.com
on 4 Jan 2012 at 11:21
Stepping through with a debugger:
Line 191: array = subgrid.getCoordinateArray(q-1);
throws: ucar.ma2.InvalidRangeException: i must be < length
at ucar.ma2.Range.element(Range.java:381)
at ucar.unidata.geoloc.vertical.VerticalTransformSubset.getCoordinateArray(VerticalTransformSubset.java:81)
Line 197: array = subgrid.getCoordinateArray(q-1);
Values: q = 2972
subgrid = ucar.unidata.geoloc.vertical.OceanSigma@73d84d77 (An instance of OceanSigma, different than subgrid at line 191)
throws: java.io.IOException: opendap.dap.DataReadException: Inconsistent array
length read: 1165128303 != 1914731274
at ucar.nc2.dods.DODSNetcdfFile.readData(DODSNetcdfFile.java:1351)
at ucar.nc2.Variable.reallyRead(Variable.java:860)
at ucar.nc2.Variable._read(Variable.java:846)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.dataset.VariableDS.reallyRead(VariableDS.java:546)
at ucar.nc2.dataset.VariableDS._read(VariableDS.java:526)
at ucar.nc2.Variable.read(Variable.java:658)
at ucar.nc2.Variable.read(Variable.java:604)
at ucar.unidata.geoloc.vertical.VerticalTransformImpl.readArray(VerticalTransformImpl.java:130)
at ucar.unidata.geoloc.vertical.OceanSigma.getCoordinateArray(OceanSigma.java:103)
line 205: array = subgrid.getCoordinateArray();
Values: subgrid = ucar.unidata.geoloc.vertical.OceanSigma@73d84d77 (Same
instance as line 197)
throws: MATLAB:UndefinedFunction - No method 'getCoordinateArray' with matching
signature found for class 'ucar.unidata.geoloc.vertical.OceanSigma'.
So there's 2 things going on here:
1) We're getting an error from the opendap libraries at line 197. It's possible
it's an opendap bug but it could easily be a incorrect index. So this needs to
be double checked.
2) getCoordinateArray at line 197 requires an integer argument. It looks like
the int value is ignored if: subgrid.isTimeDependant() == 0. In which case you
can use any value as the argument, e.g. array = subgrid.getCoordinateArray(0).
See
http://www.unidata.ucar.edu/software/netcdf-java/v4.2/javadoc/ucar/unidata/geolo
c/vertical/OceanSigma.html
Original comment by bschlin...@gmail.com
on 5 Jan 2012 at 12:57
I think I am always providing an integer argument, but maybe I have to convert
to integer explicitly?
Original comment by crosb...@gmail.com
on 5 Jan 2012 at 2:03
The offending line was
205: array = subgrid.getCoordinateArray();
I changed it to
array = subgrid.getCoordinateArray(0);
No int conversion is needed, you were just missing an argument.
Original comment by bschlin...@gmail.com
on 5 Jan 2012 at 4:06
Ah yeah, i see that. I didn't know anything ever actually hit that catch.
Original comment by crosb...@gmail.com
on 5 Jan 2012 at 7:46
This problem was fixed but there is still the issue of the java being very slow
on some sigma coordinate systems
Original comment by crosb...@gmail.com
on 21 Jun 2012 at 4:07
Original issue reported on code.google.com by
rsignell
on 8 Nov 2011 at 4:08