mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
Merge branch 'gsjaardema-max_vars_dims_cleanup'
This commit is contained in:
commit
b7455a8f0a
@ -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 */
|
||||
|
@ -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;
|
||||
|
@ -1293,7 +1293,7 @@ test_ncattdel(path)
|
||||
error("%s: ncinquire in data mode failed", pname);
|
||||
ncclose(cdfid); return ++nerrs;
|
||||
}
|
||||
vtmp.dims = (int *) emalloc(sizeof(int) * MAX_VAR_DIMS);
|
||||
vtmp.dims = (int *) emalloc(sizeof(int) * NC_MAX_VAR_DIMS);
|
||||
vtmp.name = (char *) emalloc(MAX_NC_NAME);
|
||||
if (ncvarinq(cdfid, yav_id, vtmp.name, &vtmp.type, &vtmp.ndims, vtmp.dims,
|
||||
&natts) == -1) {
|
||||
|
Loading…
Reference in New Issue
Block a user