Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publication ready plot operator #240

Open
Sylviabohnenstengel opened this issue Nov 9, 2023 · 7 comments
Open

Publication ready plot operator #240

Sylviabohnenstengel opened this issue Nov 9, 2023 · 7 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Sylviabohnenstengel
Copy link
Contributor

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
Copy link
Member

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
Copy link
Contributor Author

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
Copy link
Contributor Author

Sylviabohnenstengel commented Nov 14, 2023

Layout of plots:

  • crop white space
  • keep model name and config name as title directly above plot
  • colourbar to include variable name with units below figure or to right of figure
  • clear axis description
  • for multifigure panels include overall summary title stating domain and/or time
  • for multifigure panels labelling a), b), c), ...
  • for multifigure panels only include single colourbar or legend below for even number of subfigures and inempty place when dealing with uneven number of subfigures
  • Time in Z(UTC)
  • For timeseries plot avoid red/green
  • For timeseries plots use UTC, variable name with units on y=axis and region/domain as title above figure, legend within figure suing abbreviation for configuration
  • For lineplots: use black line for observations
  • For lineplots: use grey lines for "model truth" if using analysis
  • For lineplots: use same colour, but different linestyle for same science config, but distinguish between parameter settings using different linestyles. i.e. RAL3 blue, RAL2 magenta. RAL3 1km (blue solid), RAL 0.5km (blue dashed), RAL2 1km (magenta solid), RAL2 0.5km (magenta dashed). Ensure that same configs have same linestyle.
  • use stratify infrmation in title above sub-figure plots if applicable.
  • pre-defined colour bars for specific variables such as Temperature (blue-white-red), orography, precipitation. Maybe use of dictionary for this such as "if selection var contains precip in name then use this colourbar"
    @jfrost-mo Need to discuss the metadata information we can use

@jfrost-mo
Copy link
Member

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 jfrost-mo changed the title Plot operator Publication ready plot operator Nov 24, 2023
@jfrost-mo
Copy link
Member

jfrost-mo commented Nov 24, 2023

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

@Sylviabohnenstengel
Copy link
Contributor Author

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
Copy link
Member

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

@jfrost-mo jfrost-mo unpinned this issue Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants