Re: [netcdfgroup] Scipy netcdf issue

The file is corrupted. I ran it against ncvalidator and got the following 
errors.

% ncvalidator  minc1-no-att.mnc
Error - variable begin offset orders:
        var "rootvariable" begin offset (2840) is less than previous variable 
"study" end offset (6876)
File "minc1-no-att.mnc" fails to conform with classic CDF file format 
specifications

Running it against ncoffsets shows starting file offsets of all variables below.
% ncoffsets minc1-no-att.mnc 
netcdf minc1-no-att.mnc {
// file format: CDF-1

file header:
        size   = 2836 bytes
        extent = 6872 bytes

dimensions:
        zspace = 10
        yspace = 20
        xspace = 20

fixed-size variables:
        int    study:
               start file offset =        6872
               end   file offset =        6876
        int    rootvariable:
               start file offset =        2840
               end   file offset =        2844
        int    zspace:
               start file offset =        2844
               end   file offset =        2848
        int    yspace:
               start file offset =        2848
               end   file offset =        2852
        int    xspace:
               start file offset =        2852
               end   file offset =        2856
        double image-max:
               start file offset =        2856
               end   file offset =        2864
        double image-min:
               start file offset =        2864
               end   file offset =        2872
        byte   image(zspace, yspace, xspace):
               start file offset =        2872
               end   file offset =        6872
}


ncvalidator and ncoffsets are two utility programs available from PnetCDF 
package.
It can be compiled independently from PnetCDF with just gcc command.

Wei-keng

> On Jun 22, 2018, at 7:03 PM, Dave Allured - NOAA Affiliate 
> <dave.allured@xxxxxxxx> wrote:
> 
> Roy,
> 
> I think you had a bad download.  I got a valid netcdf-3 file, 
> minc1-no-att.mnc, 6872 bytes.  The full ncdump output is attached.  I had to 
> add -O and quoting to the curl command as originally shown, and remove the 
> extra file name.
> 
> I have no clue as to the original issue with scipy.
> 
> --Dave
> 
> 
> On Fri, Jun 22, 2018 at 5:19 PM, Roy Mendelssohn - NOAA Federal 
> <roy.mendelssohn@xxxxxxxx> wrote:
> I downloaded the file.  the standard "ncdump" from the netcdf library does 
> not view the file as a valid netcdf file.  Therein lies your problem.
> 
> -Roy
> 
> 
> > On Jun 22, 2018, at 3:27 PM, Ankur Sinha <sanjay.ankur@xxxxxxxxx> wrote:
> > 
> > Hello,
> > 
> > While building nibabel for Fedora, we noticed a few tests failing when
> > nibabel uses scipy.netcdf[1]. As the nibabel developers say there, the
> > error does not occur with nibabel's bundled copy of netcdf.py, but it is
> > easily reproducible with scipy's version:
> > 
> > curl -L 
> > https://github.com/nipy/nibabel/blob/master/nibabel/tests/data/minc1-no-att.mnc?raw=true
> >  minc1-no-att.mnc
> > python -c 'import scipy.io as sio; sio.netcdf_file("minc1-no-att.mnc")'
> > 
> > Would someone please be able to have a look at the scipy issue[2] and
> > provide some hints on where the bug may be? Unfortunately, we're not
> > too well versed with netcdf to diagnose the issue ourselves.
> > 
> > [1] https://github.com/nipy/nibabel/issues/579
> > [2] https://github.com/scipy/scipy/issues/8153
> > 
> > -- 
> > Thanks,
> > Regards,
> > 
> > Ankur Sinha "FranciscoD"
> > 
> > https://fedoraproject.org/wiki/User:Ankursinha
> <minc1-no-att.mnc.txt>_______________________________________________
> NOTE: All exchanges posted to Unidata maintained email lists are
> recorded in the Unidata inquiry tracking system and made publicly
> available through the web.  Users who post to any of the lists we
> maintain are reminded to remove any personal information that they
> do not want to be made public.
> 
> 
> netcdfgroup mailing list
> netcdfgroup@xxxxxxxxxxxxxxxx
> For list information or to unsubscribe,  visit: 
> http://www.unidata.ucar.edu/mailing_lists/ 



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