Create lazy variables when opening a dataset #9593
Unanswered
marceloandrioni
asked this question in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I am trying to create a function that opens a remote dataset (in a opendap server) and automatically creates new variables. A use case would be to calculate magnitude and direction when u and v components are available, e.g.:
On first look everything seems to work just fine and the new magnitude and direction variables are created.
The problem arises when I try to get a very small subset of the data. A "real" variable returns the data instantly, e.g.:
But when I try to get a subset from the lazy variable, an error is raised due to trying to load the whole 4D matrix in memory, not just the subset.
Does anyone have a suggestion of how thin can be fixed?
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions