netcdf-c/ncdump/ncdump.h
dmh 582410a407 [NCF-273]/HZY-708311
Add a new function called nc_inq_format_extended that
returns more detailed format information (vis-a-vis
nc_inq_format) about an open dataset.

Note that the netcdf API will present the file as if it had
the format specified by nc_inq_format.  The true file
format, however, may not even be a netcdf file; it might be
DAP, HDF4, or PNETCDF, for example. This function returns
that true file type.  It also returns the effective mode for
the file.

signature: nc_inq_format_extended(int ncid, int* formatp, int* modep)
where
* ncid is the NetCDF ID from a previous call to nc_open() or
  nc_create().
* formatp is a pointer to a location for returned true format.
* modep is a pointer to a location for returned mode flags.

Refer to the actual list in the file netcdf.h to see the
currently defined set.

Also added test cases (tst_formatx*).
2013-12-22 12:53:20 -07:00

81 lines
2.8 KiB
C

/*********************************************************************
* Copyright 1993, UCAR/Unidata
* See netcdf/COPYRIGHT file for copying and redistribution conditions.
* $Header: /upc/share/CVS/netcdf-3/ncdump/ncdump.h,v 1.34 2009/12/02 20:03:43 russ Exp $
*********************************************************************/
#ifndef _NCDUMP_H_
#define _NCDUMP_H_
typedef
enum {LANG_C, LANG_F} Nclang;
typedef struct { /* specification for how to format dump */
char *name; /* name specified with -n or derived from
* file name */
bool_t header_only; /* if true, don't print any variable data */
bool_t coord_vals; /* if true, print header and coordinate
* dimension values (values of variables
* that are also dimensions), but no other
* variable data */
bool_t brief_data_cmnts; /* if true, put // comments in data section
* identifying variable and indices, useful
* for navigating through large
* multi-dimensional data lists. */
bool_t full_data_cmnts; /* if true, put // comments in data section
* identifying every value, useful for
* navigating through large
* multi-dimensional data lists. */
bool_t string_times; /* if true, output date-time values as
* human-readable strings. */
bool_t iso_separator; /* if true, use 'T' separator between
* date and time components of
* human-readable strings, otherwise
* use ' ' */
bool_t special_atts; /* if true, output special attributes
* for optimization characteristics:
* _Compression, _Chunking,
* _Endianness, _Format, _Checksum,
* _NoFill */
Nclang data_lang; /* Specifies index conventions used in data
* comments, either LANG_C (C, 0-based,
* column major) or LANG_F (Fortran,
* 1-based, row major) */
bool_t with_cache; /* For DAP URLs, get data with client-side
* caching when each variable is first accessed */
int nlvars; /* Number of variables specified with -v
* option on command line */
char** lvars; /* list of variable names specified with -v
* option on command line */
int nlgrps; /* Number of groups specified with -g
* option on command line */
char** lgrps; /* list of group names specified with -g
* option on command line */
idnode_t* grpids; /* list of grpids matching list specified with -g option */
int nc_kind; /* kind of netCDF file named on
* command line, 1 (classic), 2
* (64-bit offset), 3 (netCDF-4), 4
* (netCDF-4 classic model) */
int nc_extended; /* extended format info fornetCDF file named
* on command line.
*/
int nc_mode; /* mode as reported by inq_format_extended */
} fspec_t;
#endif /*_NCDUMP_H_ */