-
Notifications
You must be signed in to change notification settings - Fork 5
/
ST_functions.h
79 lines (63 loc) · 2.78 KB
/
ST_functions.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
/**
* \file ST_functions.h
* \brief Declares public functions used throughout the model.
*
* Ideally this file would be removed and all of the functions within would be
* declared in module-specific header files. However, that is outside of the
* scope of my current issue.
*
* \author CWB (initial programing)
* \date 15 June 2000
* \author Chandler Haukap (author of this documentation)
* \date 16 January 2020
* \ingroup STEPPE
*/
#ifndef FUNCTION_DEF
#define FUNCTION_DEF
#include "ST_defines.h"
/* =================================================== */
/* Externed Global Variables */
/* --------------------------------------------------- */
extern sw_random_t environs_rng; // defined in ST_environs.c
extern sw_random_t resgroups_rng; // defined in ST_resgroups.c
extern sw_random_t species_rng; // defined in ST_species.c
/* =================================================== */
/* Global Function Declarations */
/* --------------------------------------------------- */
void Env_Generate( void );
void copy_environment(const EnvType* src, EnvType* dest);
void copy_plot(const PlotType* src, PlotType* dest);
void copy_succulent(const SucculentType* src, SucculentType* dest);
void set_all_rngs(unsigned long initstate, int iter, int year, int cell_id);
/* See steppe_main.c for declarations of the following
The following declarations are to be used only in the noted
source files because they only make sense there.
*/
/* --- main.c ---- */
/* the rest of these functions might reasonably be called
* from several locations.
*/
char *Parm_name(ST_FileIndex i);
IndivType **RGroup_GetIndivs( GrpIndex rg, const char sort, IntS *num);
GrpIndex RGroup_New( void);
void RGroup_Kill( GrpIndex rg);
GrpIndex RGroup_Name2Index (const char *name);
RealF getRGroupRelsize(GrpIndex rg);
void RGroup_Update_GrpResProp( GrpIndex rg);
RealF RGroup_GetBiomass( GrpIndex rg) ;
RealF Species_GetBiomass (SppIndex sp);
void Species_Add_Indiv( SppIndex sp, Int new_indivs);
RealF getSpeciesRelsize(SppIndex sp);
RealF getSpeciesHeight(SpeciesType* sp);
SppIndex Species_Name2Index (const char *name);
void Species_Kill (const SppIndex sp, int killType);
void Species_Proportion_Kill (const SppIndex sp, int killType, RealF proportionKilled );
void Species_Proportion_Recovery (const SppIndex sp, int killType, RealF proportionRecovery,RealF proportionKilled);
RealF Species_Proportion_Grazing(const SppIndex sp,RealF proportionGrazing );
void Species_Annual_Kill(const SppIndex sp, int killType);
IntS Species_NumEstablish( SppIndex sp);
void Indiv_SortSize( const byte sorttype,
const size_t n, IndivType **list);
int Indiv_CompSize_A( const void *key1, const void *key2);
int Indiv_CompSize_D( const void *key1, const void *key2);
#endif