Intertidal Zone Crab Species Distribution Model

Intertidal Zone Crab Species Distribution Model preview image

1 collaborator

Default-person Alma Ceja (Author)

Tags

biology 

Tagged by Alma Ceja almost 6 years ago

climate change 

Tagged by Alma Ceja almost 6 years ago

crab 

Tagged by Alma Ceja almost 6 years ago

ecology 

Tagged by Alma Ceja almost 6 years ago

global warming 

Tagged by Alma Ceja almost 6 years ago

intertidal zone 

Tagged by Alma Ceja almost 6 years ago

species distribution model 

Tagged by Alma Ceja almost 6 years ago

thermophysiology 

Tagged by Alma Ceja almost 6 years ago

Visible to everyone | Changeable by everyone
Model was written in NetLogo 6.0.2 • Viewed 546 times • Downloaded 23 times • Run 0 times
Download the 'Intertidal Zone Crab Species Distribution Model' modelDownload this modelEmbed this model

Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)


WHAT IS IT?

This is a rule-based species distribution model, in which the agents (crabs) compete, migrate, and die in response to their environment's (rocky intertidal shore) thermal conditions.

HOW IT WORKS

The environment is divided in two zones: low (patches 1-10) and high (patches 10-20). Each patch represents a micro-habitat (rock) within the zone, the color of which indicates the temperature range of that micro-habitat. The temperature changes with each tick (day). This temperature cycle spans the length of 295 ticks (one simulation year).

Agents are intially randomly distributed within the environment. They then compete, migrate, and die in response to the changing temperature and dependent upon their class. There are three classes of agents, the first of which contains four sub-classes.

  1. Adult and sub-adults a. small b. medium-small c. medium-large d. large
  2. Gravid (i.e. carrying eggs)
  3. Competitor adult and sub-adults

Each agent is assigned the attributes of a migration temperature, a lethal temperature, and a competition factor. Migration and lethal temperatures are calculated as a function of agent size. These parameters are used in implementing four rules:

  1. If the temperature of the patch is greater than the lethal temperature, the agent dies.
  2. If the temperature of the patch is less than the lethal temperature but greater than the migration temperature, the agent moves randomly to an adjacent patch until it reaches a patch with a temperature less than its migration temperature.
  3. If the temperature of the patch is less than the migration temperature, the agent remains in its location.
  4. If an agent occupies a patch with an agent smaller than itself, it will compete with the smaller agent. The loser will move according to Rule 2. Note: Rule 4 will be implemented only if the 'competition' switch is on.

HOW TO USE IT

Initiating the model:

  1. Set the 'environment' and 'crabs' switches to on.
  2. Set the 'small', 'mediumsmall', 'mediumlarge', and 'large' sliders to the desired number of individuals per sub-class.
  3. Set the 'migration' and 'lethality' switches to on.
  4. Set the 'migrationprobability' and 'lethalityprobability' to the desired value. Note: A greater value will result in a higher rate of migration/death. A value of zero will result in no migration/death.
  5. Set the 'simulation_duration' chooser to the desired value.
  6. Optional: Set the 'competition'/'gravid_crabs' switch to on.
  7. Optional: Set the 'competition'/'gravid' sliders to the desired number of individuals per class.
  8. Optional: To run model under warming scenarios, set 'temp_increase' slider to desired rise in environmental temperature per patch.
  9. Press the 'setup' button. 10.Press the 'go' button.

Monitors:

'crabs in low zone': total number of all classes of agents in the low zone. 'crabs in high zone': total number of all classes of agents in the high zone. 'total crabs': total number of all classes of agents. 'total gravid crabs': total number of gravid agents. 'total competitors': total number of competitor agents.

Plots:

Environmental Temperature: Line plot of mean temperature per zone over time. Initial Size Distribution per Size Class: Histogram of frequency of individuals of a given size per class. Population Distribution: Line plot of the number of individuals per zone over time. Population Distribution per Size Class: Line plot of the number of individuals per zone and class over time. Population Abundance: Line plot of the number of individuals over time. Population Abundance per Size Class: Line plot of the number of individuals per size class over time.

THINGS TO NOTICE

Notice how drops in population abundance/distribution coincide with peaks in temperature.

