.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "source/auto_examples/plotting/plot_days.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_source_auto_examples_plotting_plot_days.py: Calculate and plot wind rose plots separated by day. ----------------------------------------------------- Example of how to read in MET data and plot histograms of wind speed and temperature grouped by day. Author: Bobby Jackson .. GENERATED FROM PYTHON SOURCE LINES 10-48 .. image-sg:: /source/auto_examples/plotting/images/sphx_glr_plot_days_001.png :alt: Mean of temp_mean (degC) by wdir_vec_mean on 20190101, Mean of temp_mean (degC) by wdir_vec_mean on 20190102, Mean of temp_mean (degC) by wdir_vec_mean on 20190103, Mean of temp_mean (degC) by wdir_vec_mean on 20190104, Mean of temp_mean (degC) by wdir_vec_mean on 20190105, Mean of temp_mean (degC) by wdir_vec_mean on 20190106, Mean of temp_mean (degC) by wdir_vec_mean on 20190107 :srcset: /source/auto_examples/plotting/images/sphx_glr_plot_days_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-script-out .. code-block:: none /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) /home/runner/work/ACT/ACT/act/plotting/windrosedisplay.py:358: RuntimeWarning: Mean of empty slice arr.append(np.nanmean(data[idx])) | .. code-block:: Python from arm_test_data import DATASETS import matplotlib.pyplot as plt import act # Read in the sample MET data met_wildcard_list = [ 'sgpmetE13.b1.20190101.000000.cdf', 'sgpmetE13.b1.20190102.000000.cdf', 'sgpmetE13.b1.20190103.000000.cdf', 'sgpmetE13.b1.20190104.000000.cdf', 'sgpmetE13.b1.20190105.000000.cdf', 'sgpmetE13.b1.20190106.000000.cdf', 'sgpmetE13.b1.20190107.000000.cdf', ] met_filenames = [DATASETS.fetch(file) for file in met_wildcard_list] ds = act.io.arm.read_arm_netcdf(met_filenames) # Create Plot Display display = act.plotting.WindRoseDisplay(ds, figsize=(15, 15), subplot_shape=(3, 3)) groupby = display.group_by('day') groupby.plot_group( 'plot_data', None, dir_field='wdir_vec_mean', spd_field='wspd_vec_mean', data_field='temp_mean', num_dirs=12, plot_type='line', ) # Set theta tick markers for each axis inside display to be inside the polar axes for i in range(3): for j in range(3): display.axes[i, j].tick_params(pad=-20) plt.show() ds.close() .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 3.760 seconds) .. _sphx_glr_download_source_auto_examples_plotting_plot_days.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_days.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_days.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_days.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_