Recompute u/v from psi/khi (Arpege)

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

# import & initialize epygram
import epygram
epygram.init_env()
[2]:
import os
INPUTS_DIR = os.path.join('..', 'inputs')
# open resource in read mode
r = epygram.formats.resource(os.path.join(INPUTS_DIR, 'analysis.full-arpege.tl149-c24.fa'), 'r')
[3]:
psi = r.readfield('S050FONC.COURANT')
khi = r.readfield('S050POT.VITESSE')
# re-compute u/v from psi/khi
uv = epygram.fields.psikhi2uv(psi, khi)
 Setup spectral transform
 End Setup spectral transform
[4]:
fig, ax = uv.cartoplot(subsampling=5, vector_plot_method='quiver',
                       components_are_projected_on='grid')
../../_images/gallery_C-data_05.wind_transformations_psikhi_4_0.png

Be careful to projections of wind components !

[5]:
# wrong projection:
fig, ax = uv.cartoplot(subsampling=5, vector_plot_method='quiver',
                       components_are_projected_on='lonlat')
../../_images/gallery_C-data_05.wind_transformations_psikhi_6_0.png

and stretched grids !

[6]:
# map factor due to stretching:
fig, ax = uv.cartoplot(subsampling=5, vector_plot_method='quiver',
                       components_are_projected_on='grid',
                       map_factor_correction=False)
# [2024/09/27-14:28:46][epygram._plugins.with_cartopy.H2DVectorField][_cartoplot_set_figure_and_module:0049][WARNING]: check carefully *map_factor_correction* w.r.t. dilatation_coef
# [2024/09/27-14:28:46][epygram.geometries.GaussGeometry][reproject_wind_on_lonlat:0708][WARNING]: check carefully *map_factor_correction* w.r.t. dilatation_coef
../../_images/gallery_C-data_05.wind_transformations_psikhi_8_1.png
[ ]: