Commit b9ffb0cb authored by Dan Baston's avatar Dan Baston

Add failing test

parent d4815d0e
......@@ -518,3 +518,22 @@ test_that('We can pass an array that has dimnames instead of a named list of var
test_that('we can append to a file created with an unlimited id dim', {
fname <- tempfile(fileext='.nc')
ids <- 3:17
precip <- runif(length(ids))*10
runoff <- precip*runif(length(ids))
id_dim <- ncdf4::ncdim_def('id', units='', vals=ids, unlim=TRUE)
precip_var <- ncdf4::ncvar_def('precip', units='mm', dim=id_dim)
cdf <- ncdf4::nc_create(fname, precip_var)
ncdf4::ncvar_put(cdf, precip_var, precip)
write_vars_to_cdf(list(runoff=runoff), fname, ids=ids, append=TRUE)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment