NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[netCDF #NRW-974703]: invalid HDF5 variable size prevents reading range in Java



Hi Garret,

[Oops, that went out before I was done. Here's the complete version ...]

John Caron wrote:
> final Variable variable = 
> file.findVariable("/Chromosomes/Summary.StartIndex");
> 
> indicates a member variable "StartIndex" of the structure "Summary"
> 
> Garret Wilson wrote:
> > I'm not sure I'm following you. Are you saying that the Variable I am
> > reading is a member of a Structure? (yes/no)

Yes.

Opening your dataset in the netCDF-Java ToolsUI [1] "NcDump" tab, I get the 
following

netcdf 
20130212_CN021_P3_222k_B02_WD7195FBPAT10231Nat_Nat_Std_CHTNWD_OP3_14.mip222k.oschp
{
  ...
  group: Chromosomes {
    variables:

     Structure {
       byte Chromosome;
           :_Unsigned = "true";
       int Display_&size;
       char Display(4);
       int StartIndex;
           :_Unsigned = "true";
       int MarkerCount;
           :_Unsigned = "true";
       float MinSignal;
       float MaxSignal;
       float MedianCnState;
       float HomFrequency;
       float HetFrequency;
       float Mosaicism;
       float LOH;
       float MedianSignal;
     } Summary(24);
  }
  ...
}

> > Are you saying that the API documentation "...this returns only the
> > variable's data in the first Structure, so that the Array shape is the
> > same as the Variable" applies to the Variable I am trying to read? (yes/no)

Yes.

Here's a snippet from the netCDF enhanced data model (aka Common Data
Model) about Structures that I think is relevant:

  "A Structure is a type of Variable that contains other Variables,
  analogous to a struct in C, or a row in a relational database. In
  general, the data in a Structure are physically stored close
  together on disk, so that it is efficient to retrieve all of the
  data in a Structure at the same time. A Variable contained in a
  Structure is a member Variable, and can only be read in the
  context of its containing Structure.
  - http://www.unidata.ucar.edu/software/netcdf-java/CDM/

netCDF has two data models:

1) The netCDF-3 data model ("classic") is made up of files,
   dimensions, attributes, and variables where the variables were
   simple multi-dimensional arrays.

2) The netCDF-4 data model ("enhanced") extends the classic model with
   groups, user defined types including structures, and a few other
   things.

Hope that helps explain how Structures fit into the data model
netCDF-Java is working from and how that might affects the API.

Ethan

[1] netCDF-Java ToolsUI
WebStart link:
http://www.unidata.ucar.edu/software/netcdf-java/v4.3/webstart/netCDFtools.jnlp
More info on netCDF-Java page:
http://www.unidata.ucar.edu/software/netcdf-java/documentation.htm


Ticket Details
===================
Ticket ID: NRW-974703
Department: Support netCDF Java
Priority: High
Status: Closed