Understanding and Using Climate Data
Climate Change Model
Download NetLogo. It will create a NetLogo folder. Be sure to put that folder somewhere you can find it again. Download climate change file below and open in NetLogo. |
Instructions for sending NetLogo files:
|

climatechangev2.nlogo |
Intro to NetLogo
Turtles: The objects that you control with your programming. Each turtle has a position, heading, color and pen. You can add more specialized traits and properties.
Patches. The piece of the world in which the turtles live. Like turtles, patches can execute Logo commands, and they can act on turtles and patches. Patches are arranged in a grid, with each patch corresponding to a square in the Graphics area.
Observer. The observer "looks down" on the turtles and patches from a bird's eye perspective. The observer can create new turtles, and it can monitor the activity of the existing turtles and patches.
Turtles: The objects that you control with your programming. Each turtle has a position, heading, color and pen. You can add more specialized traits and properties.
Patches. The piece of the world in which the turtles live. Like turtles, patches can execute Logo commands, and they can act on turtles and patches. Patches are arranged in a grid, with each patch corresponding to a square in the Graphics area.
Observer. The observer "looks down" on the turtles and patches from a bird's eye perspective. The observer can create new turtles, and it can monitor the activity of the existing turtles and patches.
Hacking the Climate Change Model
Update the values of 3 variables:
You will select 3 variables to change in the code. Before changing a variable, setup the model how you will run it each time, then run it to 100,000 ticks and record observation. Change value of the variable in the code. Predict how the new value will affect the model. Run model to 100,000 ticks and record observation. Change variable back and pick a new one. Values you can change:
Create a new breed that will affect the model (eg. cars adding CO2 or plants removing CO2). Here are the commands, procedures & buttons you will need to setup/update:
Get new breed to interact with model. See code examples below. Remember to change the plants/plant breed to the name of your breed.
Place breed into model (create a button to call):
to add-plant
create-plants 1 [
set color green
set size 3
;; pick a random position on the ground
setxy random-xcor
earth-top + 2
]
end
Remove breed from model (create a button to call):
to remove-plant ;; randomly remove 1 plant
if any? plants [
ask one-of plants [die]
]
end
Absorb CO2 example (call procedure from go):
to absorb-CO2
ask CO2s [
if any? plants-here [die]
]
end
Create CO2 example (call procedure from go):
to release-CO2
ask plants [
if random 1000 = 0 [
hatch-CO2s 1 [
set color black
set size 1
setxy xcor ycor + 10
]
]
]
end
Get your breed moving example (add to setup code):
to move-plants [
setxy random-float 40 - 20 0
let coinflip random 2
ifelse coinflip = 0
[ set heading 90]
[ set heading -90 ]
]
end
Update the values of 3 variables:
You will select 3 variables to change in the code. Before changing a variable, setup the model how you will run it each time, then run it to 100,000 ticks and record observation. Change value of the variable in the code. Predict how the new value will affect the model. Run model to 100,000 ticks and record observation. Change variable back and pick a new one. Values you can change:
- initial temperature
- heading of a turtle
- random numbers (eg. random 50, generates random numbers from 0 to 50)
Create a new breed that will affect the model (eg. cars adding CO2 or plants removing CO2). Here are the commands, procedures & buttons you will need to setup/update:
- create a new breed
- create a new turtle shape & setup-default-shape (under setup)
- create a procedure to add breed to model (eg. to add-newbreed)
- create a procedure to remove breed to model (eg. to remove-newbreed)
- add buttons to call add and remove breed procedures
- add procedure to either absorb or release CO2 (eg. absorb-CO2 or release-CO2 & be sure to call procedure inside go procedure)
Get new breed to interact with model. See code examples below. Remember to change the plants/plant breed to the name of your breed.
Place breed into model (create a button to call):
to add-plant
create-plants 1 [
set color green
set size 3
;; pick a random position on the ground
setxy random-xcor
earth-top + 2
]
end
Remove breed from model (create a button to call):
to remove-plant ;; randomly remove 1 plant
if any? plants [
ask one-of plants [die]
]
end
Absorb CO2 example (call procedure from go):
to absorb-CO2
ask CO2s [
if any? plants-here [die]
]
end
Create CO2 example (call procedure from go):
to release-CO2
ask plants [
if random 1000 = 0 [
hatch-CO2s 1 [
set color black
set size 1
setxy xcor ycor + 10
]
]
]
end
Get your breed moving example (add to setup code):
to move-plants [
setxy random-float 40 - 20 0
let coinflip random 2
ifelse coinflip = 0
[ set heading 90]
[ set heading -90 ]
]
end