Skip to content

Commit efacee6

Browse files
committed
fix for those request with 1 row or column but mutli time
1 parent 985f3c5 commit efacee6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

R/utility_fast_download.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,10 @@ fast.download = function(urls, params, names, g, date.names, dataset, fun = 'r',
6868
time = length(date.names[[i]])
6969

7070
if(time > 1){
71-
#dim(v) = round(c(g$rows, g$cols, time))
71+
if(is.na(dim(v)[3])){
72+
dim(v) = round(c(g$rows, g$cols, time))
73+
}
74+
7275
var2 = array(rep(0, length(v)), dim = round(c(g$rows, g$cols, time)))
7376
for(j in 1:dim(var2)[3]){ var2[,,j] = .orient(v[,,j], fun = fun) }
7477
b1 = raster::brick(var2)

0 commit comments

Comments
 (0)