Algae

Algae preview image

3 collaborators

Uri_dolphin3 Uri Wilensky (Author)
Josh3 Josh Unterman (Author)
Allan Konopka (Author)

Tags

biology 

Tagged by Reuven M. Lerner over 11 years ago

ecology 

Tagged by Tim Denton almost 13 years ago

Parent of 1 model: Child of Algae
Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 1320 times • Downloaded 145 times • Run 8 times
Download the 'Algae' 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 model of a simplified aquatic ecosystem consisting of a column of water containing algae, light, and nutrients. There is more light at the top but more food at the bottom, so algae move up and down to balance their needs.

HOW IT WORKS

Algae need both light and nutrients (such as ammonia and phosphate) in order to grow. Although there is ample light near the lake surface, there are few nutrients. On the other hand, it is dark deep in the lake, but there is a lot of ammonia and phosphate down there. Some algae can move up and down in the water column to get both light and nutrients. These algae make dense substances using the energy from light in order to make them sink, and then burn up those dense substances in the dark at the deeper parts of the water column.

The algae move up and down in the water column based on how dense they are. The algae's density is something that changes continuously based on how much light they are able to get during the day. Density decreases some every turn because the algae use the dense substances to produce chemical energy. However, the algae can also use light energy to make the dense substances. The more light present, the denser they get. When they become denser than water, they move down. Deeper water gets less light, so the deeper algae goes, the less density it is able to add. When algae becomes less dense than water, it moves up towards the surface again. Also, as the seasons change, the length of the day changes, which changes how much light is present throughout the day.

HOW TO USE IT

The SETUP button prepares the ecosystem and the GO button runs the simulation.

The LIGHT-SPREADINESS slider changes how much the light penetrates the water. The higher the "spreadiness," the more light can reach down into the water. If the DAY-AND-NIGHT? switch is on, the DAY-LENGTH slider changes how much of each day has sunlight. If it is off, light does not change throughout the day. If the CHANGE-DAY-LENGTH? switch is on, DAY-LENGTH changes as GO is running, simulating the changes of the seasons. If it is off, DAY-LENGTH will only change manually.

The AVERAGE-HEIGHT plot shows a history of the average height of the algae over the past 24 hour period. The DAY-LENGTH plot show the history of the DAY-LENGTH slider. The ALGAE-DISTRIBUTION plot shows the current position of the algae. Lower algae appear farther to the right in the plot.

THINGS TO NOTICE

Notice how as the days get longer, the average height of the algae gets lower. Similarly, as the days get shorter, the average height of the algae gets higher. Also, the more the light penetrates the water, the lower the algae are on average.

The color of the patches indicate the light intensity at that depth in the water column --- the more yellow, the more light is present.

Sometimes the algae clumps all together and sometimes the algae forms multiple clumps.

THINGS TO TRY

To get time to pass faster, use the speed slider.

Turn off DAY-AND-NIGHT? to see that the algae still go up and down when the sun is always shining.

