Hour of Maximum Precipitation#
Calculate and plot hour of daily maximum precipitation.
Description#
This diagnostics calculates the hour of daily maximum precipitation and plots
it. The input data needs to be subdaily and of shape (hour, latitude,
longitude). The hour dimension should be in local solar time (see
local_solar_time()).
Configuration options in recipe#
- caption: str, optional
Figure caption used for provenance tracking. By default, uses “Global map of the hour of the daily maximum precipitation for {alias}.”.
- cbar_label: str, optional (default: “Hour of daily maximum precipitation”)
Colorbar label.
- cbar_kwargs: dict, optional
Optional keyword arguments for
matplotlib.pyplot.colorbar(). By default, uses{orientation: "horizontal"}.- figure_kwargs: dict, optional
Optional keyword arguments for
matplotlib.pyplot.figure(). By default, usesconstrained_layout: true, ticks: [0, 3, 6, 9, 12, 15, 18, 21].- matplotlib_rc_params: dict, optional
Optional
matplotlib.RcParamsused to customize matplotlib plots. Options given here will be passed tomatplotlib.rc_context()and used for all plots produced with this diagnostic.- method: str, optional (default: “dft”)
Method to determine the hour of daily maximum precipitation. Possible options:
If “dft”, apply a discrete Fourier transform (DFT) to the data and use the peak of the first component (see https://mdtf-diagnostics.readthedocs.io/en/latest/sphinx_pods/precip_diurnal_cycle.html).
If “harmonic_fit”, fit a 12hr- plus 24hr-harmonic to the input data and use the peak of the 24hr-harmonic (see Dai, 2024; https://doi.org/10.1007/s00382-024-07182-6). This should give identical/very similar results to “dft”, but is much slower.
If “max”, simply use the maximum in the input data.
- plot_kwargs: dict, optional
Optional keyword arguments for
iris.plot.pcolormesh(). By default, usescmap: twilight.- projection: str, optional (default: None)
Projection used for the plot. Needs to be a valid projection class of
cartopy.crs. Keyword arguments can be specified using the optionprojection_kwargs.- projection_kwargs: dict, optional
Optional keyword arguments for the projection given by
projection. For map plots, the default keyword arguments{central_longitude: 10}are used.- pyplot_kwargs: dict, optional
Optional calls to functions of
matplotlib.pyplot. Dictionary keys are functions ofmatplotlib.pyplot. Dictionary values are used as argument(s) for these functions (if values are dictionaries, these are interpreted as keyword arguments; otherwise a single argument is assumed). String arguments can contain format strings (e.g.,"{dataset} ({project})").- savefig_kwargs: dict, optional
Optional keyword arguments for
matplotlib.pyplot.savefig(). By default, usesbbox_inches: tight, dpi: 300, orientation: landscape.- seaborn_settings: dict, optional
Options for
seaborn.set_theme()(affects all plots). By default, usesstyle: ticks.- threshold: float, optional (default: 0.0)
Mask grid points where precipitation is lower than the given threshold.