⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 vicnl_def.h

📁 超强的大尺度水文模拟工具
💻 H
📖 第 1 页 / 共 3 页
字号:
/* RCS Id String * $Id: vicNl_def.h,v 4.3.2.6 2004/06/17 21:47:48 tbohn Exp $ *//***** Version Information *****/#define VERSION		"VIC Release 4.0.4"/***** Model Constants *****/#define MAXSTRING    2048#define MINSTRING    20#define HUGE_RESIST  1.e20	/* largest allowable double number */#define SMALL        1.e-12	/* smallest allowable double number */#define MISSING      -99999.	/* missing value for multipliers in				   BINARY format */#define LITTLE 1		/* little-endian flag */#define BIG 2			/* big-endian flag */#define BROOKS 1		/* Brooks-Corey parameters for unsaturated flow				 */ #define ASCII 1			/* met file format flag */#define BINARY 2		/* met file format flag *//***** Forcing Variable Types *****/#define N_FORCING_TYPES 13#define AIR_TEMP  0  /* air temperature per time step (C) */#define ALBEDO    1  /* surface albedo (fraction) */#define DENSITY   2  /* atmospheric density (kg/m^3) */#define LONGWAVE  3  /* incoming longwave radiation (W/m^2) */#define PREC      4  /* precipitation (mm) */#define PRESSURE  5  /* atmospheric pressure (kPa) */#define SHORTWAVE 6  /* incoming shortwave (W/m^2) */#define TMAX      7  /* maximum daily temperature (C) */#define TMIN      8  /* minimum daily temperature (C) */#define TSKC      9  /* cloud cover (fraction) */#define VP        10 /* vapor pressure (kPa) */#define WIND      11 /* wind speed (m/s) */#define SKIP      12 /* place holder for unused data columns */		 /***** Physical Constants *****/#define BARE_SOIL_ALBEDO 0.2	    /* albedo for bare soil */#define RESID_MOIST      0.0        /* define residual moisture content 				       of soil column */#define ice_density      917.	    /* density of ice (kg/m^3) */#define T_lapse          6.5        /* tempreature lapse rate of US Std 				       Atmos in C/km */#define von_K        0.40	/* Von Karmin constant for evapotranspiration */#define KELVIN       273.15	/* conversion factor C to K */#define STEFAN_B     5.6696e-8	/* stefan-boltzmann const in unit W/m^2/K^4 */#define Lf           3.337e5	/* Latent heat of freezing (J/kg) at 0C */#define RHO_W        1000.0	/* Density of water (kg/m^3) at 0C */#define Cp           1004.0	/* Specific heat at constant pressure of air 				   (J/deg/K) */#define CH_ICE       2100.0e3	/* Volumetric heat capacity (J/(m3*C)) of ice */#define SECPHOUR     3600	/* seconds per hour */#define SNOW_DT       5.0	/* Used to bracket snow surface temperatures				   while computing the snow surface energy 				   balance (C) */#define SURF_DT       1.0	/* Used to bracket soil surface temperatures                                    while computing energy balance (C) */#define SOIL_DT       0.25      /* Used to bracket soil temperatures while                                   solving the soil thermal flux (C) */#define HOURSPERDAY   24        /* number of hours per day */#define HOURSPERYEAR  24*365    /* number of hours per year *//***** Physical Constraints *****/#define MINSOILDEPTH 0.001	/* minimum layer depth with which model can					work (m) */#define STORM_THRES  0.001      /* thresehold at which a new storm is 				   decalred *//***** Define Boolean Values *****/#ifndef FALSE#define FALSE 0#define TRUE !FALSE#endif#ifndef WET#define WET 0#define DRY 1#endif#ifndef SNOW#define RAIN 0#define SNOW 1#endif#define min(a,b) (a < b) ? a : b#define max(a,b) (a > b) ? a : b#include <user_def.h>#include <snow.h>#define DAYS_PER_YEAR 365.#define DtoR 0.017453293	/* degrees to radians */#ifndef PI#define PI 3.1415927#endif#define STEFAN 5.6696e-8	/* Stefan boltzmann constant */#define SOLAR_CONSTANT 1400.0	/* Solar constant in W/m^2 */#define SEC_PER_DAY 86400.	/* seconds per day *//* define constants for saturated vapor pressure curve (kPa) */#define A_SVP 0.61078#define B_SVP 17.269#define C_SVP 237.3/* define constants for penman evaporation */#define CP_PM 1013		/* specific heat of moist air J/kg/C 				   (Handbook of Hydrology) */#define PS_PM 101300		/* sea level air pressure in Pa */#define LAPSE_PM -0.006		/* environmental lapse rate in C/m *//***** Codes for displaying version information *****/#define DISP_VERSION 1#define DISP_COMPILE_TIME 2#define DISP_ALL 3/***** VIC model version *****/extern char *version;/* global variables */extern int NR;			/* array index for atmos struct that indicates				   the model step avarage or sum */extern int NF;			/* array index loop counter limit for atmos				   struct that indicates the SNOW_STEP values *//***** Data Structures *****//** file structures **/typedef struct {  FILE *forcing[2];     /* atmospheric forcing data files */  FILE *globalparam;    /* global parameters file */  FILE *init_snow;      /* snowpack initialization file */  FILE *init_soil;      /* soil temp and mosit initialization file */  FILE *snowband;       /* snow elevation band data file */  FILE *soilparam;      /* soil parameters for all grid cells */  FILE *veglib;         /* vegetation parameters for all vege types */  FILE *vegparam;       /* fractional coverage info for grid cell */  FILE *statefile;      /* initial model state file */} infiles_struct;typedef struct {  FILE *fdepth;  FILE *fluxes;  FILE *snow;  FILE *snowband;#if SAVE_STATE  FILE *statefile;#endif} outfiles_struct;typedef struct {  char  fdepth[MAXSTRING];      /* frozen soils depth (output) */  char  fluxes[MAXSTRING];      /* grid cell surface fluxes (output) */  char  forcing[2][MAXSTRING];  /* atmospheric forcing data file names */  char  global[MAXSTRING];      /* global control file name */  char  init_state[MAXSTRING];  /* initial model state file name */  char  result_dir[MAXSTRING];  /* directory where results will be written */  char  snow[MAXSTRING];        /* snow pack depth and swq (output) */  char  snow_band[MAXSTRING];   /* snow band parameter file name */  char  snowband[MAXSTRING];    /* snow band pack depth and swq (output) */  char  soil[MAXSTRING];        /* soil parameter file name, or name of 				   file that has a list of all aoil 				   ARC/INFO files */  char  soil_dir[MAXSTRING];    /* directory from which to read ARC/INFO 				   soil files */  char  veg[MAXSTRING];         /* vegetation grid coverage file */  char  veglib[MAXSTRING];      /* vegetation parameter library file */} filenames_struct;typedef struct {  char   ARC_SOIL;       /* TRUE = use ARC/INFO gridded ASCII files for soil 			    parameters*/  char   BINARY_OUTPUT;  /* TRUE = output files are in binary, not ASCII */  char   BINARY_STATE_FILE; /* TRUE = model state file is binary (default) */  char   COMPRESS;       /* TRUE = Compress all output files */  char   COMPUTE_TREELINE; // TRUE = Determine treeline and exclude overstory                           // vegetation from higher elevations  char   CORRPREC;       /* TRUE = correct precipitation for gage undercatch */  char   DIST_PRCP;      /* TRUE = Use distributed precipitation model */  char   FROZEN_SOIL;    /* TRUE = Use frozen soils code */  char   FULL_ENERGY;    /* TRUE = Use full energy code */  char   GLOBAL_LAI;     /* TRUE = read LAI values for each vegetation type			    from the veg param file */  char   GRND_FLUX;      /* TRUE = compute ground heat flux and energy 			    balance */  char   INIT_STATE;     /* TRUE = initialize model state from file */  char   MOISTFRACT;     /* TRUE = output soil moisture as moisture content */  char   NOFLUX;         /* TRUE = Use no flux lower bondary when computing 			    soil thermal fluxes */  char   PRT_SNOW_BAND;  /* TRUE = print snow parameters for each snow band */  char   QUICK_FLUX;     /* TRUE = Use Liang et al., 1999 formulation for			    ground heat flux, if FALSE use explicit finite			    difference method */  float  MIN_WIND_SPEED; /* Minimum wind speed in m/s that can be used by 			    the model. **/  float  PREC_EXPT;      /* Exponential that controls the fraction of a			    grid cell that receives rain during a storm			    of given intensity */  int    AboveTreelineVeg; // Default veg type to use above treeline                           // Negative number indicates bare soil.  int    GRID_DECIMAL;   /* Number of decimal places in grid file extensions */  int    Nlayer;         /* Number of layers in model */  int    Nnode;          /* Number of soil thermal nodes in the model */  int    ROOT_ZONES;     /* Number of root zones used in simulation */  int    SNOW_BAND;      /* Number of elevation bands over which to solve the 			    snow model */  int    SNOW_STEP;      /* Time step in hours to use when solving the 			    snow model */  char   ARNO_PARAMS;    /* FALSE: read Ds, Dm, Ws, c; TRUE: read d1, d2, d3, d4 */  char   JULY_TAVG_SUPPLIED; /* If TRUE and COMPUTE_TREELINE is also true,			        then average July air temperature will be read				from soil file and used in calculating treeline */} option_struct;#if LINK_DEBUGtypedef struct {  FILE    *fg_balance;  FILE    *fg_energy;  FILE    *fg_grid;  FILE    *fg_kappa;  FILE    *fg_modelstep_atmos;  FILE    *fg_moist;  FILE    *fg_snow;  FILE    *fg_snowstep_atmos;  FILE    *fg_temp;  char     DEBUG;  char     PRT_ATMOS;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -