Re: [netcdfgroup] files with compound types not portable?



Following up on my previous message, h5dump does display the data correctly on both systems (but ncdump does not).

-Jeff

I created a file with a nested compound type on a 64 bit linux box. Here's the output of ncdump on the linux machine:

nnetcdf test {
types:
 compound cmp1 {
   short i ;
   int j ;
 }; // cmp1
 compound cmp2 {
   float x ;
   double y(3, 2) ;
 }; // cmp2
 compound cmp3 {
   cmp1 xx ;
   cmp2 yy ;
 }; // cmp3
dimensions:
       phony_dim = 1 ;
variables:
       cmp3 phony_compound_var(phony_dim) ;
data:

phony_compound_var =
{{20000, 300000}, {100000, {-100000.028899567, -100000, -100000, -100000, -100000, -100000}}} ;
}

Copying the file over to MacOS X and running ncdump there gives:

netcdf test {
types:
 compound cmp1 {
   short i ;
   int j ;
 }; // cmp1
 compound cmp2 {
   float x ;
   double y(3, 2) ;
 }; // cmp2
 compound cmp3 {
   cmp1 xx ;
   cmp2 yy ;
 }; // cmp3
dimensions:
       phony_dim = 1 ;
variables:
       cmp3 phony_compound_var(phony_dim) ;
data:

phony_compound_var =
{{20000, 300000}, {100000, {1.59954026355845e-314, 1.59954026355845e-314, 1.59954026355845e-314, 1.59954026355845e-314, 1.59954026355845e-314, 2.42435159293081e-154}}} ;
}

This is with netcdf 4.0.1 and hdf5 1.8.2 in both places. I've put the netcdf file at ftp://ftp.cdc.noaa.gov/Public/jwhitaker/test.nc.

ncdump should give the same result both places, shouldn't it?

-Jeff



--
Jeffrey S. Whitaker         Phone  : (303)497-6313
Meteorologist               FAX    : (303)497-6449
NOAA/OAR/PSD  R/PSD1        Email  : Jeffrey.S.Whitaker@xxxxxxxx
325 Broadway                Office : Skaggs Research Cntr 1D-113
Boulder, CO, USA 80303-3328 Web    : http://tinyurl.com/5telg



  • 2009 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: