#' read AERMET .SFC file
#'
#' @param infile name of .SFC file
#'
#' @export mgsread.aermetsfc
#########################################################################
#function to read AERMET fortran surface file
mgsread.aermetsfc <- function(infile){
var_name <- c("year","month","day","jday","hour","sens_h_flux","ustar","wstar",
"VPTG","conv_mix_h","mech_mix_h","MO_l","z0","Bowen_r","albedo",
"wind_s","wind_d","wind_h","temp","temp_h","precip_code","precip_amt",
"rel_hum","press","cloud_cov","WSADJ","subs")
#read in data, remove extra rows
met_data <- read.table(infile,skip=1,col.names=var_name,fill=FALSE)
return(met_data)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.