How does having lots of LIGHT-SPREADINESS and a small DAY-LENGTH compare to having little LIGHT-SPREADINESS and a big DAY-LENGTH? (It'll help to turn off CHANGE-DAY-LENGTH?.)

EXTENDING THE MODEL

Even though algae need both light and nutrients, this simple model only considers the role of light. Add a nutrient gradient in the water column. The floor could contain nutrients and the algae might contribute to the gradient when they die.

When real algae are healthy, they grow new algae. Also, when they run out of food, they die. Add these rules to the model.

NETLOGO FEATURES

In the spread-light procedure, the water patches grab light from the patch directly above them. Note the use of the foreach and sort primitives to ensure that the patches are asked in the desired order.

In order to display all of the elements of the control strip above it, the 2D View needs to be of a certain minimum width, so world-width is larger than it needs to be. The necessary patches are stored as patch agentsets in the air, water, and ground global variables and the setup-environment procedure "gets rid" of the unnecessary patches:

ask patches with [pxcor != 0] [
  set pcolor gray + 1.75
]

CREDITS AND REFERENCES

This model is based on a preliminary model developed by Allan Konopka at the 2004 NetLogo workshop at Northwestern University.

Thanks to Josh Unterman for his work on this model.

HOW TO CITE

If you mention this model in a publication, we ask that you include these citations for the model itself and for the NetLogo software:

  • Wilensky, U. (2005). NetLogo Algae model. http://ccl.northwestern.edu/netlogo/models/Algae. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.
  • Wilensky, U. (1999). NetLogo. http://ccl.northwestern.edu/netlogo/. Center for Connected Learning and Computer-Based Modeling, Northwestern Institute on Complex Systems, Northwestern University, Evanston, IL.

COPYRIGHT AND LICENSE

Copyright 2005 Uri Wilensky.

CC BY-NC-SA 3.0

This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at uri@northwestern.edu.

Comments and Questions

Click to Run Model

globals [
  algae-height-list
  ;;; some patch agentsets to make things easier to read
  air
  water
  ground
]

patches-own [ light ]

breed [ algae an-algae ]

algae-own [ ballast ]

;;;;;;;;;;;;;;;;;;;;;;
;; SETUP PROCEDURES ;;
;;;;;;;;;;;;;;;;;;;;;;

to setup
  clear-all
  setup-globals
  setup-environment
  setup-algae
  update-algae-height-list
  reset-ticks
end 

to setup-globals
  set algae-height-list []
  set air patches with [ pxcor = 0 and pycor = max-pycor ]
  set water patches with [ pxcor = 0 and abs pycor != max-pycor ]
  set ground patches with [ pxcor = 0 and pycor = min-pycor ]
end 

to setup-environment
  ask air [ set light 1 ]
  ask ground [ set light 0 ]
  ask water [ set light 0 ]
  ask patches with [ pxcor != 0 ] [
    set pcolor gray + 1.75
  ]
  recolor-environment true
end 

to recolor-environment [setting-up?]
  ask air [
    if day-and-night? [
      ifelse setting-up? or daytime? [
        set pcolor yellow + 3
      ] [
        set pcolor black
      ]
    ]
  ]
  ask ground [
    set pcolor brown
  ]
  ask water [
    ifelse light > 0 [
      ;; make water with more light brighter yellow
      set pcolor yellow - 4 + light * 7
    ] [
      ;; make deeper water darker so things are prettier
      set pcolor blue - 2 - 0.1 * distance one-of air
    ]
  ]
end 

to setup-algae
  set-default-shape algae "algae"
  create-algae 50 [
    set ballast 0.3 + random-float 0.4
    set heading 0
    set color one-of [red yellow lime sky]
    setxy 0 [pycor] of one-of water
    ;; spread the algae throughout the water patches
    setxy xcor - 0.2 + random-float 0.4
          ycor - 0.5 + random-float 1
  ]
end 

;;;;;;;;;;;;;;;;;;;
;; GO PROCEDURES ;;
;;;;;;;;;;;;;;;;;;;

to go
  if not any? algae [ stop ]
  ;; 24 hour days
  let day ticks / 24
  ;; assume all months are the same length
  let month day / 10
  ;; day length cycles up and down based on the time of year
  if change-day-length? [
    set day-length 12 + 4 * sin ( month * 180 / 12 )
  ]
  if day-and-night? [
    spread-light
  ]
  ask algae [
    change-ballast light
  ]
  ask algae [
    move
  ]
  recolor-environment false
  update-algae-height-list
  ;; advance tick counter without plotting
  tick-advance 1
  ;; let things go for a bit before starting the plotting
  if ticks > 100 [ update-plots ]
end 

to change-ballast [ light-present ] ; algae procedure
  ;; algae lose some ballast per hour (but don't get less than 0)
  set ballast max list 0 (ballast - 0.1)
  ;; the amount of new ballast depends on how much light and has some randomness
  let new-ballast light-present - random-float 0.05
  ;; ballast can't be greater than 1
  set ballast min list 1 ballast + new-ballast
end 

to move ; algae procedure
  ;; if ballast is empty, amount-to-move is 1
  ;; if ballast is full, amount-to-move is -1
  ;; ballast stays between 0 (empty) and 1 (full)
  let amount-to-move (1 - (2 * ballast))
  if amount-to-move > 0 [
    ;; algae don't go into the air
    let distance-to-air (max-pycor - 0.5 - ycor)
    set amount-to-move min list distance-to-air amount-to-move
  ]
  fd amount-to-move
  ;; algae die if on the bottom
  if member? patch-here ground [ die ]
end 

to spread-light
  ifelse daytime? [
    ask air [ set light 1 ]
    ask water [ set light 0 ]
    ;; we sort the water patches top to bottom and then ask them in turn
    ;; to grab some light from above
    foreach sort water [
      ask ? [
        let light-gained light-spreadiness * [light] of patch-at 0 1
        set light light + light-gained
      ]
    ]
  ] [
    ask air [ set light 0 ]
    ask water [ set light 0 ]
  ]
end 

to-report daytime?
  report ticks mod 24 < day-length
end 

to update-algae-height-list
  let current-algae-height mean [ycor] of algae
  set algae-height-list fput current-algae-height algae-height-list
  if length algae-height-list > 24
    [ set algae-height-list sublist algae-height-list 0 24 ]
end 


; Copyright 2005 Uri Wilensky.
; See Info tab for full copyright and license.

There are 10 versions of this model.

Uploaded by When Description Download
Uri Wilensky over 11 years ago Updated to NetLogo 5.0.4 Download this version
Uri Wilensky about 12 years ago Updated version tag Download this version
Uri Wilensky about 12 years ago Updated to version from NetLogo 5.0.3 distribution Download this version
Uri Wilensky almost 13 years ago Updated to NetLogo 5.0 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Updated from NetLogo 4.1 Download this version
Uri Wilensky over 14 years ago Model from NetLogo distribution Download this version
Uri Wilensky over 14 years ago Algae Download this version

Attached files

File Type Description Last updated
Algae.png preview Preview for 'Algae' over 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

Children:

Graph of models related to 'Algae'