When competition/gravid crabs are included, the rate of migration/death increases.

When the 'temp_increase' slider is set to a value greater than zero, notice how the rate of population migration/death increases as a function of degrees.

THINGS TO TRY

Vary the probabilities of migration/lethality to test for the sensitivity of these parameters to the population distribution/abundance.

Vary the initial conditions including the starting number of individuals per class, the presence/absence of competition/gravid crabs to test the sensitivity of the population to competing/gravid factors.

Vary the rise in temperature to model the effects of a warming environment on the population distribution and abundance

EXTENDING THE MODEL

This model can be extended by adding more layers of community interactions, such as a food source, and responses to other environmental variables.

NETLOGO FEATURES

Note the cycling through of temperatures in a 'sliding window' fashion, where on a given tick, any patch can draw from one of three concurrent 'days' from the CSV files containing a list of lists of temperatures.

RELATED MODELS

Check out Uri Wilensky's classic 'Sheep and Wolf Predation' model of ecological interactions between two species and their environment.

CREDITS AND REFERENCES

This model and associated files can be found at its webpage on the NetLogo Modeling Commons.

This model was created in collaboration with Drs. Alex Gunderson and Jonathon Stillman. It was funded by the National Science Foundation, the National Institutes of Health, the Achievement Rewards for College Scientists Foundation, Sodexo USA Inc., and the Romberg Tiburon Center for Environmental Studies of San Francisco State University.

Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern University, Evanston, IL.

Comments and Questions

