Carbon Cycle Model
Model was written in NetLogo 5.0.5
•
Viewed 1749 times
•
Downloaded 68 times
•
Run 0 times
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
Info tab cannot be displayed because of an encoding error
Comments and Questions
Please start the discussion about this model!
(You'll first need to log in.)
Click to Run Model
globals [ lithosphere ;to set up lithosphere atmosphere ;to set up atmosphere hydrosphere ;to set up hydrosphere litho-carbon ;amount of carbon in lithosphere atmo-carbon ;amount of carbon in atmosphere hydro-carbon ;amount of carbon in hydrosphere bio-carbon ;amount of carbon in biomass fossil-carbon ;amount of carbon in fossils fuels ppm ;used for calculating ppm gigaton-carbon ;amount carbon in atmosphere in gigatons ppm-old ;used for calculating ppm ppm-new ;ppm carbon in atmosphere gigaton-change ;change in atmospheric carbon scenario-increase ;used for registering an increase in human emissions over time scenario-decrease ;used for registering a decrease in human emissions over time est-global-temp ;the estimated global average temperature worldwide ] breed [carbons carbon] breed [plants plant] breed [outliners outliner] to set-up ;sets up world clear-all reset-ticks setup-world setup-res setup-volcano add-algae end to setup-volcano ;sets up volcano crt 1 [ set shape "volcano" set size 16 setxy -1 3 set heading 0 ] end to setup-world ;create spheres set atmosphere max-pycor - 32 set lithosphere max-pxcor - 32 ask patches [ ;first layer to make lithosphere if pxcor <= lithosphere + 10 [ set pcolor scale-color brown pycor -30 10] ] ask patch -6 -14 [set plabel word "Lithosphere Res: " initial-litho-carbon set plabel-color white] ask patches [ ;add a line for plants if pycor = 0 [set pcolor green] ] ask patches [ ;thickens line of plants if pycor = -1 [ set pcolor green]] ask patches [ ;thickens line of plants if pycor = 1 [set pcolor green] ] ask patches [ ;second layer to make hydrosphere if pxcor > lithosphere + 10 [set pcolor scale-color blue pycor -32 10] ] ask patch -15 11 [set plabel word "Biomass Carbon: " initial-bio-carbon set plabel-color black] ask patch 31 -14 [set plabel word "Hydrosphere Res: " initial-hydro-carbon set plabel-color white] ask patches [ ;last layer to make atmosphere if pycor > atmosphere [set pcolor scale-color sky pycor 32 0] set atmo-carbon 817 ask patch 10 29 [set plabel word "Atmosphere Res: " atmo-carbon set plabel-color white] ask patch -6 -29 [set plabel word "Fossil Carbon: " initial-fossil-carbon] ] crt 1 [set shape "smokestack" set size 7 set color gray setxy -14 2] ask patch -26 5 [sprout-plants 1 [set size 9 set color green set shape "tree border"] ] set initial-hydro-carbon 44000 ;sets default initial carbon amounts set initial-bio-carbon 550 set initial-litho-carbon 2300 set initial-fossil-carbon 10000 set ppm-new (0.074131 * (e ^ (0.0042584 * (2008 + (ticks / 12))))) ;sets initial ppm to show before simulation starts end to setup-res ;sets up colors of reservoirs and sun ask patches [if pycor < -25 and pxcor <= 10 [set pcolor 31]] ask patches [if pycor > 25 [set pcolor black]] crt 1 [set shape "sun" setxy -26 29 set color yellow set size 7] end to go ;carries out the functions of the simulation initial-setup scenario ask carbons [fd 2] calculations human-emission respiration photosynthesis soil-carbon decomposition air-exchange sea-exchange update-values update-labels wait .1 tick end to initial-setup ;initial setup before go if ticks = 0 [ set hydro-carbon initial-hydro-carbon set bio-carbon initial-bio-carbon set litho-carbon initial-litho-carbon set fossil-carbon initial-fossil-carbon ] end to human-emission ;visually sets up the flow of human emissions into the atmosphere reservoir if ticks mod 12 = 0 [ ask patch -15 4 [ sprout-carbons round (emission-multiplier + .49)[ set shape "carbon arrow" set color orange set heading -20 + random 40 ] ] ask carbons [ if pcolor = white - 1 [die]] ] end to respiration ;visually sets up the flow from biomass reservoir to atmosphere reservoir if ticks mod 2 = 0 [ ask patch -25 8 [ sprout-carbons 1 [ set shape "carbon arrow" set color blue set heading 0 + random 30] ] ask carbons [ if pcolor = black [die]] ] end to photosynthesis ;visually sets up the flow from atmosphere reservoir to biomass reservoir ask patch -31 25 [ sprout-carbons 1[ set shape "carbon arrow" set color green set heading 160 + random 20] ask carbons [if pcolor = green [die]]] end to soil-carbon ;visually sets up the flow from biomass reservoir to lithosphere reservoir ask patch -24 -3 [ sprout-carbons 2[ set shape "carbon arrow" set color brown + 2 set heading 160 + random 20] ask carbons [if pcolor = 33 or pcolor = 33.25 [die]] ] end to decomposition ;visually sets up the flow from lithosphere reservoir to atmosphere reservoir if ticks mod 2 = 0 [ ask patch -23 4 [ sprout-carbons 1 [ set shape "carbon arrow" set color brown - 2 set heading 5 + random 20] ] ask carbons [ if pcolor = black [die]] ] end to air-exchange ;visually sets up the flow from atmosphere reservoir to hydrosphere reservoir if ticks mod 4 = 0 [ask patch 15 25 [sprout-carbons 3 [ set shape "carbon arrow" set color white set heading 175 + random 5] ] ask carbons [ if pycor <= -12 [die]] ] end to sea-exchange ;visually sets up the flow from hydrosphere reservoir to atmosphere reservoir if ticks mod 4 = 0 [ask patch 30 1 [sprout-carbons 3 [ set shape "carbon arrow" set color blue + 2 set heading -10 + random 10] ] ask carbons [ if pcolor = black [die]] ] end to scenario ;registers variation due to activation of scenarios ifelse scenario-increase = true and ticks mod (per * 12) = 0 [set emission-multiplier (emission-multiplier + increase-or-decrease-by)] [ifelse scenario-decrease = true and (emission-multiplier - 0.1) > 0 and ticks mod (per * 12) = 0 [set emission-multiplier (emission-multiplier - increase-or-decrease-by)] [set emission-multiplier emission-multiplier] if scenario-decrease = true and (emission-multiplier - increase-or-decrease-by) < 0 [set emission-multiplier 0] ] end to calculations ;formulas used to calculate increase of carbon in ppm in the resevoirs set ppm (0.074131 * (e ^ (0.0042584 * (2008 + (ticks / 12))))) set ppm-old (0.074131 * (e ^ (0.0042584 * (2008 + (ticks - 1) / 12)))) set gigaton-change ((ppm - ppm-old) * 2.13) ;calculates gigaton-change over time set gigaton-carbon (ppm-old * 2.13) set ppm-new (ppm-old + ((gigaton-change * (emission-multiplier - 1)) / 2.13) ) set est-global-temp (ppm-new + 948.83) / 90.787 ;temperature calculation end to update-values ;updates the value of carbon in Gt for all labels set atmo-carbon round (gigaton-carbon + (gigaton-change * (emission-multiplier))) set hydro-carbon hydro-carbon + (((2 / 9) * gigaton-change)) ;distributes carbon set litho-carbon litho-carbon + (((3 / 9) * gigaton-change)) set bio-carbon bio-carbon + (((0 / 9) * gigaton-change)) set fossil-carbon fossil-carbon - (gigaton-change * emission-multiplier) end to update-labels ;adds lithosphere, hydrosphere, atmosphere, fossil, and biomass patch labels ask patch -6 -14 [set plabel word "Lithosphere Res: " round litho-carbon] ask patch 31 -14 [set plabel word "Hydrosphere Res: " round hydro-carbon] ask patch 10 29 [set plabel word "Atmosphere Res: " round atmo-carbon] ask patch -6 -29 [set plabel word "Fossil Carbon: " round fossil-carbon] ask patch -15 11 [set plabel word "Biomass Carbon: " round bio-carbon] end to erupt ;creates an eruption from the volcano ask patch -1 7 [ sprout-carbons 1 [ ;creates a smoke cloud set shape "cloud" set size 7 set color gray - 2 set heading 0 ] ] set gigaton-carbon gigaton-carbon + .00001 ;adds miniscule amount of carbon to atmosphere end to add-algae ;generates algae on the surface of the hydrosphere ask n-of 4 patches with [(pycor = 0 or pycor = 1) and pxcor >= 11][ ;four algae plants sprout-plants 1 ;random places on a specific y cord [ set color green set shape "plant small border" set size 4 ]] end ;Created by: ;Amit Grewal amitgrewal97@yahoo.com Tracy High School ;Evan Laufer evan.m.laufer@gmail.com San Ramon Valley High School ;Joshua Abraham joshpabraham@gmail.com Tracy High School ;Miguel Taruc miguelt17@comcast.net Tracy High School ;Rowen Banton bantonrowen@gmail.com Monte Vista High School ;LLNL Computational Modeling TRA Level 3
There is only one version of this model, created over 10 years ago by Miguel Taruc.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
Carbon Cycle Model.png | preview | Preview for 'Carbon Cycle Model' | over 10 years ago, by Miguel Taruc | Download |
This model does not have any ancestors.
This model does not have any descendants.