spencerahill / aospy

Python package for automated analysis and management of gridded climate data
Apache License 2.0
83 stars 12 forks source link

Combine Calcs with output time intervals that are subsets of another Calc into a single Calc #291

Open spencerahill opened 6 years ago

spencerahill commented 6 years ago

I am currently calculating the climatological annual cycle and annual mean of a bunch of fields using monthly data. So in my calc_suite_specs dict, I have output_time_intervals=[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 'ann'].

The data for each of the 12 months is already being calculated in the 'ann' case, before they are all averaged together to create the annual mean. So it would make sense to, before that averaging procedure, dispatch each of the desired monthly averages as well. But this is not what aospy currently does. Instead, this generates 13 different Calcs, with the identical data being loaded 13 different times.

This is similar-to-but-different-than #4, because what I'm advocating for here isn't a CalcSuite-level storage of data, but rather implementing multiple output time intervals within a single Calc. But the logic for assessing whether different Calcs are temporal subsets of one another would, I think, belong in CalcSuite.