Please start the discussion about this model! (You'll first need to log in.)

Click to Run Model

globals [loTemps hiTemps]
extensions [csv]
breed [smallCrabs smallCrab]
breed [medsmallCrabs medsmallCrab]
breed [medlargeCrabs medlargeCrab]
breed [largeCrabs largeCrab]
breed [gravidCrabs gravidCrab]
breed [compCrabs compCrab]
smallCrabs-own [width deathTemp deathProb moveTemp moveProb]
medsmallCrabs-own [width deathTemp deathProb moveTemp moveProb]
medlargeCrabs-own [width deathTemp deathProb moveTemp moveProb]
largeCrabs-own [width deathTemp deathProb moveTemp moveProb]
gravidCrabs-own [width deathTemp deathProb moveTemp moveProb]
compCrabs-own [width deathTemp deathProb moveTemp moveProb compProb]
patches-own [patchTemp]

to setup
  clear-all

  file-close-all

  initiate-globals

  if environment
  [ask patches [setup-environment]]

  if crabs
  [create-smallCrabs small
    ask smallCrabs [setup-small-crabs]
   create-medsmallCrabs medium_small
    ask medsmallCrabs [setup-medium-small-crabs]
   create-medlargeCrabs medium_large
    ask medlargeCrabs [setup-medium-large-crabs]
   create-largeCrabs large
    ask largeCrabs [setup-large-crabs]]

  if gravid_crabs
  [create-gravidCrabs gravids
    ask gravidCrabs
    [setup-gravid-crabs]]

  if competition
  [create-compCrabs competitors
    ask compCrabs
    [setup-comp-crabs]]

  reset-ticks
end 

to go
  if crabs
  [ask smallCrabs [analyze-temperature]
   ask medsmallCrabs [analyze-temperature]
   ask medlargeCrabs [analyze-temperature]
   ask largeCrabs [analyze-temperature]]

  if gravid_crabs
  [ask gravidCrabs [analyze-temperature]]

  if competition
  [ask compCrabs
   [analyze-temperature
      if pycor >= 10 [bk 1]]]

  if competition
   [ask smallCrabs [compete]
    ask medsmallCrabs [compete]
    ask medlargeCrabs [compete]
    ask largeCrabs [compete]
    ask gravidCrabs [compete]
    ask compCrabs [compete]]

  if environment
  [ask patches [setup-environment]]

  ;This code removes the first list item from the list of temperature lists file, setting up the sliding-window procedure.
  if environment
  [set loTemps remove-item 0 loTemps
   set hiTemps remove-item 0 hiTemps]

  tick

  ;Using a longer/shorter simulation duration requires stop tick value to be adjusted depending upon input CSV file length.
  if ticks = 296
  [ifelse simulation_duration = "2 years"
    [initiate-globals
      ask patches [setup-environment]]
    [stop]]

  if ticks = 592 [stop]
end 

to initiate-globals
;This procedure reads in the CSV file as a list of lists.
   set loTemps (list)
   file-open "loZone.csv"
   while [not file-at-end?][set loTemps lput file-read loTemps]
   file-close

   set hiTemps (list)
   file-open "hiZone.csv"
   while [not file-at-end?][set hiTemps lput file-read hiTemps]
   file-close
end 

to setup-environment
  ;This code randomly sets a patch's temperature to a value from one of the first three list of temperatures in the list of lists CSV file.
  ifelse (pycor <= 10)
  [set patchTemp one-of (one-of (sublist loTemps 0 3)) + temp_increase]
  [set patchTemp one-of (one-of (sublist hiTemps 0 3)) + temp_increase]

  ;This code colors patches by their temperature.
  ifelse (patchTemp <= 20)
  [set pcolor blue]
  [ifelse (patchTemp <= 30)
    [set pcolor yellow]
    [set pcolor red]]
end 

to setup-small-crabs
  set width 4 + random-float 3
  set size 1
  setup-crabs
end 

to setup-medium-small-crabs
  set width 7 + random-float 3
  set size 1.5
  setup-crabs
end 

to setup-medium-large-crabs
  set width 10 + random-float 3
  set size 1.5
  setup-crabs
end 

to setup-large-crabs
  set width 13 + random-float 8
  set size 2
  setup-crabs
end 

to setup-crabs
  setxy random-xcor random-ycor
  set shape "crab"
  set color red
  ;deathTemp and moveTemp functions determined from laboratory experiments
  set deathTemp (-0.1492 * width) + 32.95
  set moveTemp (-0.8768 * width) + 35.12
  set deathProb random-float 1
  set moveProb random-float 1
end 

to setup-gravid-crabs
  set width 4 + random-float 17
  if width > 7 [set size 1]
  if width <= 7 and width > 10 [set size 1.5]
  if width > 10 [set size 2]
  setxy random-xcor random-ycor
  set shape "crab"
  set color pink
  ;deathTemp and moveTemp functions determined from laboratory experiments
  set deathTemp (-0.0143 * (width ^ 2)) + (0.3203 * width) + 29.334
  set moveTemp (0.0361 * (width ^ 2)) - (1.0023 * width) + 26.186
  set deathProb random-float 1
  set moveProb random-float 1
end 

to setup-comp-crabs
  set width 4 + random-float 17
  if width > 7 [set size 1]
  if width <= 7 and width > 10 [set size 1.5]
  if width > 10 [set size 2]
  setxy random-xcor random 10
  set shape "crab"
  set color violet
  ;deathTemp and moveTemp functions determined from laboratory experiments
  set deathTemp (-0.0143 * (width ^ 2)) + (0.3203 * width) + 26.334
  set moveTemp (-0.0381 * (width ^ 2)) + (0.8178 * width) + 20.248
  set deathProb random-float 1
  set moveProb random-float 1
end 

to analyze-temperature
 if death
 [if patchTemp > deathTemp and deathProb < death_probability [die]]

 if migration
 [if patchTemp > moveTemp and moveProb < migration_probability [move]]

  set deathProb random-float 1
  set moveProb random-float 1
end 

to move
;This procedure initiates movement to a random adjacent patch.
  right(random 181) - 90
  right(random 21) - 10
  fd 1
end 

to compete
 ask smallCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
 ask medsmallCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
 ask medlargeCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
 ask largeCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
 ask gravidCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
 ask compCrabs in-radius 0.5 with [width < ([width] of myself)] [move]
end 

There is only one version of this model, created almost 6 years ago by Alma Ceja.

Attached files

File Type Description Last updated
hiZone.csv data List of temperatures for higher intertidal zone. almost 6 years ago, by Alma Ceja Download
Intertidal Zone Crab Species Distribution Model.png preview Preview for 'Intertidal Zone Crab Species Distribution Model' almost 6 years ago, by Alma Ceja Download
loZone.csv data List of temperatures for lower intertidal zone almost 6 years ago, by Alma Ceja Download

This model does not have any ancestors.

This model does not have any descendants.