A fix to read the time dimension in a (much) more efficient manner.#448
Merged
A fix to read the time dimension in a (much) more efficient manner.#448
Conversation
tdcwilliams
approved these changes
Jul 3, 2020
Contributor
tdcwilliams
left a comment
There was a problem hiding this comment.
seems good - the other dataset it could affect is the PIOMAS one - does that matter?
Co-authored-by: Timothy Williams <tdcwilliams@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request addresses issue #434 by reading the time dimension in a much more efficient manner. Instead of reading in the entire time vector and doing a linear search for the right place every time we now only read in the first two steps, infer the file's time step and from that read directly the correct record. This leads to a huge speed increase when reading in large datasets over a slow network (it halves the processing time on my local machine using ERA5 read in from johansen).
This assumes that time in the file is
There are datasets in /Data/sim/data on johansen that don't adhere to this (in particular Sylvain's currents-from-altimeter dataset) - but we hardly use those anymore.