Description Usage Arguments Details Value Note Examples
Conform data to dimension order and structure of output.
1 2 3 4 5 6 7 8 | nc.conform.data(
f.input,
f.output,
v.input,
v.output,
dat.input,
allow.dim.subsets = FALSE
)
|
f.input |
The input file (an object of class |
f.output |
The output file (an object of class |
v.input |
The input variable (a string naming a variable in a file or an object of class |
v.output |
The output variable (a string naming a variable in a file or an object of class |
dat.input |
The input data to be reordered to match the output file's ordering. |
allow.dim.subsets |
Whether to allow the conforming process to subset the data. |
Sometimes files come in in different latitude (up is north, up is south), longitude (0 to 360 vs -180 to 180), and temporal schemes. The purpose of this function is to make data from one scheme comparable to data from another. It takes a given input file, variable, and slab of data and permutes the data such that the dimension order and the index order matches the order in the output file and variable.
The data permuted to match the output file's ordering and optionally clipped to the extent of the output.
This function currently isn't useful for conforming subsets of output data.
1 2 3 4 5 6 7 8 9 10 | ## Get data from one file and conform it to the dimension order of another.
## Not run:
f1 <- nc_open("pr.nc")
f2 <- nc_open("pr2.nc", write=TRUE)
dat <- nc.get.var.subset.by.axes(f1, "pr")
new.dat <- nc.conform.data(f2, f1, "pr", "pr", dat)
nc_close(f1)
nc_close(f2)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.