Everglades Landscape Model (ELM) Home Page |
#include <ctype.h>
#include <time.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for globals.h:
This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Data Structures | |
struct | prog_attr |
struct | simTime |
struct | pTSeries |
struct | pTSeriesList |
struct | rPoint |
struct | rPointList |
struct | outVar_struct |
struct | basndef |
struct | point3D |
struct | point2D |
struct | scale1 |
struct | scale2 |
struct | viewParm |
struct | seriesParm |
struct | nodenv |
Defines | |
#define | VOIDP void* |
#define | HDF 0 |
#define | UNIX 1 |
#define | H_OPSYS UNIX |
#define | kMAX 0 |
#define | kMIN 1 |
#define | kMAXMIN 2 |
#define | kSUM 3 |
#define | kAVE 4 |
#define | kSUMCUM 5 |
#define | kAVECUM 6 |
#define | MAX_PTSERIES 800 |
#define | MAX_TS_FILES 50 |
#define | MAX_MSG_SIZE 1200 |
#define | ISARRAY 0x8000 |
#define | PMASK2 0x0200 |
#define | PMASK1 0x0100 |
#define | kCArgDepth 10 |
#define | kCArgWidth 50 |
#define | EOL '\n' |
#define | EOS '\0' |
#define | TAB '\t' |
#define | POUND ((UCHAR)0x23) |
#define | True 1 |
#define | False 0 |
#define | CASE 0 |
#define | NOCASE 1 |
#define | BEG 0 |
#define | END 1 |
#define | DT dt |
#define | T(x, y) ((int)((x)*(s1+2)+(y))) |
#define | sec_per_day 86400.0 |
#define | PI 3.1415927 |
#define | wetEndMon 9 |
#define | wetEndDay 30 |
#define | dryEndMon 4 |
#define | dryEndDay 30 |
#define | Abs(x) (((x)>=0) ? (x) : -(x)) |
#define | Cos(x) cos((double)x) |
#define | Sin(x) sin((double)x) |
#define | Tan(x) tan((double)x) |
#define | Arctan(x) atan((double)x) |
#define | Exp(x) exp((double)x) |
#define | Max(x, y) (((x)>(y))?(x):(y)) |
#define | Min(x, y) (((y)>(x))?(x):(y)) |
#define | ramp(x) (((x)>0)?(x):0) |
#define | sgn(x) (((x)>=0) ? 1.0 : -1.0) |
#define | conv_mgTOg 1.0e-3 |
#define | conv_gTOkg 1.0e-3 |
#define | conv_kgTO_Mg 1.0e-3 |
#define | conv_mgTOug 1.0e3 |
#define | conv_gTOmg 1.0e3 |
#define | conv_kgTOg 1.0e3 |
#define | conv_kgTOmg 1.0e6 |
#define | conv_inTOtenths_mm 254.0 |
#define | conv_ftTOm 0.3048 |
#define | conv_mTOcm 100.0 |
#define | conv_cmTOmm 10.0 |
#define | conv_mTOkm 0.001 |
#define | MAX_NHAB 255 |
#define | MAX_SECTOR 30 |
Typedefs | |
typedef int | BOOL |
typedef FILE * | STREAM |
typedef char * | STRING |
typedef unsigned char | UCHAR |
typedef unsigned char | byte |
typedef unsigned int | UINT |
typedef unsigned short | USHORT |
typedef long | SLONG |
typedef unsigned long | ULONG |
typedef prog_attr | ProgAttr |
typedef pTSeries | PTSeries |
typedef pTSeriesList | PTSeriesList |
typedef rPoint | RPoint |
typedef rPointList | RPointList |
typedef basndef | basnDef |
typedef point3D | Point3D |
typedef point2D | Point2D |
typedef scale1 | Scale1 |
typedef scale2 | Scale2 |
typedef viewParm | ViewParm |
typedef seriesParm | SeriesParm |
typedef nodenv | nodenv |
Functions | |
void | WriteMsg (const char *msg, int wh) |
Send a message to a debug file or to the console. | |
void | usrErr (const char *dString) |
Send a message to the console. | |
void | usrErr0 (const char *dString) |
Send a message to the console. | |
Variables | |
int | SensiOn |
simTime | SimTime |
char | msgStr [MAX_MSG_SIZE] |
float | dt |
float | sfstep |
float | gwstep |
float | canstep |
int | hyd_iter |
unsigned char * | ON_MAP |
float | CELL_SIZE |
float | celWid |
float | sq_celWid |
int | s0 |
int | s1 |
int | debug |
int | dynERRORnum |
This defines or declares variables & functions that are global to the model.
Note: documented with Doxygen, which expects specific syntax within special comments.
The Everglades Landscape Model (ELM).
last updated: Feb 2005
Definition in file globals.h.
|
Definition at line 193 of file globals.h. Referenced by nalloc(). |
|
boolean flag to indicate use of (compile/link to) NCSA's Hierarchical Data Format. NOTE: (Nov 2004): do not #define HDF to true until hdf header sources are updated Definition at line 195 of file globals.h. Referenced by write_map_file(). |
|
(unused) UNIX boolean flag to indicate a unix operating system. |
|
define the operating system as UNIX NOTE: ELM is always in unix (used to run on Macintosh transputers) - code using this can be removed Definition at line 198 of file globals.h. Referenced by Canal_Network_Init(), PTSL_ReadLists(), Read_schedule(), ReadChanStruct(), readOutlist(), ReadStructures(), and write_map_file(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 201 of file globals.h. Referenced by Combine(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 202 of file globals.h. Referenced by Combine(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 203 of file globals.h. Referenced by calc_maxmin(), and Combine(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 204 of file globals.h. Referenced by Combine(), and print_loc_ave(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 205 of file globals.h. Referenced by Combine(), and print_loc_ave(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 206 of file globals.h. Referenced by Combine(), and print_loc_ave(). |
|
only used in case stmt in Combine (Serial.c) Definition at line 207 of file globals.h. Referenced by Combine(), and print_loc_ave(). |
|
maximum number of grid cells for Point Time Series output Definition at line 210 of file globals.h. Referenced by main(). |
|
max # files (=variables) for writing Point Time Series output |
|
maximum size of msg (message) string for messages to console or debug file |
|
Definition at line 214 of file globals.h. Referenced by readViewParms(). |
|
|
|
|
|
Sizes array of arguments to parse the output configuration file |
|
Sizes array of arguments to parse the output configuration file Definition at line 219 of file globals.h. Referenced by parse_packet(). |
|
|
|
Definition at line 223 of file globals.h. Referenced by get_hab_parm(). |
|
Definition at line 224 of file globals.h. Referenced by get_hab_parm(), and ReadStructures(). |
|
|
|
Definition at line 226 of file globals.h. Referenced by Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), and FluxChannel(). |
|
|
|
Definition at line 228 of file globals.h. Referenced by write_map_file(). |
|
|
|
|
|
Definition at line 231 of file globals.h. Referenced by write_map_file(). |
|
allow upper case definition of dt (primary model delta-time time step (d) ) Definition at line 233 of file globals.h. Referenced by cell_dyn1(). |
|
define location of 2D row(x), col(y) data stored in 1D array Definition at line 234 of file globals.h. Referenced by alloc_mem_stats(), BIRbudg_sum(), BIRinit(), BIRstats_sum(), calc_maxmin(), Canal_Network_Init(), cell_dyn1(), Cell_reset_avg(), Cell_reset_hydper(), CellAvg(), Channel_configure(), evap_data_wmm(), Flows_in_Structures(), Flux_GWater(), Flux_GWcells(), Flux_SWater(), Flux_SWcells(), Flux_SWstuff(), FluxChannel(), getCanalElev(), HabSwitch(), init_pvar(), MarkCell(), print_loc_ave(), print_point(), PTSL_CreatePointMap(), rain_data_wmm(), read_map_file(), ReadStructures(), stage_data_wmm(), write_map_file(), and writeWindow(). |
|
seconds per day, used in Manning's eqn Definition at line 235 of file globals.h. Referenced by Channel_configure(). |
|
Definition at line 236 of file globals.h. Referenced by cell_dyn1(). |
|
gregorian-calendar month of end of wet season |
|
gregorian-calendar day of end of wet season |
|
gregorian-calendar month of end of dry season |
|
gregorian-calendar day of end of dry season |
|
Definition at line 242 of file globals.h. Referenced by Channel_configure(), Disp_Calc(), f_Manning(), Flows_in_Structures(), Flux_GWcells(), Flux_SWcells(), FluxChannel(), UTM2kmx(), and UTM2kmy(). |
|
Definition at line 243 of file globals.h. Referenced by cell_dyn1(), and init_eqns(). |
|
Definition at line 244 of file globals.h. Referenced by cell_dyn1(). |
|
Definition at line 245 of file globals.h. Referenced by cell_dyn1(). |
|
Definition at line 246 of file globals.h. Referenced by cell_dyn1(). |
|
Definition at line 247 of file globals.h. Referenced by cell_dyn1(), Flux_GWcells(), and Poisson(). |
|
Definition at line 248 of file globals.h. Referenced by Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), and PTSL_AddpTSeries(). |
|
Definition at line 249 of file globals.h. Referenced by BIRoutfiles(), Flows_in_Structures(), Flux_GWcells(), Flux_SWcells(), Flux_SWstuff(), and FluxChannel(). |
|
Definition at line 250 of file globals.h. Referenced by Flows_in_Structures(), Flux_SWcells(), and FluxChannel(). |
|
Definition at line 251 of file globals.h. Referenced by f_Manning(), and FluxChannel(). |
|
conversion from mg to g |
|
conversion from g to kg Definition at line 254 of file globals.h. Referenced by BIRbudg_sum(). |
|
conversion from kilograms to Megagrams Definition at line 255 of file globals.h. Referenced by BIRbudg_print(). |
|
conversion from milligrams to micrograms Definition at line 257 of file globals.h. Referenced by BIRbudg_print(). |
|
conversion from g to mg |
|
conversion from kg to g |
|
conversion from kg to mg Definition at line 260 of file globals.h. Referenced by BIRinit(), and HabSwitch(). |
|
conversion from inches to tenths of a mm |
|
conversion from feet to meters |
|
conversion from meters to cm Definition at line 265 of file globals.h. Referenced by BIRinit(). |
|
conversion from cm to mm Definition at line 266 of file globals.h. Referenced by BIRbudg_print(). |
|
conversion from m to km |
|
maximum number of habitat (HAB) types Definition at line 269 of file globals.h. Referenced by get_hab_parm(). |
|
maximum number of cell_dyn sectors (ecological modules) |
|
|
|
|
|
|
|
Definition at line 32 of file globals.h. Referenced by Copy(), enc_Nb(), getChar(), getFloat(), getInt(), getString(), link_edges(), read_map_file(), setup_grid(), write_map_file(), writeSeries(), and writeWindow(). |
|
Definition at line 33 of file globals.h. Referenced by link_edges(), and readMap(). |
|
|
|
|
|
Definition at line 36 of file globals.h. Referenced by write_map_file(). |
|
|
|
Program attributes, with info on a the type of simulation run(s) within an execution of main program. This is used for standard runs, sensitivity analyses, and others (e.g., stochastic processes) in future Referenced by alloc_mem_runs(), BIRstats_date(), get_global_parm(), get_hab_parm(), and SensiParm_list(). |
|
Point time series spatial interpolation: unused ELMv2.3 (last used in v2.1) Referenced by PTS_CopyFields(), PTS_Free(), PTS_SetFields(), PTSL_AddpTSeries(), PTSL_GetInterpolatedValue0(), PTSL_GetInterpolatedValue1(), and PTSL_Init(). |
|
Point time series spatial interpolation: unused ELMv2.3 (last used in v2.1) Referenced by PTSL_AddpTSeries(), PTSL_CreatePointMap(), PTSL_Free(), PTSL_GetInterpolatedValue0(), PTSL_GetInterpolatedValue1(), PTSL_Init(), and PTSL_ReadLists(). |
|
Point time series spatial interpolation: unused ELMv2.3 (last used in v2.1) Referenced by RP_CopyFields(), RP_SetFields(), RP_SwapFields(), RPL_AddrPoint(), and RPL_Init(). |
|
Point time series spatial interpolation: unused ELMv2.3 (last used in v2.1) Referenced by PTSL_GetInterpolatedValue1(), RPL_AddrPoint(), RPL_Free(), RPL_Init(), and RPL_Sort(). |
|
Basin/Indicator-Region attributes Referenced by BIRinit(). |
|
Point time series output, point attributes Referenced by make_more_points(), print_loc_ave(), print_point(), and write_output(). |
|
The grid location of a point |
|
Model output configuration, scaling data |
|
Model output configuration, scaling data (unused currently) |
|
Model output configuration data Referenced by calc_maxmin(), gen_output(), getFlag(), getPrecision(), main(), make_more_points(), print_point(), read_output_parms(), readOutlist(), readViewParms(), setFlag(), setPrecision(), setup_grid(), and write_output(). |
|
Point time series output configuration data Referenced by open_point_lists(), and send_point_lists2(). |
|
Unused, Parallel implementation |
|
Send a message to a debug file or to the console. Depending on when this function is called, messages are sent to one of two debug-related files, or to the console. During initial model set-up, the first (Driver0.out) debug-info file is used to print confirmation information on items such as init/end dates of simulation, the model parameter values that were read, etc. During later access to this function while the model is iterating, the second (Driver1.out) file is opened and accessed here, followed by the X'th for multi-run sensitivity analyses.
Definition at line 1436 of file Driver_Utilities.c. References Driver_outfile. Referenced by cell_dyn1(), cell_dyn12(), cell_dyn2(), cell_dyn7(), cell_dyn8(), cell_dyn9(), Combine(), Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), get_global_parm(), get_hab_parm(), get_Nth_parm(), get_parmf(), HabSwitch_Init(), main(), make_more_points(), print_point(), PTS_SetFields(), PTSL_ReadLists(), read_map_dims(), read_map_file(), read_model_parameters(), readOutlist(), ReadStructures(), readViewParms(), SensiParm_list(), setup_grid(), write_map_file(), and write_output(). 01436 { 01437 wh = 1; 01438 if(Driver_outfile) fprintf(Driver_outfile,"%s\n",msg); 01439 else fprintf(stdout,"%s\n",msg); 01440 fflush(stdout); 01441 }
|
|
Send a message to the console. The message text is followed by a line feed.
Definition at line 1457 of file Driver_Utilities.c. Referenced by alloc_mem_runs(), alloc_memory(), BIRinit(), Canal_Network_Init(), evap_data_wmm(), get_global_parm(), get_hab_parm(), get_Nth_parm(), get_parmf(), getCombineIndex(), HabSwitch_Init(), local_setup(), main(), match_Sparm(), print_point(), PTSL_ReadLists(), rain_data_wmm(), read_map_dims(), read_map_file(), read_model_parameters(), Read_schedule(), ReadChanStruct(), ReadStructures(), readViewParms(), SensiParm_list(), set_env_vars(), setup_platform(), and stage_data_wmm(). 01458 {
01459 fprintf(stderr,"%s\n", dString);
01460 fflush(stderr);
01461 }
|
|
Send a message to the console. The message text is not followed by a line feed.
Definition at line 1447 of file Driver_Utilities.c. Referenced by alloc_mem_stats(), alloc_memory(), main(), read_model_parameters(), and ReadStructures(). 01448 {
01449 fprintf(stderr,"%s", dString);
01450 fflush(stderr);
01451 }
|
|
boolean flag to signifiy sensitivity analysis is on/off Definition at line 49 of file globals.h. Referenced by get_parmf(). |
|
Current time data of simulation Referenced by BIRbudg_date(), BIRbudg_print(), BIRbudg_sum(), BIRbudg_sumFinal(), BIRstats_date(), BIRstats_sumFinal(), cell_dyn1(), cell_dyn12(), cell_dyn2(), cell_dyn7(), cell_dyn8(), cell_dyn9(), evap_data_wmm(), Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), HabSwitch(), init_eqns(), main(), rain_data_wmm(), Run_Canal_Network(), stage_data_wmm(), stats(), track_time(), and write_map_file(). |
|
a string for messages to file/console Definition at line 272 of file globals.h. Referenced by alloc_mem_runs(), alloc_mem_stats(), BIRinit(), cell_dyn1(), Combine(), evap_data_wmm(), Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), get_global_parm(), get_hab_parm(), get_Nth_parm(), get_parmf(), getCombineIndex(), HabSwitch_Init(), main(), make_more_points(), match_Sparm(), open_point_lists(), print_point(), PTS_SetFields(), PTSL_ReadLists(), quick_look(), rain_data_wmm(), read_map_dims(), read_map_file(), read_model_parameters(), Read_schedule(), ReadChanStruct(), readOutlist(), ReadStructures(), readViewParms(), send_point_lists2(), SensiParm_list(), set_env_vars(), setup_grid(), stage_data_wmm(), write_map_file(), and write_output(). |
|
Definition at line 281 of file globals.h. Referenced by get_parmf(). |
|
Definition at line 281 of file globals.h. Referenced by Flux_SWstuff(), and get_parmf(). |
|
Definition at line 281 of file globals.h. Referenced by Flux_GWcells(), and get_parmf(). |
|
Definition at line 281 of file globals.h. Referenced by Flows_in_Structures(), get_parmf(), and Run_Canal_Network(). |
|
max number of horiz iterations per model primary (vertical) time step (dt) Definition at line 282 of file globals.h. Referenced by get_parmf(). |
|
the map that defines the model domain; is modified by WatMgmt.c function for levee interaction Definition at line 284 of file globals.h. Referenced by alloc_mem_stats(), alloc_memory(), BIRbudg_sum(), BIRinit(), BIRstats_sum(), calc_maxmin(), Canal_Network_Init(), cell_dyn1(), Cell_reset_avg(), Cell_reset_hydper(), CellAvg(), Channel_configure(), Flux_GWater(), Flux_GWcells(), Flux_SWater(), Flux_SWcells(), Flux_SWstuff(), FluxChannel(), MarkCell(), print_loc_ave(), PTSL_CreatePointMap(), ReadStructures(), and write_map_file(). |
|
Definition at line 291 of file globals.h. Referenced by BIRbudg_sum(), BIRoutfiles(), BIRstats_sum(), Flows_in_Structures(), Flux_GWcells(), FluxChannel(), and get_parmf(). |
|
Definition at line 291 of file globals.h. Referenced by Disp_Calc(), and get_parmf(). |
|
Definition at line 291 of file globals.h. Referenced by get_parmf(). |
|
number of rows in array of model domain Definition at line 292 of file globals.h. Referenced by alloc_hab_hist(), alloc_mem_stats(), alloc_memory(), BIRinit(), Canal_Network_Init(), cell_dyn1(), Channel_configure(), check_for(), init_pvar(), initDataStruct(), MarkCell(), PTSL_CreatePointMap(), quick_look(), read_map_dims(), read_map_file(), ReadStructures(), setup_grid(), and writeMap(). |
|
number of columns in array of model domain Definition at line 293 of file globals.h. Referenced by alloc_hab_hist(), alloc_mem_stats(), alloc_memory(), BIRinit(), Canal_Network_Init(), cell_dyn1(), Channel_configure(), check_for(), evap_data_wmm(), init_pvar(), initDataStruct(), PTSL_CreatePointMap(), quick_look(), rain_data_wmm(), read_map_dims(), read_map_file(), setup_grid(), stage_data_wmm(), writeMap(), and writeWindow(). |
|
debug Value (0 - 5) indicates the debug level for warning/error checking & writing to console and debug files. At debug >=0 (i.e., always), print critical ERROR violations to DriverX.out (for X'th simulation run) debug file. An increasing amount of information is printed with increasing debug level:
Definition at line 306 of file globals.h. Referenced by Canal_Network_Init(), cell_dyn1(), evap_data_wmm(), Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), get_parmf(), main(), print_point(), PTS_SetFields(), PTSL_ReadLists(), quick_look(), rain_data_wmm(), read_map_dims(), read_map_file(), readSeriesCol(), returnData(), Run_Canal_Network(), stage_data_wmm(), write_map_file(), and write_output(). |
|
A counter of the cumulative number of ERRORS in dynamic calculations - used to abort (after allowing enough to understand problem) Definition at line 307 of file globals.h. Referenced by Flows_in_Structures(), Flux_GWcells(), Flux_SWstuff(), FluxChannel(), and main(). |