forked from pacificclimate/VIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
StabilityCorrection.c
122 lines (90 loc) · 3.64 KB
/
StabilityCorrection.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/*
* SUMMARY: StabilityCorrection.c - Calculate the stability correction
* USAGE: Part of DHSVM
*
* AUTHOR: Bart Nijssen and Pascal Storck
* ORG: University of Washington, Department of Civil Engineering
* E-MAIL: nijssen@u.washington.edu, pstorck@u.washington.edu
* ORIG-DATE: Apr-1996
* LAST-MOD: Fri Mar 2 18:42:20 2001 by Keith Cherkauer <cherkaue@u.washington.edu>
* DESCRIPTION: Calculate the stability correction for exchange of sensible
* heat between the surface and the atmosphere
* DESCRIP-END.
* FUNCTIONS: StabilityCorrection()
* COMMENTS:
*/
#include <stdio.h>
#include <stdlib.h>
#include "vicNl.h"
static char vcid[] = "$Id$";
/*****************************************************************************
Function name: StabilityCorrection()
Purpose : Calculate atmospheric stability correction for non-neutral
conditions
Required :
double Z - Reference height (m)
double d - Displacement height (m)
double TSurf - Surface temperature (C)
double Tair - Air temperature (C)
double Wind - Wind speed (m/s)
double Z0 - Roughness length (m)
Returns :
double Correction - Multiplier for aerodynamic resistance
Modifies : None
Comments :
*****************************************************************************/
double StabilityCorrection(double Z, double d, double TSurf, double Tair,
double Wind, double Z0)
{
double Correction; /* Correction to aerodynamic resistance */
double Ri; /* Richardson's Number */
double RiCr = 0.2; /* Critical Richardson's Number */
double RiLimit; /* Upper limit for Richardson's Number */
Correction = 1.0;
/* Calculate the effect of the atmospheric stability using a Richardson
Number approach */
if (TSurf != Tair) {
/* Non-neutral conditions */
Ri = G * (Tair - TSurf) * (Z - d)/
(((Tair+273.15)+(TSurf+273.15))/2.0 * Wind * Wind);
RiLimit = (Tair+273.15)/
(((Tair+273.15)+(TSurf+273.15))/2.0 * (log((Z-d)/Z0) + 5));
if (Ri > RiLimit)
Ri = RiLimit;
if (Ri > 0.0)
Correction = (1 - Ri/RiCr) * (1 - Ri/RiCr);
else {
if (Ri < -0.5)
Ri = -0.5;
Correction = sqrt(1 - 16 * Ri);
}
}
return Correction;
/* double Eta;*/ /* intermediate product */
/* calculate the effect of atmospheric stability on aerodynamic resistance
using the method of Choudhury et al., Agric. For. Met., 37, 75-88,
1986 */
/* Eq. A4, Choudhury et al [1986] */
/* Eta = 5.0 * (Z - d) * G * (TSurf - Tair)/
((Tair + 273.15) * Wind*Wind);
if (TSurf < Tair) { */
/* stable conditions */
/* If Eta smaller or equal than -1, the correction increases again
because of the quadratic form of the equation. However, the
correction should monnotonically decrease for increasing
differences between the surface and air temperature. Therefore a
lower bound of -.8 is imposed on Eta (The lower bound of Eta is
not put at -1, because this would result in no sensible heat
exchange at all at the soil surface, which is unrealistic. A lower
bound of -.8 results in a correction of 25, i.e. an increase in the
resistance of 25 times) */
/* if (Eta < -0.8)
Eta = -0.8;
Correction = (1 + Eta)*(1 + Eta);
}
else */
/* unstable conditions */
/* Correction = pow((double) (1 + Eta), (double) 0.75);
}*/
/* return Correction; */
}