/* nonetcdf.h
 *              Bill          11/28/98
 *                *
 *
 * Stub file for netcdf includes
 ******************************************************************************/

typedef enum {
	NC_BYTE =	1,	/* signed 1 byte integer */
	NC_CHAR =	2,	/* ISO/ASCII character */
	NC_SHORT =	3,	/* signed 2 byte integer */
	NC_INT =	4,	/* signed 4 byte integer */
	NC_FLOAT =	5,	/* single precision floating point number */
	NC_DOUBLE =	6	/* double precision floating point number */
} nc_type;

int ncvarget(int ncid, int varid, const long *startp, const long *countp, void *ip) ;

int ncopen(const char* path, int mode);

int nctypelen(nc_type datatype);

int nccreate(const char* path, int cmode);

int ncattinq(int ncid, int varid, const char *name, nc_type *xtypep, int *lenp);

int ncattget(int ncid, int varid, const char *name, void *ip);

int ncvarinq(int ncid, int varid, char *name, nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp);

int ncvarget1(int ncid, int varid, const long *indexp, void *ip);

int name">ncattname(int ncid, int varid, int attnum, char *name);

int ncdiminq(int ncid, int dimid, char *name, long *lenp);

int ncinquire(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimp);

int ncattcopy(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out);

int ncvardef(int ncid, const char *name, nc_type xtype,
int ndims, const int *dimidsp);

int ncendef(int ncid);

int ncclose(int ncid);

int ncredef(int ncid);

int ncsetfill(int ncid, int fillmode);

int ncvarid(int ncid, const char *name);

int ncattput(int ncid, int varid, const char *name, nc_type xtype,
int len, const void *op);

int ncvarput1(int ncid, int varid, const long *indexp, const void *op);

int ncvarput(int ncid, int varid, const long *startp, const long *countp,
	const void *op);

int nc_create(const char *path, int cmode, int *ncidp);

int nc_put_att_text(int ncid, int varid, const char *name,
	size_t len, const char *op);

int nc_open(const char *path, int mode, int *ncidp);

int nc_set_fill(int ncid, int fillmode, int *old_modep);

int nc_redef(int ncid);

int nc__enddef(int ncid, size_t h_minfree, size_t v_align,
	size_t v_minfree, size_t r_align);

int nc_enddef(int ncid);

int nc_sync(int ncid);

int nc_abort(int ncid);

int nc_close(int ncid);

  int
nc_inq(int ncid, int *ndimsp, int *nvarsp, int *nattsp, int *unlimdimidp);

int 
nc_inq_ndims(int ncid, int *ndimsp);

int 
nc_inq_nvars(int ncid, int *nvarsp);

int 
nc_inq_natts(int ncid, int *nattsp);

int 
nc_inq_unlimdim(int ncid, int *unlimdimidp);

/* Begin _dim */

  int
nc_def_dim(int ncid, const char *name, size_t len, int *idp);

  int
nc_inq_dimid(int ncid, const char *name, int *idp);

  int
nc_inq_dim(int ncid, int dimid, char *name, size_t *lenp);

int 
name">nc_inq_dimname(int ncid, int dimid, char *name);

int 
nc_inq_dimlen(int ncid, int dimid, size_t *lenp);

  int
name_dim">nc_rename_dim(int ncid, int dimid, const char *name);

/* End _dim */
/* Begin _att */

  int
nc_inq_att(int ncid, int varid, const char *name,
	 nc_type *xtypep, size_t *lenp);

int 
nc_inq_attid(int ncid, int varid, const char *name, int *idp);

int 
nc_inq_atttype(int ncid, int varid, const char *name, nc_type *xtypep);

int 
nc_inq_attlen(int ncid, int varid, const char *name, size_t *lenp);

  int
name">nc_inq_attname(int ncid, int varid, int attnum, char *name);

  int
nc_copy_att(int ncid_in, int varid_in, const char *name, int ncid_out, int varid_out);

  int
name_att">nc_rename_att(int ncid, int varid, const char *name, const char *newname);

  int
nc_del_att(int ncid, int varid, const char *name);

/* End _att */
/* Begin {put,get}_att */

  int
nc_put_att_text(int ncid, int varid, const char *name,
	size_t len, const char *op);

  int
