# NOT RUN {
# The old csv format (no longer supplied by Environment Canada as of Oct 2019)
csv1 <- read.met(system.file("extdata", "test_met_vsn1.csv", package="oce"))
# The new "csv2" format (provided by Environment Canada as of Oct 2019)
csv2 <- read.met(system.file("extdata", "test_met_vsn2.csv", package="oce"))
# "xml2" format
if (requireNamespace("XML", quietly=TRUE))
xml2 <- read.met(system.file("extdata", "test_met_xml2.xml", package="oce"))
# }
# NOT RUN {
library(oce)
# Recreate data(met) and plot u(t) and v(t)
metFile <- download.met(id=6358, year=2003, month=9, destdir=".")
met <- read.met(metFile)
met <- oceSetData(met, "time", met[["time"]]+4*3600,
note="add 4h to local time to get UTC time")
plot(met)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab