Grand Canyon CSP

Grand Canyon CSP preview image

1 collaborator

Default-person Darrin Wilcoxson (Author)

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.1.1 • Viewed 89 times • Downloaded 11 times • Run 0 times
Download the 'Grand Canyon CSP' 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 https://www.nrcs.usda.gov/wps/portal/nrcs/detail/national/?&cid=nrcs143_021626. 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: https://lta.cr.usgs.gov/NED ArcGIS: http://www.esri.com/software/arcgis My World GIS: http://www.myworldgis.org/

Thanks to Eric Russell for his work on this model.

HOW TO CITE

If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:

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 https://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

Please start the discussion about this model! (You'll first need to log in.)

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
  ;; put a little padding on the upper bound so we don't get too much
  ;; white, and higher elevations have a little more variation.
  set color-max max patch-elevations + 200
  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 data from the file into the sorted patches
  (foreach sort patches patch-elevations [ [the-patch the-elevation] ->
    ask the-patch [ set elevation the-elevation ]
  ])
  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 [ pen-down ] ]
    [ ask turtles [ pen-up ] ]

  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 is only one version of this model, created about 3 years ago by Darrin Wilcoxson.

Attached files

File Type Description Last updated
Grand Canyon CSP.png preview Preview for 'Grand Canyon CSP' about 3 years ago, by Darrin Wilcoxson Download

This model does not have any ancestors.

This model does not have any descendants.