#include #include "delta.h" /*************************************************************************** MemStep() This function advances plant structure values ahead one step and accounts for seedbank age by using AgeSeed(). Seeds are discounted by an annual mortality. Seedlings are killed. Adults are copied directly to (t+1). Arguments: struct Plant ***plant pointer to plant structure struct Basin *basin pointer to basin parameters struct Lifehist *lifehist pointer to lifehistory parameters Return Value: void ****************************************************************************/ void MemStep(struct Basin *basin, struct Plant ***plant) { int x, y, i; for(y=0; y < basin->ymax[0]; y++) { for(x=0; x < basin->xmax[0]; x++) { plant[x][y][1].adult[0] = plant[x][y][0].adult[0]; plant[x][y][1].reproduce[0] = plant[x][y][0].reproduce[0]; plant[x][y][1].origx[0] = plant[x][y][0].origx[0]; plant[x][y][1].origy[0] = plant[x][y][0].origy[0]; for(i=0; i < MAXSP; i++) { plant[x][y][1].seed[i] = plant[x][y][0].seed[i]; } } } for(y=0; y < basin->ymax[0]; y++) { for(x=0; x < basin->xmax[0]; x++) { for(i=0; i < MAXSP; i++) { plant[x][y][0].sdlng[i] = 0; } } } }