Skip to content

Commit

Permalink
ragger arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Feb 11, 2019
1 parent 06eea72 commit 16314e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
17 changes: 9 additions & 8 deletions test/test_cont_ragged_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ else
end

fname = tempname()
fname = "test_cont_ragged_array.nc"
ds = Dataset(fname,"c")
# Dimensions

Expand Down Expand Up @@ -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)

Expand All @@ -86,4 +87,4 @@ data = loadragged(ncvar,:)
@test data == [[1.,2.,3.], [10.,20.], [100., 200.]]
close(ds)

rm(fname)
#rm(fname)

0 comments on commit 16314e4

Please sign in to comment.