for more information.
This commit is contained in:
Ward Fisher 2016-04-28 16:07:09 -06:00
commit 50623159d4
3 changed files with 150 additions and 131 deletions

View File

@ -2306,7 +2306,7 @@ NCD2_rename_dim(int ncid, int dimid, const char* name)
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = nc_rename_dim(getnc3id(drno), dimid, name);
ret = nc_rename_dim(getnc3id(drno), dimid, name);
return THROW(ret);
}
@ -2321,7 +2321,7 @@ NCD2_inq_att(int ncid, int varid, const char* name,
return THROW(ret);
}
int
int
NCD2_inq_attid(int ncid, int varid, const char *name, int *idp)
{
NC* drno;
@ -2372,21 +2372,21 @@ NCD2_get_att(int ncid, int varid, const char* name, void* value, nc_type t)
}
int
NCD2_inq_var_all(int ncid, int varid, char *name, nc_type* xtypep,
int* ndimsp, int* dimidsp, int* nattsp,
NCD2_inq_var_all(int ncid, int varid, char *name, nc_type* xtypep,
int* ndimsp, int* dimidsp, int* nattsp,
int* shufflep, int* deflatep, int* deflate_levelp,
int* fletcher32p, int* contiguousp, size_t* chunksizesp,
int* no_fill, void* fill_valuep, int* endiannessp,
int* fletcher32p, int* contiguousp, size_t* chunksizesp,
int* no_fill, void* fill_valuep, int* endiannessp,
int* options_maskp, int* pixels_per_blockp)
{
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = NCDISPATCH_inq_var_all(getnc3id(drno), varid, name, xtypep,
ndimsp, dimidsp, nattsp,
ret = NCDISPATCH_inq_var_all(getnc3id(drno), varid, name, xtypep,
ndimsp, dimidsp, nattsp,
shufflep, deflatep, deflate_levelp,
fletcher32p, contiguousp, chunksizesp,
no_fill, fill_valuep, endiannessp,
fletcher32p, contiguousp, chunksizesp,
no_fill, fill_valuep, endiannessp,
options_maskp, pixels_per_blockp);
return THROW(ret);
}
@ -2417,6 +2417,9 @@ NCD2_var_par_access(int ncid, int p2, int p3)
return THROW(NC_ENOPAR);
}
#ifdef USE_NETCDF4
EXTERNL int
NCD2_inq_ncid(int ncid, const char* name, int* grp_ncid)
{
@ -2427,6 +2430,15 @@ NCD2_inq_ncid(int ncid, const char* name, int* grp_ncid)
return THROW(ret);
}
NCD2_show_metadata(int ncid)
{
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = nc_show_metadata(getnc3id(drno));
return THROW(ret);
}
int
NCD2_inq_grps(int ncid, int* p2, int* p3)
{
@ -2447,6 +2459,17 @@ NCD2_inq_grpname(int ncid, char* p)
return THROW(ret);
}
int
NCD2_inq_unlimdims(int ncid, int* p2, int* p3)
{
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = nc_inq_unlimdims(getnc3id(drno), p2, p3);
return THROW(ret);
}
int
NCD2_inq_grpname_full(int ncid, size_t* p2, char* p3)
{
@ -2506,7 +2529,7 @@ NCD2_inq_typeids(int ncid, int* ntypes, int* p)
ret = nc_inq_typeids(getnc3id(drno), ntypes, p);
return THROW(ret);
}
int
NCD2_inq_type_equal(int ncid, nc_type t1, int p3, nc_type t2, int* p5)
{
@ -2579,7 +2602,7 @@ NCD2_insert_compound(int ncid, nc_type t1, const char* p3, size_t p4, nc_type t2
}
int
NCD2_insert_array_compound(int ncid, nc_type t1, const char* p3, size_t p4,
NCD2_insert_array_compound(int ncid, nc_type t1, const char* p3, size_t p4,
nc_type t2, int p6, const int* p7)
{
NC* drno;
@ -2762,23 +2785,4 @@ NCD2_get_var_chunk_cache(int ncid, int p2, size_t* p3, size_t* p4, float* p5)
return THROW(ret);
}
int
NCD2_inq_unlimdims(int ncid, int* p2, int* p3)
{
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = nc_inq_unlimdims(getnc3id(drno), p2, p3);
return THROW(ret);
}
int
NCD2_show_metadata(int ncid)
{
NC* drno;
int ret;
if((ret = NC_check_id(ncid, (NC**)&drno)) != NC_NOERR) return THROW(ret);
ret = nc_show_metadata(getnc3id(drno));
return THROW(ret);
}
#endif // USE_NETCDF4

View File

@ -1,9 +1,9 @@
/*
* Copyright 1993-1996 University Corporation for Atmospheric Research/Unidata
*
* Portions of this software were developed by the Unidata Program at the
*
* Portions of this software were developed by the Unidata Program at the
* University Corporation for Atmospheric Research.
*
*
* Access and use of this software shall impose the following obligations
* and understandings on the user. The user is granted the right, without
* any fee or cost, to use, copy, modify, alter, enhance and distribute
@ -20,7 +20,7 @@
* any support, consulting, training or assistance of any kind with regard
* to the use, operation and performance of this software nor to provide
* the user with any updates, revisions, new versions or "bug fixes."
*
*
* THIS SOFTWARE IS PROVIDED BY UCAR/UNIDATA "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
@ -37,6 +37,7 @@
#include <stddef.h> /* size_t, ptrdiff_t */
#include "netcdf.h"
#include "ncdispatch.h"
#include "config.h"
#if defined(__cplusplus)
extern "C" {
@ -99,7 +100,7 @@ EXTERNL int
NCD2_inq_att(int ncid, int varid, const char *name,
nc_type *xtypep, size_t *lenp);
EXTERNL int
EXTERNL int
NCD2_inq_attid(int ncid, int varid, const char *name, int *idp);
EXTERNL int
@ -129,19 +130,19 @@ NCD2_def_var(int ncid, const char *name,
nc_type xtype, int ndims, const int *dimidsp, int *varidp);
EXTERNL int
NCD2_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
NCD2_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
int *shufflep, int *deflatep, int *deflate_levelp,
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
int *no_fill, void *fill_valuep, int *endiannessp,
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
int *no_fill, void *fill_valuep, int *endiannessp,
int *options_maskp, int *pixels_per_blockp);
EXTERNL int
NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
NC3_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
int *ndimsp, int *dimidsp, int *nattsp,
int *shufflep, int *deflatep, int *deflate_levelp,
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
int *no_fill, void *fill_valuep, int *endiannessp,
int *fletcher32p, int *contiguousp, size_t *chunksizesp,
int *no_fill, void *fill_valuep, int *endiannessp,
int *options_maskp, int *pixels_per_blockp);
EXTERNL int
@ -152,120 +153,131 @@ NCD2_rename_var(int ncid, int varid, const char *name);
/* End _var */
/* netCDF4 API only */
EXTERNL int
NCD2_var_par_access(int, int, int);
EXTERNL int
NCD2_inq_ncid(int, const char *, int *);
/* netCDF4 API only */
#ifdef USE_NETCDF4
EXTERNL int
NCD2_inq_ncid(int, const char *, int *);
EXTERNL int
NCD2_inq_grps(int, int *, int *);
EXTERNL int
NCD2_inq_grps(int, int *, int *);
EXTERNL int
NCD2_inq_grpname(int, char *);
EXTERNL int
NCD2_inq_grpname(int, char *);
EXTERNL int
NCD2_inq_grpname_full(int, size_t *, char *);
EXTERNL int
NCD2_inq_grpname_full(int, size_t *, char *);
EXTERNL int
NCD2_inq_grp_parent(int, int *);
EXTERNL int
NCD2_inq_grp_parent(int, int *);
EXTERNL int
NCD2_inq_grp_full_ncid(int, const char *, int *);
EXTERNL int
NCD2_inq_grp_full_ncid(int, const char *, int *);
EXTERNL int
NCD2_inq_varids(int, int * nvars, int *);
EXTERNL int
NCD2_inq_varids(int, int * nvars, int *);
EXTERNL int
NCD2_inq_dimids(int, int * ndims, int *, int);
EXTERNL int
NCD2_inq_dimids(int, int * ndims, int *, int);
EXTERNL int
NCD2_inq_typeids(int, int * ntypes, int *);
EXTERNL int
NCD2_inq_type_equal(int, nc_type, int, nc_type, int *);
EXTERNL int
NCD2_inq_typeids(int, int * ntypes, int *);
EXTERNL int
NCD2_def_grp(int, const char *, int *);
EXTERNL int
NCD2_inq_type_equal(int, nc_type, int, nc_type, int *);
EXTERNL int
NCD2_rename_grp(int, const char *);
EXTERNL int
NCD2_rename_grp(int, const char *);
EXTERNL int
NCD2_inq_user_type(int, nc_type, char *, size_t *, nc_type *,
size_t *, int *);
EXTERNL int
NCD2_inq_user_type(int, nc_type, char *, size_t *, nc_type *,
size_t *, int *);
EXTERNL int
NCD2_def_compound(int, size_t, const char *, nc_type *);
EXTERNL int
NCD2_insert_compound(int, nc_type, const char *, size_t, nc_type);
EXTERNL int
NCD2_insert_compound(int, nc_type, const char *, size_t, nc_type);
EXTERNL int
NCD2_insert_array_compound(int, nc_type, const char *, size_t,
nc_type, int, const int *);
EXTERNL int
NCD2_insert_array_compound(int, nc_type, const char *, size_t,
nc_type, int, const int *);
EXTERNL int
NCD2_inq_typeid(int, const char *, nc_type *);
EXTERNL int
NCD2_inq_typeid(int, const char *, nc_type *);
EXTERNL int
NCD2_inq_compound_field(int, nc_type, int, char *, size_t *,
nc_type *, int *, int *);
EXTERNL int
NCD2_inq_compound_field(int, nc_type, int, char *, size_t *,
nc_type *, int *, int *);
EXTERNL int
NCD2_inq_compound_fieldindex(int, nc_type, const char *, int *);
EXTERNL int
NCD2_inq_compound_fieldindex(int, nc_type, const char *, int *);
EXTERNL int
NCD2_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
EXTERNL int
NCD2_def_vlen(int, const char *, nc_type base_typeid, nc_type *);
EXTERNL int
NCD2_put_vlen_element(int, int, void *, size_t, const void *);
EXTERNL int
NCD2_put_vlen_element(int, int, void *, size_t, const void *);
EXTERNL int
NCD2_get_vlen_element(int, int, const void *, size_t *, void *);
EXTERNL int
NCD2_get_vlen_element(int, int, const void *, size_t *, void *);
EXTERNL int
NCD2_insert_enum(int, nc_type, const char *, const void *);
EXTERNL int
NCD2_def_enum(int, nc_type, const char *, nc_type *);
EXTERNL int
NCD2_inq_enum_member(int, nc_type, int, char *, void *);
EXTERNL int
NCD2_insert_enum(int, nc_type, const char *, const void *);
EXTERNL int
NCD2_inq_enum_ident(int, nc_type, long long, char *);
EXTERNL int
NCD2_inq_enum_member(int, nc_type, int, char *, void *);
EXTERNL int
NCD2_def_var_deflate(int, int, int, int, int);
EXTERNL int
NCD2_inq_enum_ident(int, nc_type, long long, char *);
EXTERNL int
NCD2_def_var_fletcher32(int, int, int);
EXTERNL int
NCD2_def_opaque(int, size_t, const char *, nc_type *);
EXTERNL int
NCD2_def_var_chunking(int, int, int, const size_t *);
EXTERNL int
NCD2_def_var_deflate(int, int, int, int, int);
EXTERNL int
NCD2_def_var_fill(int, int, int, const void *);
EXTERNL int
NCD2_def_var_fletcher32(int, int, int);
EXTERNL int
NCD2_def_var_endian(int, int, int);
EXTERNL int
NCD2_def_var_chunking(int, int, int, const size_t *);
EXTERNL int
NCD2_inq_unlimdims(int, int *, int *);
EXTERNL int
NCD2_def_var_fill(int, int, int, const void *);
EXTERNL int
NCD2_show_metadata(int);
EXTERNL int
NCD2_def_var_endian(int, int, int);
EXTERNL int
NCD2_def_compound(int, size_t, const char *, nc_type *);
EXTERNL int
NCD2_def_enum(int, nc_type, const char *, nc_type *);
EXTERNL int
NCD2_def_grp(int, const char *, int *);
EXTERNL int
NCD2_def_opaque(int, size_t, const char *, nc_type *);
EXTERNL int
NCD2_set_var_chunk_cache(int, int, size_t, size_t, float);
EXTERNL int
NCD2_set_var_chunk_cache(int, int, size_t, size_t, float);
EXTERNL int
NCD2_get_var_chunk_cache(int, int, size_t *, size_t *, float *);
EXTERNL int
NCD2_inq_unlimdims(int, int *, int *);
EXTERNL int
NCD2_show_metadata(int);
#endif //USE_NETCDF4
extern int NCD2_initialize(void);

View File

@ -124,15 +124,6 @@ ENDIF()
ENDIF(USE_NETCDF4)
ENDIF(BUILD_DISKLESS)
###
# This test fails on Visual Studio builds with bash.
# It passes, but technically fails because the scientific
# formatting omits a 0.
###
IF(EXTRA_TESTS AND NOT MSVC)
add_sh_test(ncdump run_back_comp_tests)
ENDIF()
IF(USE_NETCDF4)
add_bin_test(ncdump tst_create_files)
add_bin_test(ncdump tst_group_data)
@ -152,11 +143,21 @@ ENDIF()
add_bin_test_no_prefix(tst_compress)
add_bin_test_no_prefix(tst_chunking)
###
# This test fails on Visual Studio builds with bash.
# It passes, but technically fails because the scientific
# formatting omits a 0.
###
IF(EXTRA_TESTS AND NOT MSVC)
add_sh_test(ncdump run_back_comp_tests)
ENDIF()
# Known failure on MSVC; the number of 0's padding
# is different, but the result is actually correct.
#IF(NOT MSVC)
add_sh_test(ncdump tst_netcdf4)
add_bin_test(ncdump tst_h_rdc0)
add_sh_test(ncdump tst_netcdf4)
add_bin_test(ncdump tst_h_rdc0)
#ENDIF()
add_bin_test(ncdump tst_unicode)
@ -168,6 +169,8 @@ ENDIF()
add_sh_test(ncdump tst_netcdf4_4)
ENDIF()
IF(NOT MSVC)
add_sh_test(ncdump tst_nccopy4)
ENDIF()