From c02f976d84e2bf4e6d38059772bfa94191fe7397 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Mon, 20 Aug 2018 17:05:29 -0600 Subject: [PATCH] more tests --- libdispatch/dparallel.c | 13 ++++++------- libdispatch/dvar.c | 3 ++- libhdf5/hdf5var.c | 2 +- nc_test4/tst_dims2.c | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libdispatch/dparallel.c b/libdispatch/dparallel.c index d42028168..578cfa920 100644 --- a/libdispatch/dparallel.c +++ b/libdispatch/dparallel.c @@ -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" diff --git a/libdispatch/dvar.c b/libdispatch/dvar.c index 8701204e0..f6daaaffa 100644 --- a/libdispatch/dvar.c +++ b/libdispatch/dvar.c @@ -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 diff --git a/libhdf5/hdf5var.c b/libhdf5/hdf5var.c index 6c91e0f7b..08e19cbce 100644 --- a/libhdf5/hdf5var.c +++ b/libhdf5/hdf5var.c @@ -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 diff --git a/nc_test4/tst_dims2.c b/nc_test4/tst_dims2.c index 616818390..94fb3ee53 100644 --- a/nc_test4/tst_dims2.c +++ b/nc_test4/tst_dims2.c @@ -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;