Primary tabs

Masden 2015 Code

[Full details are available in the worked example contained within the Masden (2015)report.]
Model set up Before the model can be run it requires information to be entered into the file "BandModel.txt".

  1. Set working directory First, set the working directory. This is the location where the folders ‘scripts’ and ‘data’ have been saved as well as ‘BandModel.R’. For example, setwd("F:\BAND CRM For R") This step directs R to all the files and data that are required to run the model therefore all the files required much be within this directory.

  2. Set results folder The model will save output to a folder. Set the name of the results folder, for example, the name of the development. For example, results_folder <- "windfarm1" If no name is specified the model will default to the date. WARNING: If the model is run several times on the same day and no folder name is specified, it will over-write files in the folder.

  3. Set model components Next set the model components. These include:

  • The number of iterations the model simulation will execute, for example 1000 iter<- 1000

  • The species to include, for example kittiwake CRSpecies = "Black_legged_Kittiwake" If more species were to be included this would look like CRSpecies = c("Black_legged_Kittiwake", "Northern_Gannet", "Arctic_Skua")

  • The target power (in MW) to be generated within wind farm, for example 600MW. This is used in conjunction with the turbine name i.e. 6 if a 6MW turbine, to calculate the number of turbines in the array. TPower = 600 Large array correction (Yes/No), for example LargeArrayCorrection = "yes"

  • The wind farm width (km), for example 10km WFWidth = 10

  • The proportion of bird flights up/downwind, for example 50% Prop_Upwind = 0.5

  • The latitude of the wind farm in decimal degrees, for example 55.8 degrees. This is used to calculate day length at the site location throughout the year. Latitude = 55.8

  • The tidal offset in metres (to correct for flight heights being calculated in relation to mean sea-level and turbine dimensions being calculated in relation to Highest Astronomical Tide), for example 2.5 metres TideOff = 2.5

  1. Parameterise wind speed sampling distribution The model uses wind speed data to calculate rotor speed and pitch. Wind speed data are therefore required. At the time of production it was unclear what format wind speed data would be available to wind farm developers. To avoid inconsistencies, the model samples wind speed from a truncated normal distribution parameterised by the user.
  • The mean wind speed (m.s-1) and standard deviation are required to be set, for example windSpeedMean<- 7.74 windSpeedSD<- 3.2 It is expected that these will be obtained from met mast data or other sources of wind speed data such as NASA’s Modern-Era Retrospective Analysis for Research and Applications (MERRA).

Running the model: Once you have set the working directory and entered all of the necessary information, all that is needed to run the model is to copy and paste all of BandModel.R into the R console, or alternatively type source("*****EnterMyDirectoryHere****\BandModel.R") in the R console, and press return. The code is designed to loop through multiple species and multiple turbine designs in a single step. The number of results obtained will depend on the number of different turbine designs entered in TurbineData.csv and the number of different species for which data are entered and listed. A progress bar will provide an indication of progress and at the end of the model, the time elapsed since the model was started will be displayed.

64 files in this archive

  • code_FinalVersion/
  • code_FinalVersion/data/
  • code_FinalVersion/data/windpower_8.csv
  • code_FinalVersion/data/Northern_Gannet_ht.csv
  • code_FinalVersion/data/Black_legged_Kittiwake_ht.csv
  • code_FinalVersion/data/CountData.csv
  • code_FinalVersion/data/FlightHeight.csv
  • code_FinalVersion/data/windpower_6.csv
  • code_FinalVersion/data/BirdData.csv
  • code_FinalVersion/data/TurbineData.csv
  • code_FinalVersion/data/Arctic_Skua_ht.csv
  • code_FinalVersion/data/Arctic_Tern_ht.csv
  • code_FinalVersion/data/Atlantic_Puffin_ht.csv
  • code_FinalVersion/data/Black_headed_Gull_ht.csv
  • code_FinalVersion/data/Common_Guillemot_ht.csv
  • code_FinalVersion/data/Great_Black_backed_Gull_ht.csv
  • code_FinalVersion/data/Herring_Gull_ht.csv
  • code_FinalVersion/data/Lesser_Black_Backed_Gull_ht.csv
  • code_FinalVersion/data/Little_Auk_ht.csv
  • code_FinalVersion/data/Northern_Fulmar_ht.csv
  • code_FinalVersion/data/Razorbill_ht.csv
  • code_FinalVersion/data/Great_Skua_ht.csv
  • code_FinalVersion/data/Black_throated_Diver_ht.csv
  • code_FinalVersion/data/Common_Gull_ht.csv
  • code_FinalVersion/data/Common_Scoter_ht.csv
  • code_FinalVersion/data/Common_Tern_ht.csv
  • code_FinalVersion/data/Cormorant_ht.csv
  • code_FinalVersion/data/Eider_ht.csv
  • code_FinalVersion/data/Little_Gull_ht.csv
  • code_FinalVersion/data/Manx_Shearwater_ht.csv
  • code_FinalVersion/data/Red_throated_Diver_ht.csv
  • code_FinalVersion/data/Sandwich_Tern_ht.csv
  • code_FinalVersion/data/European_Shag_ht.csv
  • code_FinalVersion/scripts/
  • code_FinalVersion/scripts/DayLength.txt
  • code_FinalVersion/scripts/get_rotor_plus_pitch_auto.txt
  • code_FinalVersion/scripts/Option1.txt
  • code_FinalVersion/scripts/Option2.txt
  • code_FinalVersion/scripts/Option3.txt
  • code_FinalVersion/scripts/PCollFunctions.txt
  • code_FinalVersion/scripts/ProbabilityCollision.R
  • code_FinalVersion/scripts/ProbabilityCollision.txt
  • code_FinalVersion/scripts/readBirdData.txt
  • code_FinalVersion/scripts/readCountData.txt
  • code_FinalVersion/scripts/readFlightData.txt
  • code_FinalVersion/scripts/readTurbineData.R
  • code_FinalVersion/scripts/readTurbineData.txt
  • code_FinalVersion/scripts/sampleavoidance.R
  • code_FinalVersion/scripts/samplebirdflight.R
  • code_FinalVersion/scripts/samplebirdlength.R
  • code_FinalVersion/scripts/samplebirdparams.txt
  • code_FinalVersion/scripts/samplebladewidth.R
  • code_FinalVersion/scripts/samplecount.R
  • code_FinalVersion/scripts/sampleCRH.R
  • code_FinalVersion/scripts/samplehubheightadd.R
  • code_FinalVersion/scripts/samplemonthlycounts.txt
  • code_FinalVersion/scripts/samplemonthlyop.txt
  • code_FinalVersion/scripts/samplenocturnal.R
  • code_FinalVersion/scripts/sampleop.R
  • code_FinalVersion/scripts/samplerotorradius.R
  • code_FinalVersion/scripts/sampleturbineparams.txt
  • code_FinalVersion/scripts/samplewingspan.R
  • code_FinalVersion/scripts/cv.R
  • code_FinalVersion/BandModel.R


Additional Information

resource typefile upload
timestampDec 01, 2015