nc_get_att_text(int ncid, int varid, const char *name, char *ip);

  int
char">nc_put_att_uchar(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const unsigned char *op);

  int
char">nc_get_att_uchar(int ncid, int varid, const char *name, unsigned char *ip);

  int
char">nc_put_att_schar(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const signed char *op);

  int
char">nc_get_att_schar(int ncid, int varid, const char *name, signed char *ip);

  int
nc_put_att_short(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const short *op);

  int
short">nc_get_att_short(int ncid, int varid, const char *name, short *ip);

  int
int">nc_put_att_int(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const int *op);

  int
int">nc_get_att_int(int ncid, int varid, const char *name, int *ip);

  int
nc_put_att_long(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const long *op);

  int
long">nc_get_att_long(int ncid, int varid, const char *name, long *ip);

  int
nc_put_att_float(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const float *op);

  int
float">nc_get_att_float(int ncid, int varid, const char *name, float *ip);

  int
nc_put_att_double(int ncid, int varid, const char *name, nc_type xtype,
	size_t len, const double *op);

  int
double">nc_get_att_double(int ncid, int varid, const char *name, double *ip);

/* End {put,get}_att */
/* Begin _var */

  int
nc_def_var(int ncid, const char *name,
	 nc_type xtype, int ndims, const int *dimidsp, int *varidp);

  int
nc_inq_var(int ncid, int varid, char *name,
	 nc_type *xtypep, int *ndimsp, int *dimidsp, int *nattsp);

  int
nc_inq_varid(int ncid, const char *name, int *varidp);

int 
name">nc_inq_varname(int ncid, int varid, char *name);

int 
nc_inq_vartype(int ncid, int varid, nc_type *xtypep);

int 
nc_inq_varndims(int ncid, int varid, int *ndimsp);

int 
nc_inq_vardimid(int ncid, int varid, int *dimidsp);

int 
nc_inq_varnatts(int ncid, int varid, int *nattsp);

  int
name_var">nc_rename_var(int ncid, int varid, const char *name);

  int
nc_copy_var(int ncid_in, int varid, int ncid_out);
#ifndef ncvarcpy
/* support the old name for now */
#define ncvarcpy(ncid_in, varid, ncid_out) ncvarcopy((ncid_in), (varid), (ncid_out))
#endif

/* End _var */
/* Begin {put,get}_var1 */

  int
nc_put_var1_text(int ncid, int varid, const size_t *indexp, const char *op);

  int
nc_get_var1_text(int ncid, int varid, const size_t *indexp, char *ip);

  int
nc_put_var1_uchar(int ncid, int varid, const size_t *indexp,
	const unsigned char *op);

  int
nc_get_var1_uchar(int ncid, int varid, const size_t *indexp,
	unsigned char *ip);

  int
nc_put_var1_schar(int ncid, int varid, const size_t *indexp,
	const signed char *op);

  int
nc_get_var1_schar(int ncid, int varid, const size_t *indexp,
	signed char *ip);

  int
nc_put_var1_short(int ncid, int varid, const size_t *indexp,
	const short *op);

  int
nc_get_var1_short(int ncid, int varid, const size_t *indexp,
	short *ip);

  int
int">nc_put_var1_int(int ncid, int varid, const size_t *indexp, const int *op);

  int
int">nc_get_var1_int(int ncid, int varid, const size_t *indexp, int *ip);

  int
long">nc_put_var1_long(int ncid, int varid, const size_t *indexp, const long *op);

  int
long">nc_get_var1_long(int ncid, int varid, const size_t *indexp, long *ip);

  int
float">nc_put_var1_float(int ncid, int varid, const size_t *indexp, const float *op);

  int
float">nc_get_var1_float(int ncid, int varid, const size_t *indexp, float *ip);

  int
double">nc_put_var1_double(int ncid, int varid, const size_t *indexp, const double *op);

  int
double">nc_get_var1_double(int ncid, int varid, const size_t *indexp, double *ip);

/* End {put,get}_var1 */
/* Begin {put,get}_vara */

  int
nc_put_vara_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, const char *op);

  int
nc_get_vara_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, char *ip);

  int
nc_put_vara_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const unsigned char *op);

  int
nc_get_vara_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, unsigned char *ip);

  int
