Grand Canyon

Grand Canyon preview image

2 collaborators

Uri_dolphin3 Uri Wilensky (Author)
Default-person Eric Russell (Author)

Tags

earth science 

Tagged by Reuven M. Lerner over 10 years ago

Model group CCL | Visible to everyone | Changeable by group members (CCL)
Model was written in NetLogo 5.0.4 • Viewed 761 times • Downloaded 66 times • Run 0 times
Download the 'Grand Canyon' 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 model simulates rainfall on a patch of terrain on the eastern end of the Grand Canyon, approximately 6 miles (9.7 km) on each side, where Crazy Jug Canyon and Saddle Canyon meet to form Tapeats Canyon. Each patch represents an area approximately 105 feet (32 m) on each side. The model was created as an experiment in using NetLogo with My World GIS.

The elevation data comes from the National Elevation Dataset available at http://seamless.usgs.gov. It was converted from an ESRI Grid into an ASCII grid file using ArcGIS, then resampled to its current resolution and rescaled to lie in the range 0-999 using My World GIS.

HOW IT WORKS

Raindrops fall in random locations or at locations selected by the user, then flow downhill. If no nearby patch has a lower elevation, the raindrop stays where it is. Raindrops pool until they flow over the land nearby. Some raindrops may always stay in these pools at higher ground. Others will flow out of the system at the edges.

HOW TO USE IT

When you open the model, the STARTUP procedure automatically runs and imports the data from an external file. Press SETUP to color the patches according to their elevation, and to remove raindrops and drawings from previous runs. Press the GO button to start the simulation. With each tick, RAIN-RATE raindrops will fall at random locations, traveling downhill across the landscape.

As the simulation runs, you may click anywhere on the map to create raindrops. Manually placed raindrops are red, while those created randomly by the model are blue. The WATCH RANDOM RAINDROP button sets the perspective to watch a randomly selected raindrop (of any type). The WATCH MY RAINDROP button watches a red raindrop, if one exists.

When the DRAW? switch is turned on each raindrop marks its path in the drawing layer.

THINGS TO NOTICE

Elevations are represented by lighter and darker colors. The higher the elevation, the lighter the color used to draw that patch. Raindrops flow from high to low elevations, meaning that they flow toward darker patches.

When you let the model run for a long time, you will see pools start to form at certain locations where a bit of low land is surrounded by higher land. If you let the model run long enough, the water will eventually overflow from these dips, flowing to the rivers below.

THINGS TO TRY

Put the turtle pens down (by turning on the DRAW? switch), and see the kinds of patterns that emerge.

Try to place all of the raindrops manually. Trace the path of one drop all the way down the landscape.

Find more GIS data and import different data sets.

EXTENDING THE MODEL

Add erosion to the model, so the raindrops pick up or deposit some amount of elevation from the patches they travel over.

NETLOGO FEATURES

When there is no lower neighboring patch, raindrops change breed (from raindrop to waters) so they will no longer move.

Elevation data is read only once, when the model is loaded, in the startup procedure. The external data file (Grand Canyon data.txt) is formatted such that its contents can be assigned (with file-read) to a NetLogo variable.

RELATED MODELS

Erosion

CREDITS AND REFERENCES

National Elevation Dataset: http://seamless.usgs.gov ArcGIS: http://esri.com/software/arcgis/ My World GIS: http://myworldgis.org/myworld

Thanks to Eric Russell 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. (2006). NetLogo Grand Canyon model. http://ccl.northwestern.edu/netlogo/models/GrandCanyon. 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 2006 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

breed [waters water]
breed [raindrops raindrop]

patches-own [
  elevation
]

globals [
  color-min
  color-max
  old-show-water?
  water-height    ;; how many feet tall one unit of water is
  border          ;; keep the patches around the edge in a global
                  ;; so we don't ever have to ask patches in go
]

;;
;; Setup Procedures
;;

;; reading the external file is startup rather
;; than setup so we only do it once in the model
;; running the model does not change the elevations

to startup
  ;; read the elevations from an external file
  ;; note that the file is formatted as a list
  ;; so we only have to read once into a local variable.
  file-open "Grand Canyon data.txt"
  let patch-elevations file-read
  file-close
  set color-max max patch-elevations + 200 ;; put a little padding on the upper bound so we don't get too much
                                           ;; white and higher elevations have a little more variation.
  let min-elevation min patch-elevations
  ;; adjust the color-min a little so patches don't end up black
  set color-min min-elevation - ((color-max - min-elevation) / 10)
  ;; transfer the date from the file into the sorted patches
  ( foreach sort patches patch-elevations
    [ ask ?1 [ set elevation ?2 ] ] )
  set-default-shape turtles "circle"
  setup
end 

;; just clean up the marks that the raindrops have made
;; and set some global variable to defaults

to setup
  clear-drawing
  clear-turtles
  ask patches
    [ set pcolor scale-color brown elevation color-min color-max ]
  set water-height 10
  set border patches with [ count neighbors != 8 ]
  reset-ticks
end 

;;
;; Runtime Procedures
;;

to go
  ;; check for mouse clicks on empty patches.
  ;; if we've got a winner make a manual raindrop that
  ;; is red.
  if mouse-down? and not any? turtles-on patch mouse-xcor mouse-ycor
  [
    ;; even when raindrops are hidden
    ;; newly created manual drops will
    ;; be visible
    create-raindrops 1
    [ setxy mouse-xcor mouse-ycor
      set size 2
      set color red
    ]
  ]
  ;; make rain-rate drops randomly
  create-raindrops rain-rate
  [ move-to one-of patches
    set size 2
    set color blue ]

  ifelse draw?
    [ ask turtles [ pd ] ]
    [ ask turtles [ pu ] ]

  ask raindrops [ flow ]

  ask border
  [
    ;; when raindrops reach the edge of the world
    ;; kill them so they exit the system and we
    ;; don't get pooling at the edges
    ask turtles-here [ die ]
  ]
  tick
end 

to flow ;; turtle procedure
  ;; get the lowest neighboring patch taking into account
  ;; how much water is on each patch.
  let target min-one-of neighbors [ elevation + (count turtles-here * water-height) ]
  ;; if the elevation + water on the neighboring patch is
  ;; lower than here move to that patch.
  ifelse [elevation + (count turtles-here * water-height)] of target
     < (elevation + (count turtles-here * water-height))
    [ move-to target ]
    [ set breed waters ]
end 


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

There are 10 versions of this model.

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

Attached files

File Type Description Last updated
Grand Canyon.png preview Preview for 'Grand Canyon' about 11 years ago, by Uri Wilensky Download

This model does not have any ancestors.

This model does not have any descendants.