-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
polar ROMS #22
Comments
oh it's 2000 in the y direction, can't see why that would be atm ? ex <- raster::extent(-2999000 -1000, 3299000 +1000, -2698000-2000, 2598000+2000)
> setExtent(raster(t(a$temp[,ncol(a$temp):1])), ex)
class : RasterLayer
dimensions : 2650, 3150, 8347500 (nrow, ncol, ncell)
resolution : 2000, 2000 (x, y)
extent : -3e+06, 3300000, -2700000, 2600000 (xmin, xmax, ymin, ymax)
crs : NA
source : memory
names : layer
values : -3.437805, 16.38486 (min, max)
|
VRT for temp (similar will work for u,v,w with some offset/size hacking (this doesn't work for other ROMS that aren't a regular projected grid)
|
we need some kind of plotting for tidync for this stuff ... but using the warper might actually be better (better than hacky subsetting etc) get_slice <- function(x, slice = 1L, max = 512) {
dm <- dim(x)
idx <- seq_len(prod(dm[1:2]))
idx <- idx + prod(dm[1:2]) * (slice-1L)
out <- matrix(x[idx], dm[1:2])
ix <- seq(1, nrow(out), length.out = max)
iy <- seq(1, ncol(out), length.out = max)
out[ix, iy]
}
plot.tidync_data <- function(x, ..., slice = 1L, var = 1L, useRaster = TRUE) {
image(get_slice(x[[var]]), ..., useRaster = useRaster)
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
waom gridding
The text was updated successfully, but these errors were encountered: