mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-17 16:50:18 +08:00
more tests
This commit is contained in:
parent
fda87a8d5f
commit
c02f976d84
@ -1,10 +1,9 @@
|
||||
/** \file
|
||||
|
||||
This file has the parallel I/O functions which correspond to the
|
||||
serial I/O functions.
|
||||
|
||||
Copyright 2010 University Corporation for Atmospheric
|
||||
Research/Unidata. See COPYRIGHT file for more info.
|
||||
/* Copyright 2010 University Corporation for Atmospheric
|
||||
Research/Unidata. See COPYRIGHT file for more info. */
|
||||
/**
|
||||
* @file
|
||||
* @internal This file has the parallel I/O functions which correspond
|
||||
* to the serial I/O functions.
|
||||
*/
|
||||
#include "config.h"
|
||||
#include "ncdispatch.h"
|
||||
|
@ -149,7 +149,8 @@ nc_inq_ncid().
|
||||
@param ndims Number of dimensions for the variable. For example, 2
|
||||
specifies a matrix, 1 specifies a vector, and 0 means the variable is
|
||||
a scalar with no dimensions. Must not be negative or greater than the
|
||||
predefined constant ::NC_MAX_VAR_DIMS.
|
||||
predefined constant ::NC_MAX_VAR_DIMS. In netCDF-4/HDF5 files, may not
|
||||
exceed the HDF5 maximum number of dimensions (32).
|
||||
|
||||
@param dimidsp Vector of ndims dimension IDs corresponding to the
|
||||
variable dimensions. For classic model netCDF files, if the ID of the
|
||||
|
@ -261,7 +261,7 @@ NC4_def_var(int ncid, const char *name, nc_type xtype,
|
||||
|
||||
/* HDF5 allows maximum of 32 dimensions. */
|
||||
if (ndims > H5S_MAX_RANK)
|
||||
BAIL(NC_EINVAL);
|
||||
BAIL(NC_EMAXDIMS);
|
||||
|
||||
/* If it's not in define mode, strict nc3 files error out,
|
||||
* otherwise switch to define mode. This will also check that the
|
||||
|
@ -438,7 +438,7 @@ main(int argc, char **argv)
|
||||
|
||||
/* This will fail because HDF5 only allows 32 dimensions. */
|
||||
if (nc_def_var(ncid, MANY_DIM_VAR, NC_INT, NDIMS50, dimids,
|
||||
&varid) != NC_EINVAL) ERR;
|
||||
&varid) != NC_EMAXDIMS) ERR;
|
||||
if (nc_close(ncid)) ERR;
|
||||
}
|
||||
SUMMARIZE_ERR;
|
||||
|
Loading…
Reference in New Issue
Block a user