add a utility to get all snapshots from the path

This commit is contained in:
Valentin Boettcher 2022-12-09 15:19:54 -05:00
parent e9900520c4
commit 40ea31b052
No known key found for this signature in database
GPG key ID: E034E12B7AF56ACE

View file

@ -872,13 +872,17 @@ def ensemble_mean_online(
return aggregate.ensemble_value
def get_online_values_from_cache(path):
def get_all_snaphot_paths(path):
path = Path(path)
all_versions = list(path.parent.glob(path.stem + "*" + path.suffix))
final = all_versions[0]
all_versions = all_versions[1:] + [final]
return all_versions
def get_online_values_from_cache(path):
all_versions = get_all_snaphot_paths(path)
vals = []
for path in all_versions: