7th Grade Science - Understanding & Using Climate Data

Modeling Climate Data

Download NetLogo

Climate Change Model


  1. Select Download
  2. Select File + Save Page As
  3. Select Save
  4. Select Use .nlogo
  5. Open file

Instructions for sending NetLogo files:


  • Select File -> Save As
  • Save the file as firstinitiallastnamefilename (eg. kwilkensclimate)
  • Open e-mail & start a new e-mail to kwilkens@stab.org
  • Attach the file you just saved (look for paperclip)
  • Send

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.

Climate Data Sites:


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:
  • 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

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):
create-cars 20 [
setxy random-float 40 - 20 0
let coinflip random 2
 ifelse coinflip = 0
 [ set heading 90 ]
 [ set heading -90 ]
]