Forest Dynamic Model I - Rosindell et al 2010

No preview image

1 collaborator

Tags

(This model has yet to be categorized with any tags)
Visible to everyone | Changeable by the author
Model was written in NetLogo 6.3.0 • Viewed 38 times • Downloaded 4 times • Run 0 times
Download the 'Forest Dynamic Model I - Rosindell et al 2010' modelDownload this modelEmbed this model

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

extensions [table csv]
globals [rspec speciation specia spc spec  rspec0 Wvec V K W-vec index speciesi meta-speciesi JM meta-sp meta-time meta-a0  meta-j2 meta-a meta-set2 extinct-species number-of-meta-trees a initial-meta-richness dlocx dlocy random-number2 number time num j x-cor y-cor N richness a0 n-speciation local-set local-di-set local-off-set set-species-who-di set-species-who-off sp hist-frq rel-hist-frq s local-set0 remove-set richness-counts species-who-di di-locx di-locy species-who-off set1-species-who-off meta-set effective-meta-cmmunity-size number-of-local-trees item-x meta-set-new meta-sp-count sp-count j1 i1 k1 j2 i2 k2 meta-richness-counts meta-richness local-richness-counts local-richness hist-frq-meta rel-hist-frq-meta hist-frq-local rel-hist-frq-local]
breed [meta-trees meta-tree]
breed [trees tree]
meta-trees-own [species meta-species n-speciation-no]
trees-own [species h]
circles-own []
breed [circles a-circle]
patches-own[elevation]

to setup3
  clear-all
  set local-richness-counts map count table:values table:group-agents trees [species]
  set local-richness length local-richness-counts
  set sp 0
  set meta-sp 0
  set speciation 0
  set specia []
  set spec []
  set Wvec []
  set J (w1 + 1) * (w1 + 1)
  resize-world 0 w1 0 w1
  set JM 0
  set K J
  species-gen1
  set hist-frq-local sort-by > map count table:values table:group-agents trees [ species ]
  set rel-hist-frq-local map [ i -> i / count trees ] hist-frq-local
  set richness-counts map count table:values table:group-agents turtles [ species ]
  set richness length richness-counts
  set hist-frq-meta sort-by > map [ i -> i] Wvec
  update-plots
  reset-ticks
end 

to species-gen1
  set k1 -1
  while [k1 < w1 ] [
    set k1 k1 + 1
    set i1 -1
    while [i1 < w1 ] [
      set i1 i1 + 1
      create-trees 1 [
        setxy k1 i1
        set shape "circle"
        set size 1
        set num random-float 1
        set j1 j1 + 1
        set sp sp + 1
        set species sp
        set color random-float -50
        set spec fput sp spec
      ]
    ]
  ]
  set local-richness sp
end 

to go3
  while [K > 0] [
    let r1 random-float 1
    set rspec one-of spec
    set spec remove rspec spec
    if-else (r1 <= theta / (theta + K - 1)) [
      set speciation speciation + 1
      set specia fput rspec specia
      let Wvec1 count trees with [species = rspec]
      set Wvec fput Wvec1 Wvec
      set sp sp + 1
      let color0 60 + random-float -50
      ask trees with [species = rspec] [
        set species sp
        set color color0
        ;set shape "arrow"
      ]
    ]
    [
      set rspec0 one-of spec
      let color01 [color] of one-of trees with [species = rspec0]
      ask trees with [species = rspec] [
        set species rspec0
        set color color01
      ]
    ]
    set K K - 1
    set richness-counts map count table:values table:group-agents trees [ species ]
    set richness length richness-counts
    set hist-frq-local sort-by > map count table:values table:group-agents trees [ species ]
    set rel-hist-frq-local map [ i -> i / count trees ] hist-frq-local
    set hist-frq-meta sort-by > map [ i -> i ] Wvec
    update-plots
    tick
  ]
end 


; Copyright 2023g Ruwan Punchi-Manage.
; See Info tab for full copyright and license.

There is only one version of this model, created 8 months ago by Ruwan Punchi-Manage.

Attached files

No files

This model does not have any ancestors.

This model does not have any descendants.