nc_put_vara_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const signed char *op);

  int
nc_get_vara_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, signed char *ip);

  int
nc_put_vara_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, const short *op);

  int
nc_get_vara_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, short *ip);

  int
int">nc_put_vara_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, const int *op);

  int
int">nc_get_vara_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, int *ip);

  int
nc_put_vara_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, const long *op);

  int
nc_get_vara_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, long *ip);

  int
nc_put_vara_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, const float *op);

  int
nc_get_vara_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, float *ip);

  int
nc_put_vara_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, const double *op);

  int
nc_get_vara_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, double *ip);

/* End {put,get}_vara */
/* Begin {put,get}_vars */

  int
nc_put_vars_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const char *op);

  int
nc_get_vars_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	char *ip);

  int
nc_put_vars_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const unsigned char *op);

  int
nc_get_vars_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	unsigned char *ip);

  int
nc_put_vars_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const signed char *op);

  int
nc_get_vars_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	signed char *ip);

  int
nc_put_vars_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const short *op);

  int
nc_get_vars_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	short *ip);

  int
int">nc_put_vars_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const int *op);

  int
int">nc_get_vars_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
int *ip);

  int
nc_put_vars_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const long *op);

  int
nc_get_vars_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	long *ip);

  int
nc_put_vars_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const float *op);

  int
nc_get_vars_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	float *ip);

  int
nc_put_vars_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const double *op);

  int
nc_get_vars_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	double *ip);

/* End {put,get}_vars */
/* Begin {put,get}_varm */

  int
nc_put_varm_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const char *op);

  int
nc_get_varm_text(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	char *ip);

  int
nc_put_varm_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const unsigned char *op);

  int
nc_get_varm_uchar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	unsigned char *ip);

  int
nc_put_varm_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const signed char *op);

  int
nc_get_varm_schar(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	signed char *ip);

  int
nc_put_varm_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const short *op);

  int
nc_get_varm_short(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	short *ip);

  int
int">nc_put_varm_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const int *op);

  int
int">nc_get_varm_int(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
int *ip);

  int
nc_put_varm_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const long *op);

  int
nc_get_varm_long(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	long *ip);

  int
nc_put_varm_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const float *op);

  int
nc_get_varm_float(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	float *ip);

  int
nc_put_varm_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t *imapp, 
	const double *op);

  int
nc_get_varm_double(int ncid, int varid,
	const size_t *startp, const size_t *countp, const ptrdiff_t *stridep,
	const ptrdiff_t * imap, 
	double *ip);

/* End {put,get}_varm */
/* Begin {put,get}_var */

  int
nc_put_var_text(int ncid, int varid, const char *op);

  int
nc_get_var_text(int ncid, int varid, char *ip);

  int
char">nc_put_var_uchar(int ncid, int varid, const unsigned char *op);

  int
char">nc_get_var_uchar(int ncid, int varid, unsigned char *ip);

  int
char">nc_put_var_schar(int ncid, int varid, const signed char *op);

  int
char">nc_get_var_schar(int ncid, int varid, signed char *ip);

  int
short">nc_put_var_short(int ncid, int varid, const short *op);

  int
short">nc_get_var_short(int ncid, int varid, short *ip);

  int
int">nc_put_var_int(int ncid, int varid, const int *op);

  int
int">nc_get_var_int(int ncid, int varid, int *ip);

  int
long">nc_put_var_long(int ncid, int varid, const long *op);

  int
long">nc_get_var_long(int ncid, int varid, long *ip);

  int
float">nc_put_var_float(int ncid, int varid, const float *op);

  int
float">nc_get_var_float(int ncid, int varid, float *ip);

  int
double">nc_put_var_double(int ncid, int varid, const double *op);

  int
double">nc_get_var_double(int ncid, int varid, double *ip);


#define NC_WRITE    	0x1	/* read & write */
#define NC_GLOBAL -1
#define NC_NOWRITE	0	/* default is read only */
#define NC_NOFILL	0x100	/* Don't fill data section an records */
#define MAX_NC_NAME	128
#define NC_NOCLOBBER	0x4	/* Don't destroy existing file on create */
#define	NC_EEXIST	(-35)	/* netcdf file exists && NC_NOCLOBBER */
#define NC_UNLIMITED 0L