/* -------------------------------------------------------------
   file: DHSVMChannel.h
   ------------------------------------------------------------- */
/* -------------------------------------------------------------
   Battelle Memorial Institute
   Pacific Northwest Laboratory
   ------------------------------------------------------------- */
/* -------------------------------------------------------------
   Created August 30, 1996 by  William A Perkins
   Last Change: Sat Feb  7 19:19:32 1998 by Bart Nijssen <nijssen@u.washington.edu>
   ------------------------------------------------------------- */

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

#ifndef _DHSVMChannel_h_
#define _DHSVMChannel_h_

#include "settings.h"           /* for data.h */
#include "data.h"
#include "getinit.h"
#include "channel.h"
#include "channel_grid.h"
#include "elevationband.h"

/* -------------------------------------------------------------
   struct CHANNEL
   ------------------------------------------------------------- */
typedef struct {
  ChannelClass *stream_class;
  ChannelClass *road_class;
  Channel *streams;
  Channel *roads;
  ChannelMapPtr **stream_map;
  ChannelMapPtr **road_map;
  FILE *streamout;
  FILE *roadout;
  FILE *streamflowout;
  FILE *roadflowout;
} CHANNEL;

/* -------------------------------------------------------------
   available functions
   ------------------------------------------------------------- */
void InitChannel(LISTPTR Input, MAPSIZE *Map, int deltat, CHANNEL *channel, 
                 SOILPIX **SoilMap, TOPOPIX **TopoMap);
void InitChannelDump(CHANNEL *channel, char *DumpPath);
double ChannelCulvertFlow(int y, int x, CHANNEL *ChannelData);
void RouteChannel(CHANNEL *ChannelData, TIMESTRUCT *Time, MAPSIZE *Map, 
                  TOPOPIX **TopoMap, SOILPIX **SoilMapi, AGGREGATED *Total,
                  OPTIONSTRUCT Options, SOILTABLE *SType);
void ChannelCut(int y, int x, CHANNEL *ChannelData, ROADSTRUCT *Network);
uchar ChannelFraction(TOPOPIX *topo, ChannelMapRec *rds);

#endif
