MetOffice / CSET

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

generate histograms for 2D fields on vertical levels #453

Closed Sylviabohnenstengel closed 1 month ago

Sylviabohnenstengel commented 5 months ago
Sylviabohnenstengel commented 3 months ago

Recipe:

Sylviabohnenstengel commented 3 months ago

The recipe currently plots a simple histogram of the data range for a chosen variable for every pressure level and every validity time.

using tox the test for def test_plot_vertical_line_series(tmp_working_dir is failing as it first requires ticket #567 to be reviewed and included.

Sylviabohnenstengel commented 3 months ago

@jfrost-mo Do you have ensemble data that work with CSET at the moment that I can point to? i would like to try the new internal histogram plotting function.

Sylviabohnenstengel commented 3 months ago

@jfrost-mo how can we ensure that we use the same bins and limits for the xaxis in the histogram? is there a way to read out infromation from all cubes across all realisation coordinates, time coordinates and pressure level coordinates to set the min and max limits for the xrange and also the bin width? image image In the example here different bins are used for the plots

I assume this can be done in the collate step if we write out all cubes into a single netcdf. Would this be written into the intermediate directory or collate from there?

Imanaged to solve this in the collate step

Sylviabohnenstengel commented 3 months ago

Needed to use the following to link the plot ino the figure.

Put the shared colorbar in its own axes.

colorbar_axes = fig.add_axes([0.15, 0.07, 0.7, 0.03])
colorbar = fig.colorbar(plot, colorbar_axes, orientation="horizontal")
colorbar.set_label(f"{cube.name()} / {cube.units}")

How can I do this properly if I don't need a common colourbar?

all dealt with in the collate step now as it has access to the whole cube

Sylviabohnenstengel commented 2 months ago

PS: https://github.com/MetOffice/CSET/pull/594