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

[netCDFPerl #DPK-277567]: netcdf-perl and netCDF 4



Andrew,

> We have installed the netcdf-perl module and netCDF-4 on one of our RH
> Linux machines.  Your web site claims that this perl module will work with
> netCDF-3, but I could not find any statement on expected compatibility with
> netCDF-4.

My understanding is that the netCDF-4 is intended to be backward-compatible 
with netCDF-3, so the NetCDF-Perl module should work.

> In testing, we have found that when we  open, read, then close  a netCDF
> file, and then do that again-and-again through a LARGE loop, eventually we
> run out of positive NetCDF IDs (ncids), and they become negative.  Even
> though each file is closed after reading, and there is at most one file
> open at a time, the software does not seem to re-use NetCDF IDs.  Here is
> what's interesting:  the returned NetCDF IDs become negative after we have
> read-in 32767 files, which is the max value for a signed  (16-bit) short
> integer.

Interesting! I did not know that.

The NetCDF-Perl module simply returns the value from the ncopen(3) function 
(which returns an "int") as an "int" -- so this "rollover" must be due to the 
netCDF package.

> So, having explained this behavior, does (or should) this perl module work
> with netCDF-4?

It should.

> Could we have an installation problem or other issue on our end?

I doubt it.

> Are negative netCDF IDs really indicative of a problem?

I don't know. I've forwarded this issue to the netCDF team. Hopefully, you'll 
hear from them soon.

> From other applications, we have confidence that all of our files are
> well-formed netCDF files containing good data.
> 
> We have never seen this behavior using this perl module along with netCDF-3.
> 
> Thank you for your help,
> 
> -Andy
> 
> ---
> address@hidden
> NOAA/OAR/ESRL/GSD/ACE  R/GSD5
> 325 Broadway  Boulder, CO  80305-3328
> phone:303-497-6211   fax:303-497-6301

Regards,
Steve Emmerson

Ticket Details
===================
Ticket ID: DPK-277567
Department: Support netCDF
Priority: Normal
Status: Closed


NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.