UDF correlation

It’s a bit hard to pinpoint the problem from this information, but could you add printing of some debug information, to inspect the dimensions and shape of the data you are working on.

e.g.

def apply_datacube(cube: XarrayDataCube, context: Dict) -> XarrayDataCube:
    dat=cube.get_array()
    print(data) # Or just `print(data.shape)`

likewise, what is the configuration of your downloaded data.nc file?