Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.
Hello, Are there missing error codes in the netcdf_constants.f90 module in v4.2 of the Fortran90 netcdf library? I'm using the "find a group by name" inquiry function, NF90_INQ_GRP_NCID(). The documentation states the following return codes may be returned by this function: NF90_NOERR - No error. NF90_EBADID - Bad group id. NF90_EINVAL - No name provided or name longer than NF90 MAX NAME. NF90_ENOGRP - Named group not found. NF90_ENOTNC4 - Attempting a netCDF-4 operation on a netCDF-3 file. NetCDF-4 operations can only be performed on files defined with a create mode which includes flag HDF5. (see Section 2.6 [NF90 OPEN], page 11). NF90_ESTRICTNC3 - This file was created with the strict netcdf-3 flag, therefore netcdf-4 operations are not allowed. (see Section 2.6 [NF90 OPEN], page 11). NF90_EHDFERR - An error was reported by the HDF5 layer. But when I test for "NF90_ENOGRP" I get a compilation error: CASE (NF90_ENOGRP) 1 Error: Symbol 'nf90_enogrp' at (1) has no IMPLICIT type And when I check the "netcdf_constants.f90" source I see ONLY the following error codes defined: ! ! error codes: ! integer, parameter, public :: & nf90_noerr = 0, & nf90_ebadid = -33, & nf90_eexist = -35, & nf90_einval = -36, & nf90_eperm = -37, & nf90_enotindefine = -38, & nf90_eindefine = -39, & nf90_einvalcoords = -40, & nf90_emaxdims = -41, & nf90_enameinuse = -42, & nf90_enotatt = -43, & nf90_emaxatts = -44, & nf90_ebadtype = -45, & nf90_ebaddim = -46, & nf90_eunlimpos = -47, & nf90_emaxvars = -48, & nf90_enotvar = -49, & nf90_eglobal = -50, & nf90_enotnc = -51, & nf90_ests = -52, & nf90_emaxname = -53, & nf90_eunlimit = -54, & nf90_enorecvars = -55, & nf90_echar = -56, & nf90_eedge = -57, & nf90_estride = -58, & nf90_ebadname = -59, & nf90_erange = -60, & nf90_enomem = -61, & nf90_evarsize = -62, & nf90_edimsize = -63, & nf90_etrunc = -64 So where did the documented error code go? grep-ing the C source I see that nc3dispatch.c has: #ifndef NC_ENOGRP #define NC_ENOGRP (-125) #endif When I define the above value in my own module, e.g. integer, parameter :: nf90_enogrp = -125 the code compiles, and when I run my unit tests printing out the inquiry function result for a missing group, nf90_stat = NF90_INQ_GRP_NCID(groupid, 'accoeff', embedid) print *, 'ACCoeff group id inquire result: ',nf90_stat I get what I sort of expected: UnitTest_Setup: netCDF Write/Read Test; CALLER: Test_SpcCoeff ACCoeff group id inquire result: -125 ACCoeff group id inquire result: -125 ACCoeff group id inquire result: -125 UnitTest_Report: Passed 3 of 3 tests Failed 0 of 3 tests Timing_Display(INFORMATION) : Elapsed time-- 00:00:00.086 So is this missing error code a bug in the fortran90 API? Or is the code somewhere else and I didn't build the library properly? I've been using the netCDF4 libraries, via the f90 API, for several weeks no with no other issues. I also notice there are other codes missing from the list in netcdf_constants.f90 that are listed in the Fortran90 documentation. Thanks for any info. cheers, paulv p.s. The versions: local/netcdf-4.3.0 : more VERSION -n 4.3.0 local/netcdff-4.2 : more VERSION -n 4.2
netcdfgroup
archives: