NREL/rex

Add multiyear mean to temporal_state

Opened this issue · 1 comments

Why this feature is necessary:
Necessary is a bit strong -- I can definitely compute multiyear means from the annual means rex outputs easy enough. At the same time I end up doing it a lot and it would be handy!

A possible solution is:
Basically, be able to point temporal_stats to a bunch of h5's and tell it to take the mean across all files for a certain dataset.

I have considered the following alternatives:
What I do now, which again works, is compute the annual means and then postprocess the multiyear manually.

Charge code
None for now, i'll update if I think I can find something

Urgency / Timeframe
Not urgent at all, just a whishlist feature.

Have you thought about using the rex multi year mean handler (see usage examples in link below)? This will auto stack timeseries data for a glob-like h5 pattern request. Then you would just run a .mean(axis=0). The only major inconvenience i see is storing all years for all sites in memory could be a big hog.... But you could iterate on row slices pretty easily or just get a bigmem node.

https://nrel.github.io/rex/_autosummary/rex.multi_year_resource.MultiYearResource.html