#Load function files
source("read_netcdf.r")
source("mon_mean_onept.r")

var_name <- 'tas'
path <- '/esarchive/recon/ecmwf/erainterim/daily_mean/tas/'
file <- 'tas_201801.nc'

tmp <- read_netcdf(var_name, path, file)

lat <- 120
lon <- 255
monmean <- mon_mean_onept(tmp, lat, lon)

message('Monthly mean at [',lon,',',lat,']: ',monmean) 
