Plot the z/p characteristics of a Hybrid-Pressure vertical coordinate¶
(cf. package pyvgrid
from project vgrid
and its command-line tool mkvgrid.py
to build new vertical coordinates)¶
[1]:
# import & initialize epygram
import epygram
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')
hybridP_geo = r.readfield('S058TEMPERATURE').geometry.vcoordinate
[3]:
vmean = "LAPRXPK=False"
[4]:
vg = r.geometry.vcoordinate.to_vgrid(vertical_mean=vmean,
vgrid_name=r.container.basename)
[5]:
# y and x may be among ('z', 'p', 'level', 'pthickness', 'zthickness')
fig = vg.bokeh_plot_y_vs_x('level', 'pthickness')
# [2024/09/27-14:29:31][numexpr.utils][_init_num_threads:0147][INFO]: Note: NumExpr detected 16 cores but "NUMEXPR_MAX_THREADS" not set, so enforcing safe limit of 8.
[6]:
# Save and open html output file:
# vg.bokeh_fig_to_html(fig)
# which will look like: