Closed mdsumner closed 5 years ago
grep shows that all instances of setZ include "files$date" :)
mdsumner@raadsync2:~/raadtools$ grep setZ R/*.R
R/amps.R: r <- setZ(r, files$date)
R/amps.R: r <- setZ(r, rep(files$date, 2L))
R/amps.R: r <- setZ(r, files$date)
R/amps.R: r <- setZ(r, files$date)
R/chla.R: r <- setZ(r, files$date)
R/copernicus_altimetry.R: r0 <- setZ(r0, files$date)
R/currents.R: r0 <- setZ(r0, files$date)
R/currents.R: r0 <- setZ(r0, rep(files$date, 2))
R/currents.R: if (magonly | dironly | uonly | vonly) r <- setZ(r, files$date) else r <- setZ(r, rep(files$date, 2L))
R/currents.R: r <- setZ(r, files$date)
R/currents.R: r <- setZ(r, rep(files$date, 2L))
R/deriv.R: setZ(r, files$date)
R/fastice.R: setZ(r, files$date)
R/fronts.R: r <- if (length(l) > 1) setZ(brick(stack(l)), files$date) else setZ(l[[1L]], files$date)
R/ghrsst.R: r0 <- setZ(r0, files$date)
R/ghrsst.R: r0 <- setZ(r0, files$date)
R/ghrsst.R: # r0 <- setZ(r0, getZ(r0) + ISOdatetime(1981, 1, 1, 0, 0, 0, tz = "GMT")) ##1981-01-01 00:00:00)
R/ice_amsr_ssmi.R: raster::setExtent(raster::setZ(out, files$date), ext)
R/ice.R: r <- setZ(r, files$date)
R/ncep2.R:# r0 <- setZ(r0, rep(files$date, 2L))
R/ncep2.R:# if (nlayers(r0) == nrow(files)) r0 <- setZ(r0, files$date)
R/ncep2.R:# if (magonly | dironly | uonly | vonly) r <- setZ(r, files$date) else r <- setZ(r, rep(files$date, 2L))
R/ncep2.R:# r <- setZ(r, files$date)
R/ncep2.R:# r <- setZ(r, rep(files$date, 2L))
R/raadtools.R:##' @importFrom raster brick crop deratify extent<- extract getZ nlayers projection projection<- raster res resample rotate setZ stack writeRaster xmax xmin ymax ymin
R/sst.R: r0 <- setZ(r0, files$date)
R/wind.R: r <- setZ(r, files$date)
R/wind.R: r <- setZ(r, rep(files$date, 2L))
So, applying this to raadfiles as a template should cover it.
Set this up for all outputs with a time-attribute, so that print is always UTC-format despite system settings.
Probably best to apply this to all
*files
functions, but also check if that holds for all read functions.Note that it's "tzone" not "tz" when setting the attribute for controlled print.