00001 #ifndef NC_NCGEN_H 00002 #define NC_NCGEN_H 00003 /********************************************************************* 00004 * Copyright 1993, UCAR/Unidata 00005 * See netcdf/COPYRIGHT file for copying and redistribution conditions. 00006 * $Header: /upc/share/CVS/netcdf-3/ncgen/ncgen.h,v 1.8 1997/07/07 18:27:04 russ Exp $ 00007 *********************************************************************/ 00008 00009 #define MAX_NC_ATTSIZE 20000 /* max size of attribute (for ncgen) */ 00010 #define MAXTRST 5000 /* max size of string value (for ncgen) */ 00011 00012 #include "generic.h" 00013 00014 extern int ncid; /* handle for netCDF */ 00015 extern int ndims; /* number of dimensions declared for netcdf */ 00016 extern int nvars; /* number of variables declared for netcdf */ 00017 extern int natts; /* number of attributes */ 00018 extern int nvdims; /* number of dimensions for variables */ 00019 extern int dimnum; /* dimension number index for variables */ 00020 extern int varnum; /* variable number index for attributes */ 00021 extern int valnum; /* number of values specified for variable */ 00022 extern int rec_dim; /* number of the unlimited dimension, if any */ 00023 extern size_t rec_len; /* number of elements for a record of data */ 00024 extern size_t var_len; /* variable length (product of dimensions) */ 00025 extern size_t var_size; /* size of each element of variable */ 00026 00027 extern struct dims { 00028 size_t size; 00029 char *name; 00030 char *lname; /* with no "-" characters, for C and Fortran */ 00031 } *dims; /* table of dimensions */ 00032 00033 extern struct vars { 00034 char *name; 00035 nc_type type; 00036 int ndims; 00037 int *dims; /* array of dimension ids */ 00038 union generic fill_value; /* set to value of _FillValue attribute */ 00039 int has_data; /* 1 if data specified, 0 otherwise */ 00040 size_t nrecs; /* for record variables, number of records 00041 * of data in CDL */ 00042 char *data_stmnt; /* for record variables, to avoid 00043 * two passes with -f option */ 00044 char *lname; /* with no "-" characters, for C and Fortran */ 00045 } *vars; /* table of variables */ 00046 00047 00048 extern struct atts { 00049 int var; /* number of variable for this attribute */ 00050 char *name; 00051 nc_type type; 00052 size_t len; 00053 void *val; 00054 char *lname; /* with no "-" characters, for C and Fortran */ 00055 } *atts; /* table of variable and global attributes */ 00056 #endif /*!NC_NCGEN_H*/
1.4.4