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

[Support #ZJP-355506]: Re: netcdf4 ncendf problem



> Denis Nadeau <address@hidden> writes:
>
> > Ed,
> >
> > I get a lot of H5 errors when calling ncvdef.  I fixed the problem by
> > calling ncendf before.
> >
> > From the documentation, this is not the way it supposed to be.
> >
http://www.unidata.ucar.edu/software/netcdf/docs_beta/netcdf-f77.html#Creating-a-NetCDF-Dataset
> >
> > Here is the fix:
> >
> >          timedim = ncddef(fid, 'time', NCUNLIM, rc)
> >          if (err("Create: error defining time",rc,-31) .LT. 0) return
> >
> >          call ncendf (fid, rc)
> >          call ncredf (fid, rc)
> >    ! Define dimension variables.
> >
> >          lonid = ncvdef (fid, 'lon', NCFLOAT, 1, londim, rc)
> >          if (err("Create: error creating lon",rc,-32) .LT. 0) return
> >          latid = ncvdef (fid, 'lat', NCFLOAT, 1, latdim, rc)
> >
> > Here were the errors without the call to ncendf and ncredf.
> >
> >
> >    HDF5-DIAG: Error detected in HDF5 (1.8.2) thread 0:


Howdy Denis!

Can you get the latest snapshot and try it? I cannot reproduce this error.

I have added a test nf_test/ftst_v2.F, which is a F77 program that uses the
code that you provide. (I had to add some.)

It works, with the enddef/redef calls (or with them). If you still encounter
this problem, can you take a look at ftst_v2.F and see if you can modify it so
that it fails in the same way? Then send me the new version of ftst_v2.F and I
will change the test and fix the bug, if any.

Thanks,

Ed

Ticket Details
===================
Ticket ID: ZJP-355506
Department: Support netCDF
Priority: Critical
Status: Closed