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

20000816: varget problem: segmentation fault



Bill,

>Date: Wed, 16 Aug 2000 13:46:33 -0700
>From: "William R Moninger" <address@hidden>
>Organization: NOAA/FSL
>To: Steve Emmerson <address@hidden>
>Subject: Re: 20000816: varget problem: segmentation fault
>Keywords: 200008161736.e7GHaON16062

The above message contained the following:

> netcdf 0008161700 {
> dimensions:
>       Num_IcgPireps = 4 ;
...
> variables:
...
>       int date(Num_IcgPireps) ;
>               date:long_name = "Year/Month/Day of Pirep" ;
>               date:units = "YYMMDD" ;
...
> data:
...
>  date = 816, 816, 816, 816 ;
...
> }

I have to admit, I don't see what the problem could be.

I suggest that you add code to test the "diminq" and "varid", e.g.

    NetCDF::diminq($ncid,0,$dname,$dlen) == 0 || die "diminq failure\n";
    ...
    my $date_id = NetCDF::varid($ncid,"date");
    $date_id >= 0 || die "varid failure\n";

Regards,
Steve Emmerson   <http://www.unidata.ucar.edu>