
Example kittiwake: step 3.2 - seabORD run - GPS maps
H_exampleKI_run.RmdThis example assumes that the model has already been calibrated. If not, follow the calibration article first and then return to this example.
Introduction & background
Now that we have run our calibration step and discerned the prey values resulting in moderate conditions in the absence of wind farms, we can continue with running the main SeabORD runs with matched pairs of baseline (no ORDs) and scenario (ORDs included).
This example
In this example we will run 5 scenario runs (wind farm footprints included) with a range of prey values (173-174).
Prepare inputs
For further information on inputs, please see Article “Example kittiwake: step 1 - seabORD inputs”.
This script will import the example parameters sets and spatial data, which are largely similar to the calibration inputs. Note will be given where these differ considerably, i.e., with regard to the inclusion of different wind farm footprints.
Parameter sets
NOTE: “NScalefactor” is set to 1 meaning we are running with 100% of the population, which is customary for scenario runs.
Par_example <- seabORD::get_example_par()
str(Par_example)
#> List of 12
#> $ thisSpecies : chr "KI"
#> $ colonies : chr "UK9004171"
#> $ Nscalefactor : num 1
#> $ Prob_Displacement : num 0.6
#> $ Prob_Barrier : num 1
#> $ PreyType : chr "Uniform"
#> $ collision : chr "Off"
#> $ SiteSelectionMethod: chr "Map"
#> $ MaxDistancekm : num 0
#> $ PropInRange : num 0
#> $ Npairspercol : num 2898
#> $ Pmedian : num 158modPar
modPar_example <- seabORD::get_example_modpar()
str(modPar_example)
#> List of 5
#> $ Nparallel : logi NA
#> $ initialseed: num 6598
#> $ reference : chr "serial_scenario_KI_UK9004171"
#> $ outputdir : chr "output_seabORD"
#> $ Nreplicates: num 1Create the output folder , for example “output_seabORD_scenario” and assign it
# Create the ouput folder "output_seabORD_scenario" specifically for scenario outputs if it doesn't alreay exist
if (!dir.exists("./output_seabORD_scenario")) {
dir.create("./output_seabORD_scenario")
}
modPar_example$outputdir <- "output_seabORD_scenario"We intend to run 5 replicates so need to change this in modPar
modPar_example$Nreplicates <- 5Include the calibration in Par
NOTE: Run this test! here the replicates are specified - this must align with the number of prey values listed in “Par_example$Pmedian”
seabORD::check_calibration_inputs(
Par = Par_example,
modPar = modPar_example
)
#> Input mismatch: modPar$Nreplicates = 5 but length(Par$Pmedian) = 1. These values should be identical for calibration runs.
#> Calibration inputs valid: 5 replicate(s) and 1 prey value(s).This is because we must include the right calibration values (5) if we want to run 5 replicates.
Change the values:
# min prey value from range determined in calibration
Pmin <- 173
# max prey value from range determined in calibration
Pmax <- 174
Par_example <- seabORD::set_prey_sequence_in_par(
Par = Par_example,
modPar = modPar_example,
Pmin = Pmin,
Pmax = Pmax
)
str(Par_example$Pmedian) #should be good to go!
#> num [1:5] 173 173 174 174 174
seabORD::check_calibration_inputs(
Par = Par_example,
modPar = modPar_example
)
#> Calibration inputs valid: 5 replicate(s) and 5 prey value(s).ordPar
ordPar_example <- seabORD::get_example_ordPar()
str(ordPar_example)
#> List of 4
#> $ include_ORDs : chr [1:2] "NEART" "INCAP"
#> $ parnames : chr "NEART;INCAP"
#> $ FootprintBorder: num 2
#> $ BufferZone : num 5Switches
Turn on the switch “savebirdflightmap”, to see an example of the birdflightmap output. Turn on “saverds” to save the outputs as rds.
switches_example <- seabORD::get_example_switches()
switches_example$savebirdflightmap <- TRUE
switches_example$saverds <- TRUE Assorted spatial inputs
Now load in all the spatial inputs.
seamask
seamask_example <- seabORD::get_example_seamask()spadat1
spadat1_example <- seabORD::get_example_spadat1()spadat2
spadat2_example <- seabORD::get_example_spadat2()spdat
spdat_example <- seabORD::get_example_spdat()BrdData
BrdData_example <- seabORD::get_example_brddata()FrgCompData
FrgCompData_example <- seabORD::get_example_frgcompdata()fltdist_base
fltdist_base_example <- seabORD::get_example_fltdist_base()FlightGridcorrection
FlightGridcorrection <- seabORD::get_example_fgc_3035()ORDpoly
ORDpoly_example <- seabORD::get_example_ORDpoly()You can plot the ORD footprints for peace of mind:
seabORD::plot_ORDpoly(
ORDpoly = ORDpoly_example
)
Running seabORD
Now that all the inputs are ready we can run the model using.
SeabORD runs including wind farms and full populations can take a while to run - even with a relatively small population of ~ 3,000 pairs.
The output will be saved in in your output directory set up in modPar.
To learn more about the main functions behind seabORD you can read the article on the main functions
To see how you can read in and plot the results you can read the article “Example kittiwake: step 4 - interpreting the outputs” where we have an example output for you to play with.
SeabORDoutput <- seabord(Par = Par_example,
ordPar = ordPar_example,
modPar = modPar_example,
switches = switches_example,
seamask = seamask_example,
spadat1 = spadat1_example,
spadat2 = spadat2_example,
spdat = spdat_example,
BrdData = BrdData_example,
FrgCompData = FrgCompData_example,
fltdist_base = fltdist_base_example,
FlightGridcorrection = FlightGridcorrection,
ORDpoly = ORDpoly_example)