Aggregate fields temporally (via meta_resource)ΒΆ

[1]:
%matplotlib inline
# for figures in notebook

# import & initialize epygram
import epygram
epygram.init_env()

# path to file
import os
INPUTS_DIR = os.path.join('..', 'inputs')
[2]:
paths = [os.path.join(INPUTS_DIR, 'grid.arome-forecast.guyane0025+00{:02}:00.grib'.format(i))
         for i in (0, 12, 24)]
r = epygram.resources.meta_resource(paths, 'r', 'MV')  # MV = Multi-Validities
[3]:
f = r.readfield('shortName:2r')
[4]:
print(f.validity)
print(f.getdata(d4=True).shape)
<List of FieldValidity which date/time are:
2020-11-02 00:00:00
2020-11-02 12:00:00
2020-11-03 00:00:00
>
(3, 1, 317, 419)
[ ]: