This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> I'm using netcdf-4.0-snapshot2008042720. > > I've been trying to convert the ftst_vars.F program to use the F90 > interface and struck a problem with nf90_inq_var_chunking. In the > example nf_inq_var_chunking returns an array > > The f77 documentation says > > NF_INQ_VAR_CHUNKING(INTEGER NCID, INTEGER VARID, INTEGER CONTIGUOUS, INTEGER CHUNKSIZES); > > ... > || > |CHUNKSIZES| > An array of chunk sizes. The array must have the one chunksize for > each dimension in the variable. > > I think the last sentence is trying to say that the chunksizes array > must have length equal to the number of dimensions of the variable. > > However in netcdf4_func.f90 the function is defined with a scalar rather > than an array argument > > function nf90_inq_var_chunking(ncid, varid, contiguous, chunksizes) > integer, intent(in) :: ncid > integer, intent(in) :: varid > integer, intent(out) :: contiguous > integer, intent(out) :: chunksizes > integer :: nf90_inq_var_chunking > > nf90_inq_var_chunking = nf_inq_var_chunking(ncid, varid, contiguous, > chunksizes) > end function nf90_inq_var_chunking > > If I change this to > integer, dimension(:), intent(out) :: chunksizes > it works as expected. > > Regards > > Martin Dix > > > Howdy Martin! Thanks for pointing this out. I made the change you suggest and also fixed the documentation. Also I added a test for this one. Thanks! Ed Ticket Details =================== Ticket ID: CQM-787807 Department: Support netCDF Priority: Normal Status: Closed