/*
 * SUMMARY:      soilmoisture.h - Header file for soil moisture calculations
 * USAGE:        Part of DHSVM
 *
 * AUTHOR:       Mark Wigmosta
 * ORG:          Batelle Pacific Northwest Laboratories
 * E-MAIL:       ms_wigmosta@pnl.gov
 * ORIG-DATE:    Jul-1996
 * Last Change: Thu Dec  5 15:31:03 2002 by Scott Waichler <waichler@tuff.pnl.gov>
 * DESCRIPTION:  Header file for soil moisture calculations, including
 *               corrections for road and channel cuts
 * DESCRIP-END.
 * FUNCTIONS:    
 * COMMENTS:     
 */

/* 	$Id: soilmoisture.h,v 1.4 2001/04/20 21:47:55 waichler Exp $	 */

#ifndef SOILMOISTURE_H
#define SOILMOISTURE_H

#define NO_CUT -10

void AdjustStorage(int NSoilLayers, float TotalDepth, float *RootDepth,
                   float Width, float DX, float BankHeight, float *PercWidth, 
                   float *Adjust, int *CutBankZone);

float CalcAvailableWater(int NRootLayers, float TotalDepth, float *RootDepth,
                         float *Moisture, float *FCap, float TableDepth,
                         float *Adjust);

float CalcTotalWater(int NSoilLayers, float TotalDepth, float *RootDepth,
                     float *Moist, float *Adjust);

void CutBankGeometry(int i, float RootDepth, float TopZone,float BankHeight,  
                     float Width, float DX, float *PercWidth, float *Adjust,
                     int *CutBankZone) ;

float WaterTableDepth(int NRootLayers, float TotalDepth, float *RootDepth, 
		      float *Porosity, float *FCap, float *Adjust, 
                      float *Moist);

void UnsaturatedFlow(int SpatialExtent, int Dt, float DX, float Infiltration, float SatFlow,
                     int NSoilLayers, float TotalDepth, float Width, 
                     float *RootDepth, float *Ks,  float *PoreDist, 
                     float *Porosity,  float *FCap, float *Perc, 
                     float *PercWidth, float *Adjust, int CutBankZone, 
                     float BankHeight, float *TableDepth, float *Runoff, 
                     float *Moist, int infiltrationRate, 
                     float infiltCoeff, float infiltExp, float *QuickVol);


#endif





