%% Script to run crayfish dispersal model (function: Crayfish_dispersal_v2.m)
% Author: Dr Jim Kerr
% Description: Runs single iteration of the crayfish dispersal model. Model
% input parameters are specified below as amendments to the structure 'Param'.
% Last modified: May 2020
clearvars
close all
Param.RunNumber='Test'; % Model identifier/name
Param.RiverLength=70000; % River length (m)
Param.Startdate=150; % Julian day
Param.ModelDuration=5; % Model duration in yrs
Param.NoCray=100; % Number of crayfish at start of the model
Param.MeanAgeCray=3; % Mean age of crayfish at satrt of the model
Param.StdAgeCray=0.3; % Standard deviation of age of crayfish at start of the model
Param.MeanBreedingPeriod=274; % Mean breeding day (julian day)- Holdich et al. 2014 states breeding occurs late september to early October
Param.RangeBreedingPeriod=15; % Breeding period range (+/- days)- Holdich et al. 2014 states breeding occurs late september to early October
Param.SexuallyMatureLength=39; % Size (CL = mm) at which males and females are condsidered sexually mature (Guan and Wiles, 1999)
Param.Gestation_Time=223; % Gestation time for crayfish - Holdich et al. 2014 states that the gestation time is between 166 and 280. Mean value used here.
Param.StartPosition=35000; % Release location for the first crayfish - mid point of the test stretch
Param.Plot=0; % Plot figure (1) or not (0)
Param.Video=0; % Save a video (1) or not (0)
Param.BarrierLoc=12500; % Barrier Location
Param.Obstruct=0; % Input obstruction or not
for i=1:1
[FrontUpLoc(i,:),FrontDwnLoc(i,:),DailyMeanBiomass(i,:),Crayfish_Alive(i,:)] = Crayfish_dispersal_v2(Param);
display(i)
end
clearvars -except Param FrontDwnLoc FrontUpLoc DailyMeanBiomass Crayfish_Alive
save(strcat(Param.RunNumber,'.mat'))