perl interface problem, plus ncdump oddity

I've found two odd problems with NetCDF tools recently.  I suspect they are
related to compiler and perl versions, but I don't really know.

1) ----------------------------------------------------

The Perl interface issue involves values retrieved by NetCDF::recget.  The
variable is a scalar of type BYTE.  Perl always thinks it has a zero (0), even
though the value (according to ncdump and according to the people who put the
value there) is a 1 or even a 3.  When I treat the value as a string, I get
funny control characters - Perl should normally have either an empty string or
a '0' (zero) depending on the context.  This appears to be related to a
similar problem I once had - a value that actually was zero cause a coredump
when I tried operating on it, which I worked around with something like:
        perl -v -9

This problem can be observed on netcdf-perl-1.2.2, on
FreeBSD-4.8+gcc-2.95.4+perl-5.8.0, as well as on
FreeBSD-5.1+gcc-3.2.2+perl-5.6.1.

The older problem with zeroes was on netcdf-perl-1.2.1, perl version 5.6.0,
Redhat Linux 7.1 and 7.2.

2) ----------------------------------------------------

The second problem I've had is with incorrect values returned by ncdump:
time for consecutive hours expressed in Julian days is coming out as:
 time = 2452830.85694444, 14695227408.0627, 775946.000980392,
with the FreeBSD ports version of netcdf 3.5.0.  Another compile comes out
with correct versions:
 time = 2452830.85694444, 2452830.89861111, 2452830.94027778

The differences are:
Incorrect: gcc-2.95.4  (compiled under freebsd 4.7, linked to libc.so.4)
Correct:   gcc-3.2.2   (compiled under freebsd-5.1, linked to libc.so.5)

Any insight onto these would be a big help.  The issue with the Perl
interface is more pressing to me, though probably more complicated.

Thanks,
Jason Thaxter

-- 
----------------------------------------------
Jason Thaxter
GoMOOS, P.O. Box 4919, Portland, ME 04112-4919
Office Location: 1 Canal Plaza, 7th Floor
Office: 207.773.0423
Fax:    207.773.8672
Email:  thaxter@xxxxxxxxxx
------------www.gomoos.org--------------------

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