ncdf4a13/ncgen/init.c

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: /upc/share/CVS/netcdf-3/ncgen/init.c,v 1.6 1997/05/23 11:41:14 russ Exp $
00005  *********************************************************************/
00006 
00007 #include <stdio.h>
00008 #include <netcdf.h>
00009 #include "generic.h"
00010 #include "ncgen.h"
00011 #include "genlib.h"
00012 
00013 extern int netcdf_flag;
00014 extern int c_flag;
00015 extern int fortran_flag;
00016 
00017 struct dims *dims;              /* table of netcdf dimensions */
00018 
00019 int ncid;                       /* handle for netCDF */
00020 int ndims;                      /* number of dimensions declared for netcdf */
00021 int nvars;                      /* number of variables declared for netcdf */
00022 int natts;                      /* number of attributes */
00023 int nvdims;                     /* number of dimensions for variables */
00024 int dimnum;                     /* dimension number index for variables */
00025 int varnum;                     /* variable number index for attributes */
00026 int valnum;                     /* value number index for attributes */
00027 int rec_dim;                    /* number of the unlimited dimension, if any */
00028 size_t var_len;                 /* variable length (product of dimensions) */
00029 size_t rec_len;                 /* number of elements for a record of data */
00030 size_t var_size;                /* size of each element of variable */
00031 
00032 struct vars *vars;              /* a malloc'ed list */
00033 
00034 struct atts *atts;              /* table of variable and global attributes */
00035 
00036 void
00037 init_netcdf(void) {                     /* initialize global counts, flags */
00038     
00039     clearout();                 /* reset symbol table to empty */
00040     ndims = 0;
00041     nvars = 0;
00042     rec_dim = -1;               /* means no unlimited dimension (yet) */
00043 }

Generated on Thu Mar 16 18:10:14 2006 for nco by  doxygen 1.4.4