Skip to content

Commit

Permalink
arguments should match size for NCDatasets.load!
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander-Barth committed Oct 10, 2023
1 parent 65c9435 commit 0c2eee9
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/NCODV.jl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ function loadprof(

n_samples = size(ncvar,1)
n_stations = size(ncvar, 2)

nchunk = min(nchunk,n_stations)
# n_stations = 100000
# n_stations = 10000
data_chunk = Array{T,2}(undef, (n_samples, nchunk))
Expand Down Expand Up @@ -118,21 +120,21 @@ function loadprof(
nc = i:min(i + nchunk - 1, n_stations)
clen = length(nc)

NCDatasets.load!(ncvar, data_chunk, :, nc)
NCDatasets.load!(ncvar, view(data_chunk,:,1:clen), :, nc)

if flag != nothing
NCDatasets.load!(flag, flag_chunk, :, nc)
NCDatasets.load!(flag, view(flag_chunk,:,1:clen), :, nc)
end

NCDatasets.load!(ncz, z_chunk, :, nc)
NCDatasets.load!(ncz, view(z_chunk,:,1:clen), :, nc)

if flag_z != nothing
NCDatasets.load!(flag_z, flag_z_chunk, :, nc)
NCDatasets.load!(flag_z, view(flag_z_chunk,:,1:clen), :, nc)
end

if nctime != nothing
NCDatasets.load!(nctime, time_chunk, :, nc)
NCDatasets.load!(flag_time, flag_time_chunk, :, nc)
NCDatasets.load!(nctime, view(time_chunk,:,1:clen), :, nc)
NCDatasets.load!(flag_time, view(flag_time_chunk,:,1:clen), :, nc)
end

for k = 1:clen
Expand Down

2 comments on commit 0c2eee9

@Alexander-Barth
Copy link
Member 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/95615

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

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 v2.7.10 -m "<description of version>" 0c2eee9d9791034b844af295817f1a1c3dbbaf78
git push origin v2.7.10

Please sign in to comment.