another probably simple question. After subsetting the cube and calculating mean values for the extracted time period using:

using ESDL

using DelimitedFiles

using Statistics

c = Cube("/home/jovyan/work/datacube/ESDCv2.0.0/esdc-8d-0.083deg-184x270x270-2.0.0.zarr/")

d = subsetcube(c, Lon = (73, 105),

Lat = (25, 40),

time = (Date(2000,1,1), Date(2018,12,31))

)skipmax(x) = mean(skipmissing(x))

d2 = mapslices(mean, d, dims=(“Time”))

I would like to drop all layers not containing any values (all missing values). While it is easy to subset the cube using for example:

d3 = d2[:,:,1:5]

I fail to build a subset of not continuous elements like for example:

d3 = d2[:,:,[1, 3, 4]]

I don’t understand how Julia allows to drop/subset variables from such a multidimensional cube. For example in R, I could do this by running:

d3 = d2[,-c(3,5,8:10)]

with or without the “-”. All examples I found in Julia so far were only considering two-dimensional arrays and were dropping continuous entries.

As I was mainly interested in dropping entries/layers that contain only missing values (which in my example were a lot!) I also tried out this:

using Missings

d3 = dropmissing(d2)

However, this is also not working because apparently the dropmissing function is not available in Julia 1.1.0.

As mentioned, with the code above, many of the ESDL variables seem to only have missing values (throughout the time series). Is this due to the high resolution of the data-cube? Sorry, maybe this is somewhere in the documentation but I did not find it with a quick search. Will search again tomorrow.

If the resolution is the problem, wouldn’t it be possible to just fill the datacube by resampling the data to a higher spatial resolution? Just keep the same data value for neighboring pixels but at least make this data available?