NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.


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

971014: netcdf 3.3.1: no unlimited dimension is 0 not -1?



John,

>Date: Mon, 13 Oct 1997 16:26:18 -0700 (PDT) 
>From: "John R. Tannahill" <address@hidden>
>Organization: Lawrence Livermore National Laboratory
>To: address@hidden
>Subject: netcdf 3.3.1 
>Keywords: 199710132326.RAA15105 

In the above message, you wrote:

> I am running a fortran code on an sgi origin multiprocessing machine, where
> uname -a gives:  IRIX64 turing 6.4-root-1263875500 06162259 IP27.  I just
> installed version 3.3.1 of netcdf.  I have a chunk of code as follows:
> 
>       call Ncop_Rd (ncid_co, const_infile_name)
>  
>       call Ncinq (ncid_co, ndims, nvars, natts, recdim, ierr)
> 
>       if (recdim .eq. -1) then
>         has_rec_dim = .false.
>       else
>         has_rec_dim = .true.
>       end if
> 
> It appears that zero is being returned when there is no unlimited dimension.
> I changed the first line of the if test to:
> 
>   if ((recdim .eq. -1) .or. (recdim .eq. 0)) then,
> 
> and things work fine.  The version 3 netcdf documentation says that it should
> return a -1.  Is this a known bug?

That bug wasn't known at all.  Thanks for reporting it.

I'll fix it and incorporate the fix in the next release.  In the
meantime, I suggest that you code as follows:

    if (recdim .lt. 1) then

This will work regardless of the bug.

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