Skip to content

Commit cf69e6a

Browse files
author
vicadmin
committed
Fixed errors in passing SensibleHeat to func_atmos_energy_bal.
1 parent b3dd41e commit cf69e6a

File tree

3 files changed

+31
-4
lines changed

3 files changed

+31
-4
lines changed

README.txt

+24
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,30 @@ Usage:
2424

2525

2626

27+
28+
--------------------------------------------------------------------------------
29+
***** Description of changes from VIC 4.1.2.g to VIC 4.1.2.f *****
30+
--------------------------------------------------------------------------------
31+
32+
33+
Bug Fixes:
34+
----------
35+
36+
Fixed error in passing SensibleHeat to func_atmos_energy_bal.
37+
38+
Files Affected:
39+
40+
calc_atmos_energy_bal.c
41+
42+
Description:
43+
44+
Replaced (*SensibleHeat) with SensibleHeat in argument lists
45+
of root_brent, error_print_atmos_energy_bal and
46+
solve_atmos_energy_bal.
47+
48+
49+
50+
2751
--------------------------------------------------------------------------------
2852
***** Description of changes from VIC 4.1.2.f to VIC 4.1.2.e *****
2953
--------------------------------------------------------------------------------

calc_atmos_energy_bal.c

+6-3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ double calc_atmos_energy_bal(double InOverSensible,
6161
Tcanopy iteration is only performed if CLOSE_ENERGY is TRUE; else
6262
Tcanopy is set to Tair. Also fixed bug in passing SensibleHeat
6363
between this function and root_brent, etc. CL via TJB
64+
2013-Jan-11 Replaced (*SensibleHeat) with SensibleHeat in argument lists
65+
of root_brent, error_print_atmos_energy_bal and
66+
solve_atmos_energy_bal. TJB
6467
************************************************************************/
6568

6669
extern option_struct options;
@@ -115,7 +118,7 @@ double calc_atmos_energy_bal(double InOverSensible,
115118
Tcanopy = root_brent(T_lower, T_upper, ErrorString, func_atmos_energy_bal,
116119
(*LatentHeat) + (*LatentHeatSub),
117120
NetRadiation, Ra, Tair, atmos_density, InSensible,
118-
(*SensibleHeat) );
121+
SensibleHeat);
119122

120123
if ( Tcanopy <= -998 ) {
121124
if (options.TFALLBACK) {
@@ -129,7 +132,7 @@ double calc_atmos_energy_bal(double InOverSensible,
129132
+ (*LatentHeatSub),
130133
NetRadiation, Ra, Tair,
131134
atmos_density, InSensible,
132-
(*SensibleHeat), ErrorString);
135+
SensibleHeat, ErrorString);
133136
return ( ERROR );
134137
}
135138
}
@@ -143,7 +146,7 @@ double calc_atmos_energy_bal(double InOverSensible,
143146
// compute variables based on final temperature
144147
(*Error) = solve_atmos_energy_bal(Tcanopy, (*LatentHeat) + (*LatentHeatSub),
145148
NetRadiation, Ra, Tair, atmos_density,
146-
InSensible, (*SensibleHeat));
149+
InSensible, SensibleHeat);
147150

148151
/*****************************
149152
Find Canopy Vapor Pressure

global.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
characteristics of bare soil. TJB
2121
2012-Jan-16 Removed LINK_DEBUG code BN
2222
**********************************************************************/
23-
char *version = "4.1.2.f bug fix update 2013-Jan-08";
23+
char *version = "4.1.2.g bug fix update 2013-Feb-01";
2424

2525
char *optstring = "g:vo";
2626

0 commit comments

Comments
 (0)