Skip to content

How to efficiently read HDF5 Variable with Structure using NetCDF-Java #1405

Discussion options

You must be logged in to vote

Greetings!

I'm not certain yet what is causing the slowness using the code you've provided, but something does not seem quite right in the readStructure call. It seems like each time it reads an individual value from the struct, it's loading in the full chunk from disk, decompressing it, reading the single value, then repeating itself (so 3,458,025 load-chunk/decompress/get-single-float iterations...not good).

There are a few other approaches you could take if you know you want to read all of the data for a given member of the structure variable, both of which are considerably faster. Note that in these examples, I'm using this file (102US00_US4NJ1FH.h5) and targetVariableName = "Bathymet…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@gwlucastrig
Comment options

Answer selected by gwlucastrig
Comment options

You must be logged in to vote
1 reply
@gwlucastrig
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants