DEMOS/CMData4_PaxWindDemo.R

#########################################################################################
### Draft USFWS Collision Fatality Model Code version 4.1                             ###
### This code is a working version only. It is not intended for general distribution. ###
### Check back often for updates to the model/code                                    ###
#########################################################################################

# Source the required function files:
# You will need to replace the file path with the correct file path for your
# computer (it should should point R to where you have save these files)

source("C:/workspace/projects/Eagles/training/DayLen.R")
source("C:/workspace/projects/Eagles/training/RVSmry.R")
source("C:/workspace/projects/Eagles/training/FatalFcns.R")

## double-slashes also work...
# source("C:\\workspace\\training\\RFiles\\DayLen.R")
# source("C:\\workspace\\training\\RFiles\\RVSmry.R")
# source("C:\\workspace\\training\\RFiles\\FatalFcns.R")

## Super-user tip!! If you get really stuck with 'sourcing' the code files, you can always
## open the files (even in WordPad) and copy and paste directly into R
## (you would want to do this before running the model code file)


## Define seasonal strata and calculate daylight hours:

#"PWRC Lat/long"

SeasonType<-"Annual"

LatLng<-c(39.059083,-76.812766)

### run the next 4 lines of code to get daylight hours

DayLtHr<-DayLen(LatLng[2],LatLng[1],Type=SeasonType)

colnames(DayLtHr)[1]<-"Season"

DayLtHr$AveDayLen<-with(DayLtHr,DayLtHr/Days)

print(DayLtHr)


### PWRC Wind Project Data ###

  cProject<-"PWRC"

  Name<-"Ida Modeler"#"Your Name Here" or the name to be associated with results printout

  nTurbine<-c(90) #number of turbines

  HazRadKm<-c(93/2/1000) #radius of hazardous area around each turbine (in km)

  HzKM2<-sum(nTurbine*pi*HazRadKm^2) #hazardous area around each turbine (in km)

  CntHr<-c(60/60)  # observation count duration (in hours)

## Create the "ExpSvy" data frame:
## this includes the seasonal category names (e.g. "Annual"), eagle minutes observed (e.g. 60),
## number of counts of the duration specified in CntHr conducted (e.g. 130),
## the area observed at each observation point (e.g. area of 800-m circular plot in km),
## and the daylight hours for each season (e.g. 4453.766 annual daylight hours)
## Note: these data are entered into the data frame manually

  ExpSvy<-data.frame(row.names=c("Annual"),
  EMin=c(60),
  nCnt=c(130),
  CntKM2=c(pi*(800/1000)^2),
  DayLtHr=c(4453.766)
 )

##  Indicate whether strata should be totaled:
##  If you do not have strata, this should be FALSE

  AddTot<-FALSE #Add strata for total (TRUE) or not (FALSE)
josephstatwick/EagleModelCalc documentation built on May 16, 2019, 4:55 p.m.