Skip to content
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

hard crash/boundserror #333

Open
gdkrmr opened this issue May 12, 2023 · 0 comments
Open

hard crash/boundserror #333

gdkrmr opened this issue May 12, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@gdkrmr
Copy link

gdkrmr commented May 12, 2023

The following code crashes my Julia session hard (tested with Julia 1.8 and 1.9)

using YAXArrays
using Zarr

c_path = "http://data.rsc4earth.de:9000/earthsystemdatacube/v3.0.2/esdc-8d-0.25deg-1x720x1440-3.0.2.zarr"
c_zarr = Zarr.zopen(c_path)
c_dataset = YAXArrays.open_dataset(c_zarr)
c_full = YAXArrays.Cube(c_dataset)
c = c_full[variable=["sensible_heat", "air_temperature_2m", "radiation_era5"]]


m2 = rand(3)
s2 = rand(3)

v_ax = getAxis("variable", c)
stat_ax = CategoricalAxis("statistic", ["mean", "std"])
c_stat = YAXArray([v_ax, stat_ax], [m2 s2])
c

typeof(c)

getAxis("variable", c) == getAxis("variable", c_stat)

using Debugger
@run mapCube(
    (c, c_stat),
    indims=(InDims(), InDims("statistic")),
    outdims=OutDims()
) do xout, xin1, xin2
    xout .= (xin1 .- xin2[1]) ./ xin2[2]
end

Traceback is very long but starts with

julia> @run mapCube(
           (c, c_stat),
           indims=(InDims(), InDims("statistic")),
           outdims=OutDims()
       ) do xout, xin1, xin2
           xout .= (xin1 .- xin2[1]) ./ xin2[2]
       end
Internal error: encountered unexpected error in runtime:
BoundsError(a=svec(), i=1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants