Update comments related to NC_MAX_VARS and NC_MAX_DIMS

This commit is contained in:
Greg Sjaardema 2015-11-30 10:28:06 -05:00
parent d8733e501b
commit 724453b113
2 changed files with 9 additions and 3 deletions

View File

@ -345,7 +345,12 @@ The specified corner indices were out of range for the rank of the
specified variable. For example, a negative index or an index that is
larger than the corresponding dimension length will cause an error. */
#define NC_EINVALCOORDS (-40)
#define NC_EMAXDIMS (-41) /**< NC_MAX_DIMS exceeded */
/** NC_MAX_DIMS exceeded. Max number of dimensions exceeded in a
classic or 64-bit offset file, or an netCDF-4 file with
::NC_CLASSIC_MODEL on. */
#define NC_EMAXDIMS (-41)
#define NC_ENAMEINUSE (-42) /**< String match to name in use */
#define NC_ENOTATT (-43) /**< Attribute not found */
#define NC_EMAXATTS (-44) /**< NC_MAX_ATTRS exceeded */

View File

@ -61,8 +61,9 @@ int main(int argc, char **argv)
/* create new file */
if (nc_create(FILE_NAME, NC_NETCDF4, &ncid)) ERR;
/* create N variables, printing time after every 1000. Because only
* NC_MAX_VARS are permitted per group, create the necessary number
/* create N variables, printing time after every 1000.
* Put NC_MAX_VARS variables per group (even though netcdf4 non-classic
* format does not limit variable count), create the necessary number
* of groups to hold nitem variables. */
numvar = nitem;
v = 1;