#' This functions return NARR climate data from for a given latitude/longitude and year to simulate BioCro
#'
#' @param Latitude
#' @param Longitude
#' @year year
#' @return Data frame containing climate data to be used with BioCro
#' @export
#'
getNARRforBioCro<-function(lat,lon,year){
USlayer<-read.table("/home/groups/ebimodeling/met/NARR/ProcessedNARR/NARRindex.txt")
index=which.min((lat-USlayer$Latt)^2+(lon-USlayer$Lonn)^2)
i=USlayer$Iindex[index]
j=USlayer$Jindex[index]
filename=paste("/home/groups/ebimodeling/met/NARR/ProcessedNARR/",year,formatC(i,width=3,flag=0),formatC(j,width=3,flag=0),".RData",sep="")
load(filename)
return(dat)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.