Esempio n. 1
0
    def quickPlot(self, output_file=None, **kwargs):
        """ Do a quick plot of the sounding """
        my_skew_t_figure = figure()

        # Add an Skew-T axes to the Figure
        my_skew_t_axes = my_skew_t_figure.add_subplot(111,
                                                      projection='skewx',
                                                      **kwargs)

        pressure, temperature, dew_point_temperature = self.getCleanSounding()

        # Add a profile to the Skew-T diagram
        my_skew_t_axes.addProfile(pressure,
                                  temperature,
                                  dew_point_temperature,
                                  hPa=True,
                                  celsius=True,
                                  method=0,
                                  diagnostics=True)

        if output_file is not None:
            # Save the figure
            my_skew_t_figure.save_fig(output_file)
        else:
            # Show the figure
            my_skew_t_figure.show_plot()
Esempio n. 2
0
"""
Simple SkewT Figure example from Sounding
"""

from __future__ import print_function, division


from SkewTplus.skewT import figure
from SkewTplus.sounding import sounding


# Load the sounding data
mySounding = sounding("./armSoundingExample.cdf")

# Create a Figure Manager
mySkewT_Figure = figure()

# Add an Skew-T axes to the Figure
mySkewT_Axes = mySkewT_Figure.add_subplot(111, projection="skewx")

# Extract the data from the Sounding
# The getCleanSounding method remove levels where invalid temperatura or pressure
# values are present
pressure, temperature, dewPointTemperature = mySounding.getCleanSounding()

# Add a profile to the Skew-T diagram
mySkewT_Axes.addProfile(
    pressure,
    temperature,
    dewPointTemperature,
    hPa=True,
Esempio n. 3
0
'''
Plot two soundings in the same Skew-T diagram with out any parcel analysis
'''

from __future__ import print_function, division

from SkewTplus.skewT import figure
from SkewTplus.sounding import sounding

#Load the sounding data
mySounding1 = sounding("./bna_day1.txt")
mySounding2 = sounding("./bna_day2.txt")

# Create a Figure Manager with a suitable size for both plots
mySkewT_Figure = figure(figsize=(5, 6))

# Add the Skew-T axes to the Figure
mySkewT_Axes1 = mySkewT_Figure.add_subplot(111, projection='skewx', tmin=-40)

# Add one profile to the Skew-T diagram
# The line style is set to be a solid line and a label is added
# to the plot. Since the label is not None, a legend will be added
# automatically to the plot
mySkewT_Axes1.addProfile(*mySounding1.getCleanSounding(),
                         hPa=True,
                         celsius=True,
                         parcel=False,
                         label='Day 1',
                         linestyle='-')

# Add a second profile to the Skew-T diagram
Esempio n. 4
0
mySounding.quickPlot()


'''
Simple SkewT Figure example from Sounding
'''





#Load the sounding data
mySounding = sounding("./exampleSounding.txt")

# Create a Figure Manager 
mySkewT_Figure = figure()

# Add an Skew-T axes to the Figure
mySkewT_Axes = mySkewT_Figure.add_subplot(111, projection='skewx')

# Extract the data from the Sounding 
# The getCleanSounding method remove levels where invalid temperatura or pressure
# values are present
pressure, temperature, dewPointTemperature = mySounding.getCleanSounding()

# Add a profile to the Skew-T diagram
mySkewT_Axes.addProfile(pressure,temperature, dewPointTemperature ,
                        hPa=True, celsius=True, method=0, diagnostics=True)
 
# Show the figure
mySkewT_Figure.show_figure()
Esempio n. 5
0
parcel analysis, and plot them side to side
"""

from __future__ import print_function, division


from SkewTplus.skewT import figure
from SkewTplus.sounding import sounding


# Load the sounding data
mySounding1 = sounding("./bna_day1.txt")
mySounding2 = sounding("./bna_day2.txt")

# Create a Figure Manager with a suitable size for both plots
mySkewT_Figure = figure(figsize=(9, 5))

# Now we want to create two axes side to side

# Add the first Skew-T axes to the Figure
mySkewT_Axes1 = mySkewT_Figure.add_subplot(121, projection="skewx", tmin=-40)


# Extract the data from the Sounding
pressure, temperature, dewPointTemperature = mySounding1.getCleanSounding()


# Add a profile to the Skew-T diagram
mySkewT_Axes1.addProfile(
    pressure,
    temperature,