Hi Thierry,
thx for your script, in fact I am not accustom to scripting, so I install ninja-IDE, made some modification till no error message, run the script and I see an input bar, what do I do next please, or Have I done something wrong or forgot a step??
#!/usr/bin/env python3
# -*- coding: utf-8 -*
"""
plot results as arrow.
"""
import numpy as np
from postel.plot2d import plot2d_scalar_map, plot2d_vectors
from data_manip.extraction.telemac_file import TelemacFile
import matplotlib.pyplot as plt
file_toma = '/home/ben/telemac/v8p3r1/CAS_PASP/FS_T3D_TOM/RT_L23DS5ds1_U.slf'
res_toma = TelemacFile(file_toma, access='r')
hm0 = res_toma.get_data_value("WAVE HEIGHT HM0", -1)
theta = res_toma.get_data_value("MEAN DIRECTION", -1)
dirx_wave = np.sin(theta*np.pi/180.)
diry_wave = np.cos(theta*np.pi/180.)
fig, axes = plt.subplots(1, 1, figsize=(14, 12))
plot2d_scalar_map(fig, axes,
res_toma.tri, hm0, data_name='Wave Height Hm0 (m)')
plot2d_vectors(fig, axes, res_toma.tri, dirx_wave, diry_wave,
grid_resolution=[25, 25],
data_name='wave direction', colorbar=False)
name = 'hm0.png'
fig.savefig(name)
plt.close(1)