Get the 3D Pressure field off a hybrid-pressure coordinate FA file (and its surface pressure)ΒΆ

[1]:
%matplotlib inline
import epygram
from epygram.geometries.VGeometry import hybridP_coord_and_surfpressure_to_3D_pressure_field
[2]:
r = epygram.formats.resource('../inputs/ICMSHAROM+0001', 'r')
surfP = r.readfield('SURFPRESSION')
t58 = r.readfield('S058TEMPERATURE')
[3]:
surfP.sp2gp()  # field is spectral
surfP.operation('exp')  # and log(Ps)
[4]:
p3D = hybridP_coord_and_surfpressure_to_3D_pressure_field(t58.geometry.vcoordinate, surfP,
                                                          vertical_mean='geometric')
# in AROME, the computation of pressure at mass-levels is a geometric average of the surrounding flux-levels pressures
[5]:
p3D.data.shape
[5]:
(60, 720, 750)