Skip to content

Commit

Permalink
added missing RandSeed function in ST_main
Browse files Browse the repository at this point in the history
  • Loading branch information
ashishtiwari2006 committed Oct 22, 2015
1 parent f5b6077 commit 195e0cd
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
1 change: 1 addition & 0 deletions ST_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ int main(int argc, char **argv) {
parm_Initialize(iter);

Plot_Initialize();
RandSeed(Globals.randseed);
Globals.currIter = iter;

/*Debug_AddByIter( iter); */
Expand Down
3 changes: 2 additions & 1 deletion ST_params.c
Original file line number Diff line number Diff line change
Expand Up @@ -900,6 +900,7 @@ static void _rgroup_init( void) {
LogError(logfp, LOGFATAL, "%s: Too few columns in groups",
MyFileName);
}
// printf("prop_killed= %0.6f, prop_recovery=%0.6f \n",prop_killed,prop_recovered );
_rgroup_add1( name, space, density, estab,
slow, stretch, xres, estann,
turnon, styr, killyr, killfreq,
Expand Down Expand Up @@ -982,7 +983,7 @@ static void _rgroup_add1( char name[], RealF space, RealF density,
RGroup[rg]->veg_prod_type = veg_prod_type;
RGroup[rg]->proportion_killed = prop_killed;
RGroup[rg]->proportion_recovered = prop_recovered;
printf("grp= %d prop_killed= %f, prop_recovery=%f \n",rg, RGroup[rg]->proportion_killed,RGroup[rg]->proportion_recovered );
//printf("grp= %d prop_killed= %0.6f, prop_recovery=%0.6f \n",rg, RGroup[rg]->proportion_killed,RGroup[rg]->proportion_recovered );


RGroup[rg]->extirpated = FALSE;
Expand Down
1 change: 1 addition & 0 deletions ST_species.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ void rgroup_AddSpecies( GrpIndex rg, SppIndex sp) ;
void rgroup_DropSpecies( SppIndex sp) ;
Bool indiv_New( SppIndex sp);
void indiv_Kill_Complete( IndivType *ndv, int killType);
void indiv_proportion_Kill( IndivType *ndv, int killType,RealF proportionKilled);

/*------------------------------------------------------*/
/* Modular functions only used on one or two specific */
Expand Down
22 changes: 11 additions & 11 deletions testing.sagebrush.MT_drs/Stepwat Inputs/Input/rgroup.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@
# space parameter for shrubs was a guess (KP)
#
#TM 10.6.2015 - tested various stretch values for sagebrush and found stretch of 8 to be best paired with irate 0.02
# name space density maxest slow stretch xres estann on startyr killyr killfrq extirp mort xgrow veg_prod_type
# name space density maxest slow stretch xres estann on startyr killyr killfrq extirp mort xgrow veg_prod_type proportion_killed proportion_recovered

sagebrush 0.325 1.0000 1 0.0500 8 1 0 1 1 0 0 0 0 0.00000 2
a.cool.forb 0.030 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4
a.warm.forb 0.020 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4
p.cool.forb 0.100 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4
p.warm.forb 0.075 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4
a.cool.grass 0.050 50.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3
a.warm.grass 0.000 5.0000 1 0.0500 2 1 0 0 1 0 0 0 1 0.00000 3
p.cool.grass 0.250 17.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3
p.warm.grass 0.050 11.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3
shrub 0.100 1.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 2
sagebrush 0.325 1.0000 1 0.0500 8 1 0 1 1 0 0 0 0 0.00000 2 0.50 0.75
a.cool.forb 0.030 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4 0.60 0.50
a.warm.forb 0.020 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4 0.70 0.60
p.cool.forb 0.100 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4 0.80 0.80
p.warm.forb 0.075 5.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 4 0.50 0.20
a.cool.grass 0.050 50.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3 0.40 0.90
a.warm.grass 0.000 5.0000 1 0.0500 2 1 0 0 1 0 0 0 1 0.00000 3 0.20 0.80
p.cool.grass 0.250 17.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3 0.30 0.70
p.warm.grass 0.050 11.000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 3 0.40 0.90
shrub 0.100 1.0000 1 0.0500 2 1 0 1 1 0 0 0 1 0.00000 2 0.80 0.40

[end] # section end

Expand Down

0 comments on commit 195e0cd

Please sign in to comment.