[Pflexible-users] plot accumulative with log10 for multiple levels
A python tool for data analysis of FLEXPART transport modeling.
Status: Beta
Brought to you by:
jfburkhart
|
From: Albert J. P. <alb...@ic...> - 2014-11-13 17:12:08
|
Hi,
I am having difficulties to plot flexpart outputs with pflexible. We
have several script in Matlab and we would like to move to python.
For this purpose, we are make things work with pflexible if possible.
As an example, I want to plot levels from 0 to 4, 5 to 15 and the last
one accumulated and then multiply values to log10 to be able to improve
visualitzation. I have seen a couple of example and I managed to get
the code found below but it is not producing the same outputs as in Matlab.
lvl_values = [(0,4),(5,15),(16,17)]
data = H.C[(0,0)]
data_range=[-1, 4]
for minlvl, maxlvl in lvl_values:
TC = None
for i in range(minlvl, (maxlvl)):
print i
TC = pf.plot_at_level(H, H.C[(0,0)], level=i,
map_region='Europe', overlay=True, FIGURE=TC)
filename = '%s_tc_%s_%d_%d_overlay.png' % (data.species,
data.timestamp, minlvl, maxlvl)
TC.fig.savefig(filename)
I also checked source code but it is not clear to me a the moment.
Does somebody have any idea or any way to improve the code?
Thanks
|