Skip to content

Commit

Permalink
ignore _FillValue which can be 0 for WOD
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Nov 9, 2022
1 parent f090784 commit ab970eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/variable.jl
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,13 @@ function loadragged(ncvar,index::Union{Colon,UnitRange})
throw(NetCDFError(-1, "There should be exactly one NetCDF variable with the attribute 'sample_dimension' equal to '$(dimname)'"))
end

ncvarsize = ncvarsizes[1]
# ignore _FillValue which can be 0 for WOD
ncvarsize = ncvarsizes[1].var

isa(index,Colon)||(index[1]==1) ? n0=1 : n0=1+sum(ncvarsize[1:index[1]-1])
isa(index,Colon) ? n1=sum(ncvarsize[:]) : n1=sum(ncvarsize[1:index[end]])

varsize = ncvarsize.var[index]
varsize = ncvarsize[index]

istart = 0;
tmp = ncvar[n0:n1]
Expand Down

0 comments on commit ab970eb

Please sign in to comment.