Aggregate fields as 4D (H2D + vertical + temporal)ΒΆ

[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', 'CL+MV')
[3]:
f = r.readfield({'shortName':'t', 'typeOfFirstFixedSurface':100})  # temperature on pressure levels
[4]:
print(f.validity)
print(f.getdata(d4=True).shape)
print(f.geometry.vcoordinate.levels)
<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, 19, 317, 419)
[10000, 15000, 17500, 20000, 22500, 25000, 27500, 30000, 35000, 40000, 50000, 60000, 70000, 80000, 85000, 90000, 92500, 95000, 100000]
[ ]: