Plotting wind: barbs, wind speedΒΆ

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

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

import os
INPUTS_DIR = os.path.join('..', 'inputs')
# [2025/01/16-17:39:22][epygram.formats][<module>:0072][INFO]: Format: HDF5SAF is deactivated at runtime (Error: No module named 'h5py'). Please deactivate from config.implemented_formats or fix error.
[2]:
r = epygram.open(os.path.join(INPUTS_DIR, 'ICMSHAROM+0022'), 'r')
[3]:
u = r.readfield('CLSVENT.ZONAL')
v = r.readfield('CLSVENT.MERIDIEN')
uv = epygram.fields.make_vector_field(u,v)
[4]:
fig, ax = uv.cartoplot(subsampling=10, vector_plot_method='barbs', subzone='CI',
                       # ! user got to know the very nature of the field he is plotting:
                       components_are_projected_on='lonlat',
                       map_factor_correction=False)
../../_images/gallery_A.1-H2D_plots_09.wind_plot_4_0.png
[5]:
# or if you don't want wind speed:
fig, ax = uv.cartoplot(subsampling=10, vector_plot_method='barbs', subzone='CI',
                       # ! user got to know the very nature of the field he is plotting:
                       components_are_projected_on='lonlat',
                       plot_method=None)
../../_images/gallery_A.1-H2D_plots_09.wind_plot_5_0.png
[6]:
# or if you want to plot module only:
ff = uv.to_module()
fig, ax = ff.cartoplot(subzone='CI')
../../_images/gallery_A.1-H2D_plots_09.wind_plot_6_0.png
[ ]: