Opened 8 years ago

Closed 5 years ago

#6551 closed enhancement (wontfix)

allow vector read of NetCDF NASA ocean color L3Bin files

Reported by: mdsumner Owned by: warmerdam
Priority: normal Milestone: closed_because_of_github_migration
Component: default Version: unspecified
Severity: normal Keywords: netcdf vector L3bin

Description (last modified by mdsumner)

NASA's ocean color L3bin files are now stored as compound types within grouped NetCDF4 files. An example (obtained below and attached) contains group "level-3_binned_data" with two compound types "binListType" and "binDataType" that have matching dimension (2 in this small example), and another "binIndexDim" (dimension 2160 in this example).

Could the vector support in GDAL add a feature to limit to specific user-specified types? For example, I'd like to be able to limit interpretation of only "binListType" variables. Could it make sense that a compound type presents as a layer?

I see this as a non-geometric table and having the ability to read it with GDAL would be very helpful. There are geometric interpretations as well but I'd leave that for another ticket.

The current behaviour (GDAL 2.10) reports

Warning 1: The dataset has several variables that could be identified as vector fields, but not all share the same primary dimension. Consequently they will be ignored.
INFO: Open of `'
      using driver `netCDF' successful.
  NC_GLOBAL#binning_scheme=Integerized Sinusoidal Grid

Relevant snippet of ncdump -h output:

group: level-3_binned_data {
    compound binListType {
      uint bin_num ;
      short nobs ;
      short nscenes ;
      float weights ;
      float time_rec ;
    }; // binListType
    compound binDataType {
      float sum ;
      float sum_squared ;
    }; // binDataType
    compound binIndexType {
      uint start_num ;
      uint begin ;
      uint extent ;
      uint max ;
    }; // binIndexType
  	binListDim = UNLIMITED ; // (2 currently)
  	binDataDim = UNLIMITED ; // (2 currently)
  	binIndexDim = UNLIMITED ; // (2160 currently)
  	binListType BinList(binListDim) ;
  	binDataType chlor_a(binDataDim) ;
  	binDataType chl_ocx(binDataDim) ;
  	binIndexType BinIndex(binIndexDim) ;
  } // group level-3_binned_data

Full ncdump -h output (attached).

## bash to obtain small example file and dump header
ncdump -h > S2008001.L3b_DAY_CHL.nc_dump

Other example data are available from here, anything with "*L3b*.nc" in the name

Attachments (1)

S2008001.L3b_DAY_CHL.nc_dump (4.8 KB ) - added by mdsumner 8 years ago.
ncdump of example L3bin file

Download all attachments as: .zip

Change History (4)

by mdsumner, 8 years ago

ncdump of example L3bin file

comment:1 by mdsumner, 8 years ago

Description: modified (diff)

comment:2 by Even Rouault, 8 years ago

I don't think that restriction of what is recognized should be done in the driver (apart avoiding presenting 2D or more variables that are matrix/raster and handled by the raster side of the driver, or 1D variables that are "support" variables of raster varaibles). All what could be read should be presented as separate layers. The restriction is a later user action when displaying / converting / etc...

Here the "challenges" are handling netCDF 4 groups and compound types.

comment:3 by Even Rouault, 5 years ago

Milestone: closed_because_of_github_migration
Resolution: wontfix
Status: newclosed

This ticket has been automatically closed because Trac is no longer used for GDAL bug tracking, since the project has migrated to GitHub. If you believe this ticket is still valid, you may file it to if it is not already reported there.

Note: See TracTickets for help on using tickets.