From 16314e42aa9d0a71b8ac7f8c48fd58c4b467977c Mon Sep 17 00:00:00 2001 From: Alexander Barth Date: Mon, 11 Feb 2019 13:06:51 +0100 Subject: [PATCH] ragger arrays --- test/runtests.jl | 2 +- test/test_cont_ragged_array.jl | 17 +++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 4db46281..28d82edc 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -223,7 +223,7 @@ println("NetCDF version: ",NCDatasets.nc_inq_libvers()) @test occursin("closed",String(take!(buf))) include("test_cfconventions.jl") - + include("test_cont_ragged_array.jl") end @testset "NetCDF4 groups" begin diff --git a/test/test_cont_ragged_array.jl b/test/test_cont_ragged_array.jl index f8cc74f2..947d5efc 100644 --- a/test/test_cont_ragged_array.jl +++ b/test/test_cont_ragged_array.jl @@ -6,6 +6,7 @@ else end fname = tempname() +fname = "test_cont_ragged_array.nc" ds = Dataset(fname,"c") # Dimensions @@ -67,15 +68,15 @@ ds.attrib["featureType"] = "profile" # Define variables -# ncprofile[:] = ... -# nctime[:] = ... -# nclon[:] = ... -# nclat[:] = ... +ncprofile[:] = [1,2,3] +nctime[:] = [1,1,1] +nclon[:] = [0,0,0] +nclat[:] = [0,0,0] ncrowSize[:] = [3,2,2] ncz[:] = [1.,2.,3., 10.,20., 100., 200] -# ncpressure[:] = ... -# nctemperature[:] = ... -# nchumidity[:] = ... +ncpressure[:] = [1.,2.,3., 10.,20., 100., 200] +nctemperature[:] = [1.,2.,3., 10.,20., 100., 200] +nchumidity[:] = [1.,2.,3., 10.,20., 100., 200] close(ds) @@ -86,4 +87,4 @@ data = loadragged(ncvar,:) @test data == [[1.,2.,3.], [10.,20.], [100., 200.]] close(ds) -rm(fname) +#rm(fname)