Skip to content

Commit ab970eb

Browse files
ignore _FillValue which can be 0 for WOD
1 parent f090784 commit ab970eb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/variable.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,13 @@ function loadragged(ncvar,index::Union{Colon,UnitRange})
140140
throw(NetCDFError(-1, "There should be exactly one NetCDF variable with the attribute 'sample_dimension' equal to '$(dimname)'"))
141141
end
142142

143-
ncvarsize = ncvarsizes[1]
143+
# ignore _FillValue which can be 0 for WOD
144+
ncvarsize = ncvarsizes[1].var
144145

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

148-
varsize = ncvarsize.var[index]
149+
varsize = ncvarsize[index]
149150

150151
istart = 0;
151152
tmp = ncvar[n0:n1]

0 commit comments

Comments
 (0)