Skip to content

Commit

Permalink
Merge branch 'master' into AbstractRange-index
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Nov 9, 2022
2 parents 1705048 + ab970eb commit fc7f4f4
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

2 comments on commit fc7f4f4

@Alexander-Barth
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/71939

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.12.9 -m "<description of version>" fc7f4f4b3bbbaeb008da713c100741118e1505c3
git push origin v0.12.9

Please sign in to comment.