diff --git a/src/variables.jl b/src/variables.jl index bdaf617..1f25e93 100644 --- a/src/variables.jl +++ b/src/variables.jl @@ -157,9 +157,7 @@ function Variable(ds::GRIBDataset, key) for d in dims if !_is_length_consistent(d, dsdims) - @warn "The length of dimension $(dimname(d)) in variable $key is different - from the corresponding dimension in the dataset. This could lead to unexpected - behaviour." + @warn "The length of dimension $(dimname(d)) in variable $key is different from the corresponding dimension in the dataset. This could lead to unexpected behaviour." end end @@ -171,7 +169,7 @@ function Variable(ds::GRIBDataset, key) Variable(ds, key, _filter_horizontal_dims(ds.dims), values, coordinate_attributes(key)) else - error("The key `$key` was been found in the dataset. Available keys: $(keys(ds))") + error("The key `$key` was not found in the dataset. Available keys: $(keys(ds))") end end diff --git a/test/dataset.jl b/test/dataset.jl index 03b5498..dab7af6 100644 --- a/test/dataset.jl +++ b/test/dataset.jl @@ -122,9 +122,9 @@ using GRIBDatasets: CDM u = ds2["u"] @test u[:,:, 1, 1] isa AbstractArray{<:Any, 2} @test_throws BoundsError u[:,:,1,2] - u10 = ds2["u10"] + u10 = ds2["avg_10u"] @test GDS._dim_values(GDS._get_dim(u10, "heightAboveGround_2")) == [10] - t2m = ds2["t2m"] + t2m = ds2["mean2t"] @test GDS._dim_values(GDS._get_dim(t2m, "heightAboveGround")) == [2] end @@ -187,7 +187,7 @@ using GRIBDatasets: CDM end end -@testset "test all files" begin +@testset "open all files" begin for testfile in test_files println("Testing: ", testfile) index = FileIndex(testfile) diff --git a/test/dimensions.jl b/test/dimensions.jl index 7fa11cc..1a75534 100644 --- a/test/dimensions.jl +++ b/test/dimensions.jl @@ -79,9 +79,9 @@ using Test @test keys(vertdims) == ["hybrid", "heightAboveGround", "heightAboveGround_2"] - u10 = filter_messages(index, cfVarName = "u10") + u10 = filter_messages(index, cfVarName = "avg_10u") indices = messages_indices(u10, _alldims(u10)) @test indices[1] == [1, 1] end -end \ No newline at end of file +end