📄 vicnl_def.h
字号:
} dmy_struct; /* array of length nrec created *//*************************************************************** This structure stores all soil variables for each layer in the soil column. ***************************************************************/typedef struct { double Cs; /* average volumetric heat capacity of the current layer (J/m^3/K) */ double T; /* temperature of the unfrozen sublayer (C) */ double evap; /* evapotranspiration from soil layer (mm) */ double ice; /* ice content of the frozen sublayer (mm) */ double kappa; /* average thermal conductivity of the current layer (W/m/K) */ double moist; /* moisture content of the unfrozen sublayer (mm) */ double phi; /* moisture diffusion parameter */} layer_data_struct;/****************************************************************** This structure stores soil variables for the complete soil column for each grid cell. ******************************************************************/typedef struct { double aero_resist[3]; /* aerodynamic resistane (s/m) [0] = over bare vegetation or soil [2] = over snow */ double baseflow; /* baseflow from current cell (mm/TS) */ double inflow; /* moisture that reaches the top of the soil column (mm) */ double runoff; /* runoff from current cell (mm/TS) */ layer_data_struct layer[MAX_LAYERS]; /* structure containing soil variables for each layer (see above) */} cell_data_struct;/*********************************************************************** This structure stores energy balance components, and variables used to solve the thermal fluxes through the soil column. ***********************************************************************/typedef struct { char frozen; /* TRUE = frozen soil present */ double Cs[2]; /* heat capacity for top two layers (J/m^3/K) */ double Cs_node[MAX_NODES]; /* heat capacity of the soil thermal nodes (J/m^3/K) */ double T[MAX_NODES]; /* thermal node temperatures (C) */ double Trad[2]; /* surface temperature of energy balance (C) */ double advection; /* advective flux (Wm-2) */ double albedo; /* surface albedo (fraction) */ double deltaCC; /* change in snow heat storage (Wm-2) */ double deltaH; /* change in soil heat storage (Wm-2) */ double error; /* energy balance error (W/m^2) */ double fdepth[MAX_FRONTS]; /* all simulated freezing front depths */ double grnd_flux; /* ground heat flux (Wm-2) */ double ice[MAX_NODES]; /* thermal node ice content */ double kappa[2]; /* soil thermal conductivity for top two layers (W/m/K) */ double kappa_node[MAX_NODES]; /* thermal conductivity of the soil thermal nodes (W/m/K) */ double latent; /* net latent heat flux (Wm-2) */ double longwave; /* net longwave flux (Wm-2) */ double moist[MAX_NODES]; /* thermal node moisture content */ double refreeze_energy; /* energy used to refreeze the snowpack (Wm-2) */ double sensible; /* net sensible heat flux (Wm-2) */ double shortwave; /* incoming shortwave heat (Wm-2) */ double snow_flux; /* thermal flux through the snow pack (Wm-2) */ double tdepth[MAX_FRONTS]; /* all simulated thawing front depths */ double unfrozen; /* frozen layer water content that is unfrozen */ int Nfrost; /* number of simulated freezing fronts */ int Nthaw; /* number of simulated thawing fronts */ int T1_index; /* soil node at the bottom of the top layer */} energy_bal_struct;/*********************************************************************** This structure stores vegetation variables for each vegetation type in a grid cell. ***********************************************************************/typedef struct { double canopyevap; /* evaporation from canopy (mm/TS) */ double throughfall; /* water that reaches the ground through the canopy (mm/TS) */ double Wdew; /* dew trapped on vegetation (mm) */} veg_var_struct;/************************************************************************ This structure stores snow pack variables needed to run the snow model. ************************************************************************/typedef struct { char MELTING; /* flag indicating that snowpack melted previously */ int snow; /* TRUE = snow, FALSE = no snow */ double Qnet; /* New energy at snowpack surface */ double albedo; /* snow surface albedo (fraction) */ double canopy_vapor_flux; /* depth of water evaporation, sublimation, or condensation from intercepted snow (m) */ double coldcontent; /* cold content of snow pack */ double coverage; /* fraction of snow band that is covered with snow */ double density; /* snow density (kg/m^3) */ double depth; /* snow depth (m) */ double mass_error; /* snow mass balance error */ double pack_temp; /* depth averaged temperature of the snowpack (C) */ double pack_water; /* liquid water content of the snow pack (m) */ double snow_canopy; /* amount of snow on canopy (m) */ double surf_temp; /* depth averaged temperature of the snow pack surface layer (C) */ double surf_water; /* liquid water content of the surface layer (m) */ double swq; /* snow water equivalent of the entire pack (m) */ double tmp_int_storage; /* temporary canopy storage, used in snow_canopy */ double vapor_flux; /* depth of water evaporation, sublimation, or condensation from snow pack (m) */ int last_snow; /* time steps since last snowfall */} snow_data_struct; /* an array of size Nrec *//***************************************************************** This structure stores all variables needed to solve, or save solututions for all versions of this model. Vegetation and soil variables are created for both wet and dry fractions of the grid cell (for use with the distributed precipitation model).*****************************************************************/typedef struct { cell_data_struct **cell[2]; /* Stores soil layer variables (wet and dry) */ double *mu; /* fraction of grid cell that receives precipitation */ energy_bal_struct **energy; /* Stores energy balance variables */ snow_data_struct **snow; /* Stores snow variables */ veg_var_struct **veg_var[2]; /* Stores vegetation variables (wet and dry) */} dist_prcp_struct;/******************************************************* This structure stores all variables needed for output. *******************************************************/typedef struct { double Wdew; /* canopy interception of moisture */ double advection[MAX_BANDS+1]; /* grid cell advection (snow only) (Wm-2) */ double aero_resist; /* grid cell mean aerodynamic resistence [s/m] */ double air_temp; /* grid cell air temperature */ double albedo; /* grid cell mean albedo */ double baseflow; /* baseflow out of the bottom layer */ double bot_energy_error[2]; double coverage[MAX_BANDS+1]; /* fractional coverage of grid cell with snow */ double deltaCC[MAX_BANDS+1]; /* change of cold content in the snowpack [Wm-2] */ double deltaH; /* grid cell change in heat storage (snow only) */ double energy_error; /* energy balance error */ double evap; /* grid cell evaporation */ double evap_bare; /* grid cell net evaporation from bare ground */ double evap_canop; /* grid cell net evaporation from canopy interception */ double evap_veg; /* grid cell net evapotraspiration from vegetation */ double fdepth[MAX_FRONTS]; /* depth of all freezing fronts */ double grnd_flux; /* grid cell ground flux */ double ice[MAX_LAYERS]; /* frozen layer ice content */ double in_long; /* grid cell net incoming longwave flux */ double inflow; /* moisture that reaches the top of the soil column */ double latent; /* grid cell net latent heat flux */ double moist[MAX_LAYERS]; /* current moisture in each layer */ double net_long; /* grid cell net longwave flux */ double net_short; /* grid cell net shortwave flux */ double prec; /* incoming precipitation */ double r_net; /* grid cell net radiation W/m^2 */ double rad_temp; /* grid cell average radiative surface temperature */ double refreeze_energy[MAX_BANDS+1]; /* energy used to refreeze snowpack [Wm-2] */ double rel_humid; double runoff; /* runoff from the surface */ double sensible; /* grid cell net sensible heat flux */ double shortwave; /* grid cell incoming shortwave flux */ double snow_canopy[MAX_BANDS+1]; /* snow captured by canopy (mm) */ double snow_depth[MAX_BANDS+1]; /* snow depth (cm) */ double snow_flux[MAX_BANDS+1]; /* energy flux through the snowpack [Wm-2] */ double sub_canop; /* grid cell net sublimation from canopy interception */ double sub_snow; /* grid cell net sublimation from bare ground from snow pack */ double surf_cond; /* grid cell mean surface conductance [m/s] */ double surf_temp; /* grid cell average daily surface temperature */ double swq[MAX_BANDS+1]; /* snow water equivalent (mm) */ double tdepth[MAX_FRONTS]; /* depth of all thawing fronts */ double wind; /* grid cell wind speed */ double swband[MAX_BANDS+1]; // store shortwave by snow band double lwband[MAX_BANDS+1]; // store longwave by snow band double albedoband[MAX_BANDS+1]; // store snow albedo by snow band double latentband[MAX_BANDS+1]; // store latent heat by snow band double sensibleband[MAX_BANDS+1]; // store sensible heat by snow band double grndband[MAX_BANDS+1]; // store ground heat} out_data_struct;/******************************************************** This structure holds all variables needed for the error handling routines. ********************************************************/typedef struct { atmos_data_struct *atmos; double dt; energy_bal_struct *energy; infiles_struct infp; int rec; out_data_struct *out_data; outfiles_struct outfp; snow_data_struct *snow; soil_con_struct soil_con; veg_con_struct *veg_con; veg_var_struct *veg_var;} Error_struct;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -