Plottingdata RST
Plottingdata RST
===========================
.. image:: _static/images/example-sounding_dark3.png
:width: 300 px
:align: right
Initially, SounderPy was a tool meant for getting and parsing data with not as much
focus on plotting said data. However, recent releases have put more emphasis on
plotting capabilites. Version 3.0.0+ features a number of significant & exciting
upgrades to SounderPy's plotting abilities.
The `full` sounding plot that SounderPy creates is a complex figure with unique
design geared towards severe convective storm enviroment analysis.
These sounding plots are 'my baby' and I hope you find them useful! :)
********************************************************************
.. tip::
**Do your plots have funky scaling?** This is a common issue for smaller screen
sizes. To fix this, use the `save=True` kwarg in your plot function.
.. _soundings:
Building Soundings
----------------------------------
While this function may appear complicated at first glance, there is actually only
*one* required argument for this function. The other arguments are simply optional
settings for the plot!
Example
^^^^^^^^^^
.. code-block:: python
.. image:: _static/images/example-sounding_light.png
:width: 800 px
**************************************************
.. _hodographs:
Building Hodographs
----------------------------------
Very similarly to soundings, we can use the simple ``spy.build_hodograph()``
function:
Example
^^^^^^^^^^
.. code-block:: python
.. image:: _static/images/example-hodograph_light.png
:width: 800 px
**************************************************
.. _compsoundings:
Sometimes we want to compare two or more profiles against each other. Perhaps at
different locations or times, or we may want to compare different models or model
run-times. SounderPy allows you to do this!
Examples
^^^^^^^^^
.. code-block:: python
.. image:: _static/images/example-composite_light.png
:width: 800 px
.. code-block:: python
data_list = []
for hour in ['00', '01', '02', '03', '04', '05', '06']:
cd = spy.get_bufkit_data('hrrr', 'dtx', 0, '2024', '02', '28', hour,
hush=True)
data_list.append(cd)
.. image:: _static/images/example-composite_dark.png
:width: 800 px
**************************************************
.. _vadhodographs:
SounderPy now offers the ability to plot NEXRAD radar VAD data on a hodograph using
the ``spy.build_vad_hodograph()`` function:
Examples
^^^^^^^^^^
.. image:: _static/images/example_vad-hodograph.png
:width: 800 px
**************************************************
.. _modify_sfc:
Users may override the zeroth (surface) value of the `clean_data` dict, when
creating a plot or returning sounding parameters, using the ``modify_sfc`` kwarg.
This argument is a python dictionary.
SounderPy takes the users requested surface modifications and preforms an "Barnes
style" interpolation of the new surface values with the existing profile up several
points. Please note that as of release v3.0.5, this is to be considered a "beta"
version of the feature. As such, it may not always perform as expected.
Examples:
.. code-block:: python
**************************************************
.. _storm_motions:
Users can define custom storm motions or choose from a number of 'storm motion
keys' to change the storm motion considered by kinematic and thermodynamic
parameters during calculations and plotting. All parameters that consider storm
motion will be affected by the ``storm_motion`` kwarg.
Example:
.. code-block:: python
storm_motion='left_moving'
Example:
.. code-block:: python
# 250 degrees at 45 knots
storm_motion=[250, 45]
**************************************************
.. _parcels_logic:
Parcel Logic
------------
New to v3.0.2+, the 'parcel-update', is a complex scheme for computing and plotting
advanced parcels using various adiabatic ascent schemes and entrainment schemes.
This toolkit comes from `Amelia Urquhart's <https://github.com/a-urq/ecape-parcel-
py>`_ ``ecape-parcels`` Python package, which is based on work by `Peters et. al.
2022 <https://journals.ametsoc.org/view/journals/atsc/79/3/JAS-D-21-0118.1.xml>`_.
When plotting soundings, users can choose from a number of parcel types to compute
and plot, such as...
Each of these parcel types can be computed and plotted from a/the...
- Surface-based parcel
- Most-Unstable parcel
- Mixed Layer parcel
When plotting a `full` sounding using the ``build_sounding()`` function, use the
kwarg `special_parcels` to choose which parcels you'd like to plot. This kwarg is a
nested `list` (``[[a, b], [c, d]]``), where the first `list` contains 'highlight'
parcels and the second `list` contains 'background' parcels. I.e., 'highlighted'
parcels are darker and on top of 'background' parcels, which appear faded and
behind the 'highlight' parcels.
- Example:
.. code-block:: python
Note the struture of the 'parcel key': ``sb_ia_ecape``. This is broken into three
components: 'parcel-type', 'ascent-scheme', and 'entrainment-scheme'. You can make
any parcel you like using this specific nomenclature: ``parcel-type_ascent-
scheme_entrainment-scheme``.
- PARCEL-TYPES
- ``sb``: surface-based parcel
- ``mu``: most-unstable parcel
- ``ml``: mixed-layer parcel
- ASCENT-SCHEMES
- ``ps``: Pseudoadiabatic ascent
- ``ia``: - Irreversible adiabatic ascent
- ENTRAINMENT-SCHEMES
- ``cape``: non-entraining convective available potential energy
- ``ecape``: entraining convective available potential energy
- Examples:
- ``'sb_ia_ecape'``: surface-based irreversible adiabatic entraining CAPE
- ``'mu_ps_cape'``: most-unstable pseudoadiabatic CAPE
- ``'ml_ia_cape'``: mixed-layer irreversible adiabatic CAPE
- ``'sb_ps_ecape'``: surface-based pseudoadiabatic entraining CAPE
**************************************************
This plot style has been developed in a way that acts to provide as much
information to the user as possible with attributes designed specifically for the
analysis of severe convective environments, and supercells/tornadoes in particular.
You will also find that this particular plot style does not host many of the common
and popular severe weather composite indices – that was intentional. Most, if not
all, of the data provided on this plot, are considered, for the lack of a better
word, ‘true’ observations of the atmosphere though most are still subject to heavy
assumptions.