mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
moving function
This commit is contained in:
parent
148706b657
commit
c9eca4bbca
@ -839,6 +839,47 @@ NC4_def_var_quantize(int ncid, int varid, int quantize_mode, int nsd)
|
||||
&quantize_mode, &nsd);
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Get quantize information about a variable. Pass NULL for
|
||||
* whatever you don't care about.
|
||||
*
|
||||
* @param ncid File ID.
|
||||
* @param varid Variable ID.
|
||||
* @param quantize_modep Gets quantize mode.
|
||||
* @param nsdp Gets Number of Significant Digits if quantize is in use.
|
||||
*
|
||||
* @returns ::NC_NOERR No error.
|
||||
* @returns ::NC_EBADID Bad ncid.
|
||||
* @returns ::NC_ENOTVAR Bad varid.
|
||||
* @returns ::NC_EINVAL Invalid input.
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
NC4_inq_var_quantize(int ncid, int varid, int *quantize_modep,
|
||||
int *nsdp)
|
||||
{
|
||||
NC_VAR_INFO_T *var;
|
||||
int retval;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x varid %d", __func__, ncid, varid));
|
||||
|
||||
/* Find info for this file and group, and set pointer to each. */
|
||||
/* Get pointer to the var. */
|
||||
if ((retval = nc4_hdf5_find_grp_h5_var(ncid, varid, NULL, NULL, &var)))
|
||||
return retval;
|
||||
if (!var)
|
||||
return NC_ENOTVAR;
|
||||
assert(var->hdr.id == varid);
|
||||
|
||||
/* Copy the data to the user's data buffers. */
|
||||
if (quantize_modep)
|
||||
*quantize_modep = var->quantize_mode;
|
||||
if (nsdp)
|
||||
*nsdp = var->nsd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#if 0
|
||||
/**
|
||||
* @internal Remove a filter from filter list for a variable
|
||||
|
@ -272,47 +272,6 @@ NC4_inq_var_all(int ncid, int varid, char *name, nc_type *xtypep,
|
||||
return NC_NOERR;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Get quantize information about a variable. Pass NULL for
|
||||
* whatever you don't care about.
|
||||
*
|
||||
* @param ncid File ID.
|
||||
* @param varid Variable ID.
|
||||
* @param quantize_modep Gets quantize mode.
|
||||
* @param nsdp Gets Number of Significant Digits if quantize is in use.
|
||||
*
|
||||
* @returns ::NC_NOERR No error.
|
||||
* @returns ::NC_EBADID Bad ncid.
|
||||
* @returns ::NC_ENOTVAR Bad varid.
|
||||
* @returns ::NC_EINVAL Invalid input.
|
||||
* @author Ed Hartnett
|
||||
*/
|
||||
int
|
||||
NC4_inq_var_quantize(int ncid, int varid, int *quantize_modep,
|
||||
int *nsdp)
|
||||
{
|
||||
NC_VAR_INFO_T *var;
|
||||
int retval;
|
||||
|
||||
LOG((2, "%s: ncid 0x%x varid %d", __func__, ncid, varid));
|
||||
|
||||
/* Find info for this file and group, and set pointer to each. */
|
||||
/* Get pointer to the var. */
|
||||
if ((retval = nc4_hdf5_find_grp_h5_var(ncid, varid, NULL, NULL, &var)))
|
||||
return retval;
|
||||
if (!var)
|
||||
return NC_ENOTVAR;
|
||||
assert(var->hdr.id == varid);
|
||||
|
||||
/* Copy the data to the user's data buffers. */
|
||||
if (quantize_modep)
|
||||
*quantize_modep = var->quantize_mode;
|
||||
if (nsdp)
|
||||
*nsdp = var->nsd;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* @internal Inquire about chunking settings for a var. This is used
|
||||
* by the fortran API.
|
||||
|
Loading…
Reference in New Issue
Block a user