### Some reader functions.
### NEED DOCUMENTING. Not exporting for now.
# inca_ascii -----------------------------------
read_inca_ascii <- function(infile, parameter, domain, ...) {
# you absolutely /need/ to know nx!
# so domain must at least have a $nx component.
if (!file.exists(infile)) stop(paste("File",infile,"not found."))
if (missing(domain)) stop("inca_ascii format requires domain information.\n")
inca <- matrix(scan(infile), byrow=TRUE, nrow=domain$nx)
if (parameter$basename == "s") {
# we already decoded the U component
f2 <- gsub("UU", "VV", infile)
V <- matrix(scan(f2), byrow=TRUE, nrow=domain$nx)
inca[, ] <- sqrt(inca^2 + V^2)
}
# if (inherits(domain,"geodomain")) inca <- as.geodomain(inca, domain)
inca
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.