Doxygen Source Code Documentation
ncdump.h
Go to the documentation of this file.00001 /********************************************************************* 00002 * Copyright 1993, UCAR/Unidata 00003 * See netcdf/COPYRIGHT file for copying and redistribution conditions. 00004 * $Header: /misc/elrond0/share/cvs/AFNI/src/netcdf-3.5.0/src/ncdump/ncdump.h,v 1.6 2004/04/02 15:12:42 rwcox Exp $ 00005 *********************************************************************/ 00006 00007 00008 /* error checking macro */ 00009 #define NC_CHECK(status) {\ 00010 int nc_status = status;\ 00011 if(nc_status != NC_NOERR)\ 00012 error(nc_strerror(nc_status));\ 00013 } 00014 00015 #define Printf (void) printf 00016 00017 /* #if !defined(__cplusplus) || !defined(c_plusplus) */ 00018 #if 0 00019 typedef int boolean; 00020 enum {false=0, true=1}; 00021 #else 00022 typedef bool boolean; 00023 #endif 00024 00025 struct ncdim { /* dimension */ 00026 char name[NC_MAX_NAME]; 00027 size_t size; 00028 }; 00029 00030 struct ncvar { /* variable */ 00031 char name[NC_MAX_NAME]; 00032 nc_type type; 00033 int ndims; 00034 int dims[MAX_VAR_DIMS]; 00035 int natts; 00036 boolean has_fillval; 00037 double fillval; 00038 }; 00039 00040 struct ncatt { /* attribute */ 00041 int var; 00042 char name[NC_MAX_NAME]; 00043 nc_type type; 00044 size_t len; 00045 char *string; /* for text attributes (type = NC_CHAR) */ 00046 double *vals; /* for numeric attributes of all types */ 00047 }; 00048 00049 typedef 00050 enum {LANG_C, LANG_F} Nclang; 00051 00052 struct fspec { /* specification for how to format dump */ 00053 00054 char *name; /* name specified with -n or derived from 00055 * file name */ 00056 00057 boolean header_only; /* if true, don't print any variable data */ 00058 00059 boolean coord_vals; /* if true, print header and coordinate 00060 * dimension values (values of variables 00061 * that are also dimensions), but no other 00062 * variable data */ 00063 00064 boolean brief_data_cmnts; /* if true, put // comments in data section 00065 * identifying variable and indices, useful 00066 * for navigating through large 00067 * multi-dimensional data lists. */ 00068 00069 boolean full_data_cmnts; /* if true, put // comments in data section 00070 * identifying every value, useful for 00071 * navigating through large 00072 * multi-dimensional data lists. */ 00073 00074 Nclang data_lang; /* Specifies index conventions used in data 00075 * comments, either LANG_C (C, 0-based, 00076 * column major) or LANG_F (Fortran, 00077 * 1-based, row major) */ 00078 00079 int nlvars; /* Number of variables specified with -v 00080 * option on command line */ 00081 00082 char** lvars; /* list of variable names specified with -v 00083 * option on command line */ 00084 };