-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignore dtype_vert for data that isn't vertically defined #84
Comments
Working through this offline with @micahkim23, here's an initial stab at how to proceed. The key is that this introduces nested looping, where we need to loop first over the vertical reductions and then over the temporal and regional ones. Steps to take within
def _apply_all_reductions(self, data):
for dov in self.dtype_out_vert:
vert_reduced = self._apply_vert_reduction(data, dov)
for dot in self.dtype_out_time:
self._apply_all_time_reductions(vert_reduced) (the call signatures of the above method calls may not be correct; double check) |
Hey, @spencerahill, I started working on this and things are starting to get a little thorny. I'm going to explain my understanding of the problem. If we change Currently Line 537 in 841a756
OrderedDict that maps the name of the time reduction to its corresponding Dataset or DataArray. Ultimately that's what gets looped over here Lines 597 to 602 in 841a756
My understanding is that at this part we want to have an I think there is a similar issue when determining Lines 267 to 269 in 841a756
|
I won't have time in the next week to dig into this, and @micahkim23 and I agreed offline that he is now officially done for the fall term. But wanted to note briefly:
Dictionaries can take tuples as keys: Also wondering if perhaps we should tackle this alongside/after implementing the Reductions class, c.f. #208 |
Sometimes, I'll forget to set
dtype_vert=False
when I'm doing a calculation on a 2D variable, e.g.t_surf
. Rather than throwing an error or being ignored, this causes the calculation to be performed as normal but then with the erroneousdtype_vert
incorporated into the output filename. So then it can't be found subsequently.I think the most reasonable default behavior (which we should ultimately enable toggling via config) would be to raise a warning/log that there's a meaningless
dtype_vert
option specified, and then override it. Should be simple enough to implement via checkingVar.def_vert
. andCalc.dtype_out_vert
.The text was updated successfully, but these errors were encountered: