From 260366cdaa3042b5a7748ffb585d8face72f48fd Mon Sep 17 00:00:00 2001 From: alexisBelt <57182633+alexisBelt@users.noreply.github.com> Date: Thu, 12 Oct 2023 20:09:53 -0400 Subject: [PATCH] Seed Dispersal Output and Flag #497 changing grid_setup.in description, fixing if statement mistake --- ST_seedDispersal.c | 14 +++++++------- testing.sagebrush.master/Grid_Inputs/grid_setup.in | 6 +++++- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/ST_seedDispersal.c b/ST_seedDispersal.c index 79fa3db..33cd989 100644 --- a/ST_seedDispersal.c +++ b/ST_seedDispersal.c @@ -130,10 +130,8 @@ void disperseSeeds(int year) { ForEachSpecies(sp) { // Running this algorithm on Species that didn't request dispersal // wouldn't hurt, but it would be a waste of time. - if(!outputSDData){ - if (!Species[sp]->use_dispersal) - continue; - } + if (!Species[sp]->use_dispersal) + continue; // If there are no individuals of this species that are of reproductive // age continue. @@ -161,9 +159,11 @@ void disperseSeeds(int year) { } // If this cell already has seeds there is no point in continuing - //if (receiverCell->mySpecies[sp]->seedsPresent) { - // continue; - //} + if (!outputSDData) { + if (receiverCell->mySpecies[sp]->seedsPresent) { + continue; + } + } // These variables depend on the recipient. distance = _distance(col, row, receiverCol, receiverRow, diff --git a/testing.sagebrush.master/Grid_Inputs/grid_setup.in b/testing.sagebrush.master/Grid_Inputs/grid_setup.in index 5be8616..69d6daa 100644 --- a/testing.sagebrush.master/Grid_Inputs/grid_setup.in +++ b/testing.sagebrush.master/Grid_Inputs/grid_setup.in @@ -8,4 +8,8 @@ 300 # Number of years to perform spinup. 1 # Write separate output files for each cell. 1 # output all seed dispersal events? 1 means yes, 0 means no. -0 # output full seed dispersal output? 1 means yes, 0 means no. \ No newline at end of file +0 # output all dispersed seed data? 1 means yes and seeds will continuously recieve seeds + ## 0 means cell will not receive more seeds after its first + + +