/*
 * SUMMARY:      fileio.h - header file for file I/O
 * USAGE:        Part of DHSVM
 *
 * AUTHOR:       Bart Nijssen
 * ORG:          University of Washington, Department of Civil Engineering
 * E-MAIL:       nijssen@u.washington.edu
 * ORIG-DATE:    Apr-1996
 * Last Change: Mon Dec  2 15:59:29 2002 by Scott Waichler <waichler@tuff.pnl.gov>
 * DESCRIPTION:  header file for file I/O
 * DESCRIP-END.
 * FUNCTIONS:    
 * COMMENTS:     
 */

/* 	$Id: fileio.h,v 1.2 2001/03/31 00:10:42 waichler Exp $	 */

#ifndef FILEIO_H
#define FILEIO_H

/* define identifiers for different file formats */

#define BIN 1                   /* binary IO */
#define NETCDF 2		/* NetCDF format */

void InitFileIO(int FileFormat);

/* global file extension string */
extern char fileext[];

/* function pointers for 2D file IO */

extern void (*CreateMapFile)(char *FileName, ...);
extern int (*Read2DMatrix)(char *FileName, void *Matrix, int NumberType, int NY,
			   int NX, int NDataSet, ...);

extern int (*Write2DMatrix)(char *Filename, void *Matrix, int NumberType, int NY, int NX, ...);  

/* generic file functions */

void OpenFile(FILE **FilePtr, char *FileName, char *Mode, 
	      unsigned char OverWrite);

#endif

