forked from jhamman/DHSVM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CalcTransmissivity.c
executable file
·76 lines (65 loc) · 2.63 KB
/
CalcTransmissivity.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* SUMMARY: CalcTransmissivity.c - Calculate saturated conductivity
* USAGE: Part of DHSVM
*
* AUTHOR: Bart Nijssen
* ORG: University of Washington, Department of Civil Engineering
* E-MAIL: [email protected]
* ORIG-DATE: Apr-96
* DESCRIPTION: Calculates the transmissivity through the saturated part of
* the soil profile
* DESCRIP-END.
* FUNCTIONS: CalcTransmissivity()
* COMMENTS:
* $Id: CalcTransmissivity.c,v 1.4 2003/07/01 21:26:11 olivier Exp $
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include "settings.h"
#include "functions.h"
/*****************************************************************************
Function name: CalcTransmissivity()
Purpose : Calculates the transmissivity through the saturated part of
the soil profile
Required :
float SoilDepth - Total soil depth in m
float WaterTable - Depth of the water table below the soil surface in m
float LateralKs - Lateral hydraulic conductivity in m/s
float KsExponent - Exponent that describes exponential decay of LateralKs
with depth below the soil surface
Returns : Transmissivity in m2/s
Modifies : NA
Comments :
Source:
Wigmosta, M. S., L. W. Vail, and D. P. Lettenmaier, A distributed
hydrology-vegetation model for complex terrain, Water Resour. Res.,
30(6), 1665-1679, 1994.
Based on:
Beven, K. J., On subsurface stormflow: An analysis of response times,
Hydrolog. Sci. J., 4, 505-521, 1982.
The hydraulic conductivity is assumed exponentially with depth, based on
material in Beven [1982].
*****************************************************************************/
float CalcTransmissivity(float SoilDepth, float WaterTable, float LateralKs,
float KsExponent, float DepthThresh)
{
float Transmissivity; /* Transmissivity (m^2/s) */
float TransThresh;
if (fequal(KsExponent, 0.0))
Transmissivity = LateralKs * (SoilDepth - WaterTable);
else {
if (WaterTable < DepthThresh) {
Transmissivity = (LateralKs / KsExponent) * (exp(-KsExponent * WaterTable) - exp(-KsExponent * SoilDepth));
}
else {
TransThresh = (LateralKs / KsExponent) * (exp(-KsExponent * DepthThresh) - exp(-KsExponent * SoilDepth));
if(SoilDepth < DepthThresh) {
printf("Warning: Soil DepthThreshold (%.2f) > the soil depth (%.2f)!\n", DepthThresh, SoilDepth);
printf("Transmissivity is set to zero!");
}
Transmissivity = (SoilDepth-WaterTable)/(SoilDepth-DepthThresh)*TransThresh;
}
}
return Transmissivity;
}