netcdf-java icon indicating copy to clipboard operation
netcdf-java copied to clipboard

GridCoverage failing (probably) on MRUTC

Open JohnLCaron opened this issue 4 years ago • 3 comments

TestCoordinatesMatchGbx.readGrib1Files() fails on:

/usr/local/google/home/jlcaron/thredds/cdmUnitTest/formats/grib1/QPE.20101005.009.157 Total_precipitation_surface_Accumulation expected: 2010-10-05T18:00:00Z but was : 2010-10-05T12:00:00Z at ucar.nc2.grib.GribCoordsMatchGbx.readAndTestGrib1(GribCoordsMatchGbx.java:389) at ucar.nc2.grib.GribCoordsMatchGbx.readCoverageData(GribCoordsMatchGbx.java:179) at ucar.nc2.grib.GribCoordsMatchGbx.readCoverage(GribCoordsMatchGbx.java:147) at ucar.nc2.grib.GribCoordsMatchGbx.readCoverageDataset(GribCoordsMatchGbx.java:108) at ucar.nc2.grib.TestCoordinatesMatchGbx$GribAct.doAct(TestCoordinatesMatchGbx.java:194) at ucar.unidata.util.test.TestDir.actOnAll(TestDir.java:263) at ucar.nc2.grib.TestCoordinatesMatchGbx.readAllDir(TestCoordinatesMatchGbx.java:169) at ucar.nc2.grib.TestCoordinatesMatchGbx.readGrib1Files(TestCoordinatesMatchGbx.java:53)

JohnLCaron avatar Aug 17 '19 20:08 JohnLCaron

/usr/local/google/home/jlcaron/thredds/cdmUnitTest/formats/grib1/QPE.20101005.009.157

As a grib collection proto (ncx4) :

othogonalize it 24 x 5 MRUTC Multiple Runtime Unique Time Collection time2D: time1 runtime=reftime nruns=24 ntimes=5 isOrthogonal=true isRegular=false All time values= (0,1), (0,6), (6,12), (12,18), (18,24), (n=5) timeIntv: (0,1), (0,6), (6,12), (12,18), (18,24), (5)

SparseArray shape=[24,5,] ndups=12, missing/total=92/120, density=0.233333

X---- X---- X---- X---- X---- X---- X---- X---- X---- X---- X---- X---- XXXXX X---- X---- X---- X---- X---- X---- X---- X---- X---- X---- X----

So every hour, has 1 hour accumulation, and at 12 noon 0-6, 6-12, 12-18, 18-24

as a NetcdfDataset/GridDataset/GridCoverage, it just has 120 = 4x24 1D coords in both runtime and forecast time.

the orthogonalization here seems unneeded, except to make a compact representation for very large datasets. you really want to break this into two datasets, 1 hour, and 6-hour accumulation.

in the meanwhile, we have a bug fetching the current GridCoverage using SubsetParams

JohnLCaron avatar Aug 17 '19 20:08 JohnLCaron

I was guessing that we are using subsetValuesClosest, so always finding some index, even when its the wrong one. Need to add some strict unit tests on CoordAxisHelper to see.

Also may be a problem when there is no record for that index. In this case there are 28/120 records present. Also its a discontiguousInterval.

JohnLCaron avatar Aug 17 '19 20:08 JohnLCaron

May be a TDS configuration isssue?

JohnLCaron avatar Mar 25 '21 15:03 JohnLCaron