diff --git a/R/write2ncdf.R b/R/write2ncdf.R index 2fd9b2d1..89e78a5a 100644 --- a/R/write2ncdf.R +++ b/R/write2ncdf.R @@ -659,6 +659,7 @@ generate.station.ncfile <- function(x,file,stats,missval,offset,scale,torg,prec= src <- paste(rownames(table(attr(x,"source"))),collapse="/") if (verbose) print(src) y <- coredata(x) + nt <- length(index(x)) list2env(stats,envir=environment()) verbose <- verbose[1] unitx <- attr(x,'unit')