forked from pacificclimate/VIC
-
Notifications
You must be signed in to change notification settings - Fork 0
/
GlacierEnergyBalance.h
90 lines (85 loc) · 5.23 KB
/
GlacierEnergyBalance.h
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
#ifndef GLACIERENERGYBALANCE_H_
#define GLACIERENERGYBALANCE_H_
#include "root_brent.h"
#include "vicNl.h"
class GlacierEnergyBalance : public RootBrent {
public:
GlacierEnergyBalance(
double Dt, /* Model time step (sec) */
double Ra, /* Aerodynamic resistance (s/m) */
AeroResistUsed& Ra_used, /* Aerodynamic resistance (s/m) after stability correction */
/* Vegetation Parameters */
double Displacement, /* Displacement height (m) */
double Z, /* Reference height (m) */
VegConditions& roughness, /* surface roughness height (m) */
/* Atmospheric Forcing Variables */
double AirDens, /* Density of air (kg/m3) */
double EactAir, /* Actual vapor pressure of air (Pa) */
double LongSnowIn, /* Incoming longwave radiation (W/m2) */
double Lv, /* Latent heat of vaporization (J/kg3) */
double Press, /* Air pressure (Pa) */
double Rain, /* Rain fall (m/timestep) */
double NetShortUnder, /* Net incident shortwave radiation (W/m2) */
double Vpd, /* Vapor pressure deficit (Pa) */
double Wind, /* Wind speed (m/s) */
/* Snowpack Variables */
double OldTSurf, /* Surface temperature during previous time step */
double IceDepth, /* Depth of glacier surface layer (m) */
double IceWE, /* Liquid water in the glacier surface layer (m) */
/* Energy Balance Components */
double Tair, /* Canopy air / Air temperature (C) */
double TGrnd, /* Ground surface temperature (C) */
double *AdvectedEnergy, /* Energy advected by precipitation (W/m2) */
double *DeltaColdContent, /* Change in cold content of surface layer (W/m2) */
double *GroundFlux, /* Ground Heat Flux (W/m2) */
double *LatentHeat, /* Latent heat exchange at surface (W/m2) */
double *LatentHeatSub, /* Latent heat of sublimation exchange at surface (W/m2) */
double *NetLongUnder, /* Net longwave radiation at snowpack surface (W/m^2) */
double *SensibleHeat, /* Sensible heat exchange at surface (W/m2) */
double *vapor_flux /* Mass flux of water vapor to or from the intercepted snow (m/timestep) */
) :
Dt(Dt), Ra(Ra), Ra_used(Ra_used), Displacement(Displacement), Z(Z),
roughness(roughness), AirDens(AirDens), EactAir(EactAir), LongSnowIn(LongSnowIn),
Lv(Lv), Press(Press), Rain(Rain), NetShortUnder(NetShortUnder), Vpd(Vpd),
Wind(Wind), OldTSurf(OldTSurf), IceDepth(IceDepth), IceWE(IceWE),
Tair(Tair), TGrnd(TGrnd), AdvectedEnergy(AdvectedEnergy),
DeltaColdContent(DeltaColdContent),
GroundFlux(GroundFlux), LatentHeat(LatentHeat), LatentHeatSub(LatentHeatSub),
NetLongUnder(NetLongUnder), SensibleHeat(SensibleHeat), vapor_flux(vapor_flux)
{}
double calculate(double);
private:
double Dt; /* Model time step (sec) */
double Ra; /* Aerodynamic resistance (s/m) */
AeroResistUsed& Ra_used; /* Aerodynamic resistance (s/m) after stability correction */
/* Vegetation Parameters */
double Displacement; /* Displacement height (m) */
double Z; /* Reference height (m) */
VegConditions& roughness; /* surface roughness height (m) */
/* Atmospheric Forcing Variables */
double AirDens; /* Density of air (kg/m3) */
double EactAir; /* Actual vapor pressure of air (Pa) */
double LongSnowIn; /* Incoming longwave radiation (W/m2) */
double Lv; /* Latent heat of vaporization (J/kg3) */
double Press; /* Air pressure (Pa) */
double Rain; /* Rain fall (m/timestep) */
double NetShortUnder; /* Net incident shortwave radiation (W/m2) */
double Vpd; /* Vapor pressure deficit (Pa) */
double Wind; /* Wind speed (m/s) */
/* Snowpack Variables */
double OldTSurf; /* Surface temperature during previous time step */
double IceDepth; /* Depth of glacier surface layer (m) */
double IceWE; /* Liquid water in the glacier surface layer (m) */
/* Energy Balance Components */
double Tair; /* Canopy air / Air temperature (C) */
double TGrnd; /* Ground surface temperature (C) */
double *AdvectedEnergy; /* Energy advected by precipitation (W/m2) */
double *DeltaColdContent; /* Change in cold content of surface layer (W/m2) */
double *GroundFlux; /* Ground Heat Flux (W/m2) */
double *LatentHeat; /* Latent heat exchange at surface (W/m2) */
double *LatentHeatSub; /* Latent heat of sublimation exchange at surface (W/m2) */
double *NetLongUnder; /* Net longwave radiation at snowpack surface (W/m^2) */
double *SensibleHeat; /* Sensible heat exchange at surface (W/m2) */
double *vapor_flux; /* Mass flux of water vapor to or from the intercepted snow (m/timestep) */
};
#endif /* GLACIERENERGYBALANCE_H_ */