You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In trying to save a couple of large rasters in one single nc file. I got the following error.
multiRaster<-sds(Mraster)
writeCDF(multiRaster, "./NCfiles/multiRaste.nc",overwrite=TRUE)
Error in if (prj != "") { : missing value where TRUE/FALSE needed
I went to check the crs of the single files but everything looks fine.
Update
It seems the issue is with tapp. Here is a simple way to reproduce the error
r <- rast(ncols=10, nrows=10)
values(r) <- 1:ncell(r)
s <- c(r, r, r, r, r, r)
s <- s * 1:6
b1 <- tapp(s, index=c(1,1,1,2,2,2), fun=mean)
writeCDF(b1, "xxx.nc", overwrite=TRUE)
The text was updated successfully, but these errors were encountered:
Thanks. This was introduced because of a change that makes writeCDF also write the EPSG code of the crs to the file. This failed for cases when there was no EPSG code; I tested for it be "" where the test should be for NA in this case.
In trying to save a couple of large rasters in one single nc file. I got the following error.
I went to check the
crs
of the single files but everything looks fine.Update
It seems the issue is with
tapp
. Here is a simple way to reproduce the errorThe text was updated successfully, but these errors were encountered: