MetOffice / CSET

Toolkit for evaluation and investigation of numerical models for weather and climate applications.
https://metoffice.github.io/CSET/
Apache License 2.0
11 stars 4 forks source link

Publication ready plot operator #240

Open Sylviabohnenstengel opened 11 months ago

Sylviabohnenstengel commented 11 months ago

The existing plot operator needs to be extended to allow plotting of 3D cubes, where the 3rd dimension is time and it plots all timesteps in the cube. Need to restrict this so it does not accidentally plot every timestep of a climate series for instance. But it needs to allow plotting of i.e. spatial maps of 24h aggregated rainfall from a cube containing several days.

jfrost-mo commented 11 months ago

So this would be a series of plots, one for each timestep? Or some other kind of visualisation?

For restricting the data that gets plotted we have a filter operator constaining on time. Is this not sufficient?

Sylviabohnenstengel commented 11 months ago

agreed the filter operator will enable to limit the number of plots (read cubes) to plot. SO yes in the first instance it would be required to allow plotting of all fields for the timesteps in the cube.

Sylviabohnenstengel commented 11 months ago

Layout of plots:

jfrost-mo commented 11 months ago

Contour plotting code from David.

outfile_all='{}/Orography_{}.png'.format(CHARTDIR,model)
#setup plot details, size, resolution, etc
fig=plt.figure(num=1,figsize=(15,15),dpi=600,facecolor='w',edgecolor='k')
#set label size
plt.rc('xtick',labelsize=22)
plt.rc('ytick',labelsize=22)
#filled contour plot of the reflectivity field
ax=iplt.contourf(field),levels=coutour_levels,\
                 cmap=mpl.cm.terrain)
#add coastline
plt.gca().coastlines(resolution='10m')
#set plotting limits
plt.xlim(points_x)
plt.ylim(points_y)
#add title
plt.title('Model Orography',fontsize=16)
cbar=plt.colorbar()
cbar.set_label(label='Altitude [m]',size=20)
plt.savefig(outfile_all,dpi=600,db_file=db_file)
plt.close()
jfrost-mo commented 11 months ago

Partial fix is now on trunk, but more work will be needed after the away day.

Sylviabohnenstengel commented 10 months ago

Just ran plot.postage_stamp_contour_plot with coordinate: time and realise that the time format needs to be changed to a readable format.

jfrost-mo commented 10 months ago

I presume it is currently giving hours since some reference point?