R/mgsread.aermetsfc.R

Defines functions mgsread.aermetsfc

Documented in mgsread.aermetsfc

#' 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)
  
}
michellegrace/mgs.dispersion documentation built on May 22, 2019, 9:55 p.m.