thredds icon indicating copy to clipboard operation
thredds copied to clipboard

subsetValuesDiscontinuous not done yet

Open lesserwhirls opened this issue 6 years ago • 1 comments

The ability to subset data with a discontinuous axis is not yet supported in 5.0 (see: cdm/src/main/java/ucar/nc2/ft2/coverage/CoordAxisHelper.java 364). For example:

https://thredds-dev.unidata.ucar.edu/thredds/catalog/grib/NCEP/GFS/Global_0p25deg/catalog.html

Requesting a variable with a disontinuous axis, such as Albedo_surface_Mixed_intervals_Average, will trigger the error. For example:

https://thredds-dev.unidata.ucar.edu/thredds/ncss/grid/grib/NCEP/GFS/Global_0p25deg/GFS_Global_0p25deg_20180308_1200.grib2?var=Albedo_surface_Mixed_intervals_Average&north=90.000&west=-180.000&east=180.000&south=-90.000&horizStride=1&time_start=2018-03-08T12%3A00%3A00Z&time_end=2018-03-08T15%3A00%3A00Z&timeStride=1&vertCoord=&accept=netcdf3

The same request on thredds.ucar.edu (a 4.6 server) works:

https://thredds.ucar.edu/thredds/ncss/grib/NCEP/GFS/Global_0p25deg/GFS_Global_0p25deg_20180308_1200.grib2?var=Albedo_surface_Mixed_intervals_Average&disableLLSubset=on&disableProjSubset=on&horizStride=1&time_start=2018-03-08T15%3A00%3A00Z&time_end=2018-03-08T18%3A00%3A00Z&timeStride=1&vertCoord=&accept=netcdf

lesserwhirls avatar Mar 08 '18 20:03 lesserwhirls

Based on CooverageCoordAxis.Spacing [1], that method should probably be called subsetValuesWithDisconti**g**uousInterval rather than subsetValuesDisconti**n**uous. A typo, I believe, and an attempt to shorten the name.

On the other hand, in your example the time/time_bounds coordinate has overlapping intervals. Is that another category different than discontiguous intervals? And how do they impact subsetting?

[1] From CoverageCoordAxis:

public enum Spacing {
    regularPoint,          // regularly spaced points (start, end, npts), start and end are pts, edges halfway between coords, resol = (start - end) / (npts-1)
    irregularPoint,        // irregular spaced points (values, npts), edges halfway between coords
    regularInterval,       // regular contiguous intervals (start, end, npts), start and end are edges, resol = (start - end) / npts
    contiguousInterval,    // irregular contiguous intervals (values, npts), values are the edges, values[npts+1], coord halfway between edges
    discontiguousInterval  // irregular discontiguous spaced intervals (values, npts), values are the edges, values[2*npts]: low0, high0, low1, high1, ...
}

ethanrd avatar Mar 09 '18 20:03 ethanrd