Get the 3D Pressure field from a hybrid-pressure coordinate FA file (and its surface pressure)ΒΆ
[1]:
# import & initialize epygram
import epygram
from epygram.geometries.VGeometry import hybridP_coord_and_surfpressure_to_3D_pressure_field
epygram.init_env()
import os
INPUTS_DIR = os.path.join('..', 'inputs')
[2]:
# open resource in read mode
r = epygram.formats.resource(os.path.join(INPUTS_DIR, 'ICMSHAROM+0022'), 'r')
surfP = r.readfield('SURFPRESSION')
hybridP_geo = r.readfield('S058TEMPERATURE').geometry.vcoordinate
[3]:
surfP.sp2gp() # field is spectral
surfP.operation('exp') # and log(Ps)
[4]:
p3D = hybridP_coord_and_surfpressure_to_3D_pressure_field(hybridP_geo, 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]:
(90, 250, 250)
[ ]: