Hawaiian fish on seamounts

No preview image

1 collaborator

Paul_hart_july_2020 Paul Hart (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.2.2 • Viewed 104 times • Downloaded 8 times • Run 0 times
Download the 'Hawaiian fish on seamounts' 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

globals [  year days mortality larval-recruits flow-direction distance-travelled  sum-settled-larvae1 sum-settled-larvae2 sum-settled-larvae3 sum-settled-larvae4 sum-settled-larvae5
  sum-settled-larvae6 sum-settled-larvae7 sum-settled-larvae8 sum-settled-larvae9  Time-for-reproduction metamorphosed-larvae
  lifetime-fitness  difference  open-ocean-depth finish   ]
patches-own [ sea-temperature   seamount-depth seamount-number1 seamount-number2 seamount-number3 seamount-number4 seamount-number5 seamount-number6
  seamount-number7 seamount-number8 seamount-number9  seamount-number ]
breed [ eggs egg ]
breed [ larvae larva ]
breed [ settlers settler ]
breed [ adult-fish adult-fishes ]
eggs-own [   ]
larvae-own [  ]
settlers-own [ settler-depth ]
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to setup
  ca
  setup-output-file
  create-ocean ;; sets the background colour to the ocean and gives each patch a depth and sets seamount to 0
  create-seamounts ;; reads from a file the locations of nine seamounts and atols from the NW sector of the Hawaiian seamount chain.
  locate-spawner   ;; locate a single spawner on a seamount chosen as the origin - coloured yellow on the display.
  set year year + 1
  set lifetime-fitness 0 ;; life-time fitness is the number of offspring that find a seamount on which to settle over the fish's lifetime before time runs out
  reset-ticks
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to go
 if ticks = 366 [ set year year + 1 ]
 if ticks = 366 [ reset-ticks ]
 if ticks = 0 [ set sum-settled-larvae1 0  set sum-settled-larvae2 0  set sum-settled-larvae3 0  set sum-settled-larvae4 0  set sum-settled-larvae5 0
    set sum-settled-larvae6 0  set sum-settled-larvae7 0  set sum-settled-larvae8 0  set sum-settled-larvae9 0 ]
 if ticks = 0 [ set metamorphosed-larvae 0 ]
 if ticks = 0 [ set larval-recruits 0 ]
 if year > 15 [ stop ]
set-current
reproduce
egg-drift
larval-drift
larval-settlement
if ticks = finish [ life-time-fitness ]
tick
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to setup-output-file

  if (file-exists? "New_recruits.csv") ;; this routine sets up the file to receive the output.
  [
    carefully
    [ file-delete "New_recruits.csv" ]
    [ print error-message ]
  ]

  file-open "New_recruits.csv"
  file-type "Year,"
  file-type "Current direction,"
  file-type "Number of eggs,"
  file-type "Time as an egg,"
  file-type "Time as a larva,"
  file-type "Larval search time,"
  file-type "Source seamount,"
  file-type "Seamount 1,"
  file-type "Seamount 2,"
  file-type "Seamount 3,"
  file-type "Seamount 4,"
  file-type "Seamount 5,"
  file-type "Seamount 6,"
  file-type "Seamount 7,"
  file-type "Seamount 8,"
  file-type "Seamount 9,"
  file-print "Life-time fitness"
  file-close
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to create-ocean ;; sets up the background ocean.
  ask patches  [ set pcolor 106 set open-ocean-depth 1000 set seamount-number 0 ]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to create-seamounts  ;; this routine sets up seamount from a section of the Emperor-Hawaiian chain.
 ask patches [

  file-open "Seamount_peaks_E-H_chain NR.txt"
  while [not file-at-end?]
  [

    let next-X ( file-read )
    let next-Y ( - file-read )
    let seamount file-read
    ask patch ( next-X ) ( next-Y ) [ set seamount-number seamount ]
    let depth file-read
    ask patch ( next-X ) ( next-Y ) [set seamount-depth depth ]
    ask patch ( next-X ) ( next-Y ) [ ifelse seamount-depth <= viable-depth
    [

    ask patch next-X next-Y [set pcolor green] ]
     [ ask patch next-X next-Y [set pcolor red ] ]
    ]

     ask patch ( next-X ) ( next-Y ) [ if seamount-number = Source-seamount  [ set pcolor yellow ] ]
     ]
  ]


  file-close
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to locate-spawner  ;; this routine sets one adult fish onto a seamount chosen as the source point.
  ask one-of patches with [ pcolor = yellow  ]
  [ sprout-adult-fish 1 [ set shape "fish"
    set size 12 set color red  ]]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to set-current ; a routine that sets the current speed and direction for each day.
  set flow-direction ( random-normal current-direction 50 ) ;;The current direction has a random component to simulate the eddy-like flow of an ocean current.
 set distance-travelled ( current-speed  * 24 ) ;; Current speed set on the slider has units of nautical miles per hour so distance covered in one tick (24h) is calculated.
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to reproduce ;; a routine to get the adult fish to spawn at a given temperature dependent time.
 set Time-for-reproduction ( 140 - 2 * temperature ) ;; the day on which spawning occurs is determined by temperature with spawning time being negatively related to temperature.
if ticks = Time-for-reproduction [ask adult-fish [ hatch-eggs number-eggs
[ set shape "circle" set size 5 set color white ]
]
]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to egg-drift ;; routine to carry the eggs along in the direction of the current flow. They are assumed not to disperse beyond the 1km2 patch size within their time as eggs.
  if ticks < Time-for-reproduction + Time-as-egg
  [
 ask eggs [

   let destination patch-at-heading-and-distance flow-direction distance-travelled ;; these two lines deal with eggs that reach the boundary of the world.
 ifelse destination = nobody                                                                ;; The eggs die once they leave the world and this would happen too in the sea
                                                                                            ;; as seamounts tend to occur in limited areas.
 [
   die
 ]
 [
    move-to destination
    set mortality random-float 0.05
 if mortality < egg-mortality [ die ];; eggs are eaten by planktonic predators and die of disease.

 ]
 ] ]
    if ticks = Time-for-reproduction + Time-as-egg [ ;; at the end of the eggs phase those surviving hatch into larval fish.
       ask eggs
       [ set larval-recruits count eggs
     hatch-larvae larval-recruits [
   set shape "fish" set size 5 set color 18  ]
      ask eggs [ die ] ]
     ]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to larval-drift            ;; routine to carry the larvae along with the direction and speed of the current

if ticks < Time-for-reproduction + Time-as-egg + Time-as-larva
[
ask larvae
[   set flow-direction ( random-normal current-direction 20 )
    let destination patch-at-heading-and-distance flow-direction distance-travelled
 ifelse destination = nobody [ die ]
[
        move-to destination ]
    set mortality random-float 0.05
 if mortality < larval-mortality [ die ]
 ;; as with eggs, larvae are predated upon by other planktonic organisms.

] ]


if ticks = Time-for-reproduction + Time-as-egg + Time-as-larva [  ;; after a set time the larvae begin to metamorphose into the adult form and begin to seek somewhere to settle.
       ask larvae
       [ set metamorphosed-larvae count larvae
     hatch-settlers metamorphosed-larvae [
   set shape "fish" set size 7 set color 16 ]
    ask larvae [ die ] ]
       ]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to larval-settlement  ;; routine that allows the matamorphosing larvae to descend to deeper water to find a place to settle.
set finish ( Time-for-reproduction + Time-as-egg + Time-as-larva + larval-search-time )
ask settlers [
   ifelse pcolor = green [  ;; check to see if the fish is over a seamount
              set settler-depth random-normal 100 20 ;; the settle descends to a depth of 50m ± 20m
              set difference abs ( seamount-depth - settler-depth ) ;; determins how close to the seamount surface the settler is.

               if difference < 10

                   [ if seamount-number = 1 [ set sum-settled-larvae1 sum-settled-larvae1 + 1 ] ;; adds up the number of settlers separately for each seamount.
                     if seamount-number = 2 [ set sum-settled-larvae2 sum-settled-larvae2 + 1 ]
                     if seamount-number = 3 [ set sum-settled-larvae3 sum-settled-larvae3 + 1 ]
                     if seamount-number = 4 [ set sum-settled-larvae4 sum-settled-larvae4 + 1 ]
                     if seamount-number = 5 [ set sum-settled-larvae5 sum-settled-larvae5 + 1 ]
                     if seamount-number = 6 [ set sum-settled-larvae6 sum-settled-larvae6 + 1 ]
                     if seamount-number = 7 [ set sum-settled-larvae7 sum-settled-larvae7 + 1 ]
                     if seamount-number = 8 [ set sum-settled-larvae8 sum-settled-larvae8 + 1 ]
                     if seamount-number = 9 [ set sum-settled-larvae9 sum-settled-larvae9 + 1 ]




                   if difference < 10

                 [ die ];; if the settler is within 10 m of the surface then it settles and it is removed from the population of settlers.
                     ]
  ]
                     [
                        set flow-direction ( random-normal current-direction 20 )
                        let destination patch-at-heading-and-distance flow-direction distance-travelled

                            ifelse destination = nobody

                              [ die ]

                              [
                                move-to patch-at-heading-and-distance flow-direction distance-travelled
                                set mortality random-float 0.05
                                if mortality < settler-mortality [ die ]
                              ]
                     ]
                     if finish = ticks [ die ]


]
end 
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

to life-time-fitness ;; calculates the lifetiem fitness and outputs to a file the settlers landing on each seamount.



set lifetime-fitness lifetime-fitness + sum-settled-larvae1 + sum-settled-larvae2 + sum-settled-larvae3 + sum-settled-larvae4 + sum-settled-larvae5 + sum-settled-larvae6
                                     + sum-settled-larvae7 + sum-settled-larvae8 + sum-settled-larvae9




  file-open "New_recruits.csv"

  file-type (word year ",")
  file-type (word current-direction ",")
  file-type (word number-eggs ",")
  file-type (word time-as-egg ",")
  file-type (word time-as-larva ",")
  file-type (word larval-search-time ",")
  file-type (word source-seamount ",")
  file-type (word sum-settled-larvae1 ",")
  file-type (word sum-settled-larvae2 ",")
  file-type (word sum-settled-larvae3 ",")
  file-type (word sum-settled-larvae4 ",")
  file-type (word sum-settled-larvae5 ",")
  file-type (word sum-settled-larvae6 ",")
  file-type (word sum-settled-larvae7 ",")
  file-type (word sum-settled-larvae8 ",")
  file-type (word sum-settled-larvae9 ",")
  file-print (word lifetime-fitness)

  file-close
end 

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

There is only one version of this model, created about 2 years ago by Paul Hart.

Attached files

File Type Description Last updated
New_recruits.csv data File that receives output from the seamount model about 2 years ago, by Paul Hart Download
Seamount_peaks_E-H_chain NR.txt data Seamount_peaks_E-H_chain NR.txt about 2 years ago, by Paul Hart Download

This model does not have any ancestors.

This model does not have any descendants.