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
The timeseries are split among two netCDF files with different number of time records. Each file can be opened with Dataset() correctly. Opening two files together with Dataset() gets wrong number of total time records.
The timeseries are split among two netCDF files with different number of time records. Each file can be opened with Dataset() correctly. Opening two files together with Dataset() gets wrong number of total time records.
Two netCDF files can be dragged from:
http://esgf.nci.org.au/thredds/fileServer/master/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/esm-hist/r2i1p1f1/Amon/co2/gn/v20191203/co2_Amon_ACCESS-ESM1-5_esm-hist_r2i1p1f1_gn_185001-194912.nc
http://esgf.nci.org.au/thredds/fileServer/master/CMIP6/CMIP/CSIRO/ACCESS-ESM1-5/esm-hist/r2i1p1f1/Amon/co2/gn/v20191203/co2_Amon_ACCESS-ESM1-5_esm-hist_r2i1p1f1_gn_195001-201412.nc
Use the following code to reproduce the bug:
##########################
using NCDatasets
files = ["co2_Amon_ACCESS-ESM1-5_esm-hist_r2i1p1f1_gn_185001-194912.nc","co2_Amon_ACCESS-ESM1-5_esm-hist_r2i1p1f1_gn_195001-201412.nc"]
ds = Dataset(files)
time = ds["time"][:]
close(ds)
##########################
Expected behavior
ERROR: LoadError: NetCDF error: NetCDF: Start+count exceeds dimension bound (NetCDF error code: -57)
Environment
Full output
ERROR: LoadError: NetCDF error: NetCDF: Start+count exceeds dimension bound (NetCDF error code: -57)
Stacktrace:
[1] check at /Users/test/.julia/packages/NCDatasets/NNX1o/src/errorhandling.jl:33 [inlined]
[2] nc_get_vars!(::Int32, ::Int32, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Int64,1}, ::Array{Float64,1}) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/netcdf_c.jl:916
[3] getindex(::NCDatasets.Variable{Float64,1,NCDataset}, ::StepRange{Int64,Int64}) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/variable.jl:386
[4] (::getfield(NCDatasets, Symbol("##57#58")){Tuple{StepRange{Int64,Int64}}})(::NCDatasets.Variable{Float64,1,NCDataset}) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/defer.jl:153
[5] (::getfield(NCDatasets, Symbol("##55#56")){getfield(NCDatasets, Symbol("##57#58")){Tuple{StepRange{Int64,Int64}}},NCDatasets.DeferVariable{Float64,1}})(::NCDataset{Nothing}) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/defer.jl:138
[6] #NCDataset#13(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Type, ::getfield(NCDatasets, Symbol("##55#56")){getfield(NCDatasets, Symbol("##57#58")){Tuple{StepRange{Int64,Int64}}},NCDatasets.DeferVariable{Float64,1}}, ::String, ::Vararg{String,N} where N) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/dataset.jl:286
[7] Type at /Users/test/.julia/packages/NCDatasets/NNX1o/src/dataset.jl:284 [inlined]
[8] Type at /Users/test/.julia/packages/NCDatasets/NNX1o/src/defer.jl:137 [inlined]
[9] getindex(::NCDatasets.DeferVariable{Float64,1}, ::StepRange{Int64,Int64}) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/defer.jl:152
[10] getindex(::NCDatasets.CatArrays.CatArray{Float64,1,2,NCDatasets.DeferVariable{Float64,1}}, ::Function) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/CatArrays.jl:113
[11] getindex at /Users/test/.julia/packages/NCDatasets/NNX1o/src/multifile.jl:155 [inlined]
[12] getindex(::NCDatasets.CFVariable{Dates.DateTime,1,NCDatasets.MFVariable{Float64,1,2,NCDatasets.DeferVariable{Float64,1}},NCDatasets.MFAttributes{NCDatasets.DeferAttributes},NamedTuple{(:fillvalue, :scale_factor, :add_offset, :calendar, :time_origin, :time_factor),Tuple{Nothing,Nothing,Nothing,String,DateTimeProlepticGregorian,Int64}}}, ::Colon) at /Users/test/.julia/packages/NCDatasets/NNX1o/src/cfvariable.jl:518
[13] top-level scope at none:0
[14] include at ./boot.jl:317 [inlined]
[15] include_relative(::Module, ::String) at ./loading.jl:1044
[16] include(::Module, ::String) at ./sysimg.jl:29
[17] exec_options(::Base.JLOptions) at ./client.jl:266
[18] _start() at ./client.jl:425
The text was updated successfully, but these errors were encountered: